IntelliJUIDesignerDev 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic IntelliJUIDesignerDev (r1.3 - 19 Dec 2003 - AlexeyEfimov)
Changed:
<
<

Suggestion Description Votes Author
I18N support My personal preference would be to use old good property files for storing localized data and to have an ability to bind a component property to resource bundle and a key in that bundle. vote Sergei S. Ivanov

-- AlexeyEfimov - 16 Dec 2003

>
>

-- AlexeyEfimov - 19 Dec 2003


 <<O>>  Difference Topic IntelliJUIDesignerDev (r1.2 - 16 Dec 2003 - AlexeyEfimov)
Changed:
<
<

UIDesigner Suggestions

>
>

UIDesigner Development

Added:
>
>

UIDesigner Open API

UIDesigner must have Open API to add custom user components into toolbar.

Road Map

This road map must be discused, and reviewed.

  • Planned Toolbar Customization
    • Planned Registering and Unregistering custom pallete toolsbar tabs
    • Planned Registering and Unregistering custom components in pallete.
    • Planned Registering and Unregistering custome layout managers.
    • Planned Adding and removing any registered component to any registered pallete toolbar.
    • Planned Adding and removing any registered layout manager to layout toolbar.

  • Planned Access to Component Property Manager
    • Planned Adding and Removing property listeners to Component Property Manager, for tracking changes in properties.
    • Planned Registering and Unregistering custom Property Provider for any registered components, to extends standard properties set.
Deleted:
<
<

Smart and User frendly assigning Assigning class to UI form must be by choosing in avaible Swing classes in project. Also, after class assinged to form, we may assign fields of this class by selection in classes fields with compatible type. vote AlexeyEfimov
Assigning througnt code Then i assign the class to UI form, then in my class will appears the java code like the code that now we can see if decompile compiled UI classes. See section "Inline Assigning" bellow. vote AlexeyEfimov
Icon for file type Form Now it has not icon assigned for UI forms in project's tree view vote AlexeyEfimov
Visual linking support Then UI form link to class, the structure tree view must show this as class and nested form, if we look by class, and the form and nested class if we look by form. vote AlexeyEfimov
"Forms" tab The "Forms" tab in Project View, like an "Project", "Sources" or "Classpaths" droptabs. vote AlexeyEfimov
Generate class from form Why not allow the basic structure of the class to be generated from the form? Instead of binding to an existing class, the bindings define how to generate the class. vote GeoffreyMitchell

Changed:
<
<

Inline Assigning

This is just idea for realization most feature of UIDesigner as code assigning. If you assign the form with a class, then on compile time IntelliJ will insert into your class layout initialization by method $$$setupUI$$$.

It no matter, when code will be changed before compiling or after compiling, because code will changed anyway. That is idea of "Inline Assigning": then you perform assigning form to swing class, the IntelliJ must do code changes before it will be compiled and prevent changes in editor window, but show code in readonly mode. The realization of deny access to changes is adding comments to generated code:

/// 1FCB2358168BC18AF {{  -- Internal IntelliJ code 
/// If it chaged externaly, the IntelliJ will not used it
And close it by:
/// 1FCB2358168BC18AF }} -- Internal IntelliJ code
To deny any changes in IntelliJ editor, execute regexp and show results as readonly block. To deny changes externaly IntelliJ calculate checksum of generated code and place it to comment. Then IntelliJ read this block it generate checksum again and compare it with checksum from comments. If both not equals, then IntelliJ throw this block and break link to UI form. If checksums both is equals, then code is not changed outside and it's valid. Let's look at decompiled code of sample attached to this topic (some code is skipped):
public class UIDesignedForm extends JPanel {
  private JPanel panel;
  private JLabel label;
  private JTextField textField;
  private JButton button;

  public UIDesignedForm() {
    super(new BorderLayout());
    $$$setupUI$$$();
    add(panel, "Center");
    if (textField.getText().length() == 0) {
      textField.setText("Sample text");
      textField.setSelectionStart(0);
      textField.setSelectionEnd(textField.getText().length());
    }
    // ... skiped
  }

  public static void main(String[] args) {
    JFrame frame = new JFrame("Testing IntelliJ UI Designer...");
    frame.getContentPane().add(new UIDesignedForm());
    frame.pack();
    // ... skiped
  }

  private void $$$setupUI$$$() {
    JPanel jpanel = new JPanel();
    panel = jpanel;
    jpanel.setLayout(
      new GridLayoutManager(
        2, 
        1, 
        new Insets(0, 0, 0, 0), 
        -1, 
        -1
      )
    );
    JButton jbutton = new JButton();
    button = jbutton;
    jbutton.setText("Button");
    jpanel.add(
      jbutton, 
      new GridConstraints(
        1, 0, 1, 1, 0, 1, 3, 0, 
        new Dimension(-1, -1), 
        new Dimension(-1, -1), 
        new Dimension(-1, -1)
      )
    );
    // ... etc
  }
}
This code may generated before compile time, in this case developer will see what is realy happen with his swing class:
public class UIDesignedForm extends JPanel {
  private JPanel panel;
  private JLabel label;
  private JTextField textField;
  private JButton button;

  /**
   * Default constructor
   */
  public UIDesignedForm() {
    super(new BorderLayout());
/// 1FCB2358168BC18AF {{  -- Internal IntelliJ code
/// If it chaged externaly, the IntelliJ will not used it
    __setupUI();
/// 1FCB2358168BC18AF }}  -- Internal IntelliJ code
    add(panel, BorderLayout.CENTER);

    if (textField.getText().length() == 0) {
      textField.setText("Sample text");
      textField.setSelectionStart(0);
      textField.setSelectionEnd(textField.getText().length());
    }
    // ... skiped
  }

  // ... skiped

/// 8FDAE45E4E123BBC9 {{  -- Internal IntelliJ code
/// If it chaged externaly, the IntelliJ will not used it
  private void $$$setupUI$$$() {
    JPanel jpanel = new JPanel();
    panel = jpanel;
    jpanel.setLayout(
      new GridLayoutManager(
        2, 
        1, 
        new Insets(0, 0, 0, 0), 
        -1, 
        -1
      )
    );
    JButton jbutton = new JButton();
    button = jbutton;
    jbutton.setText("Button");
    jpanel.add(
      jbutton, 
      new GridConstraints(
        1, 0, 1, 1, 0, 1, 3, 0, 
        new Dimension(-1, -1), 
        new Dimension(-1, -1), 
        new Dimension(-1, -1)
      )
    );
    // ... etc
  }
/// 8FDAE45E4E123BBC9 }}  -- Internal IntelliJ code
}
IntelliJ will show code of method setupUI$$$ and it's invocation point, but in readonly mode. Then IntelliJ detect that internal code changed manualy or outside of IntelliJ then IntelliJ will no serve this one since checking failed.

-- AlexeyEfimov - 10 Jul 2003

>
>

-- AlexeyEfimov - 16 Dec 2003


 <<O>>  Difference Topic IntelliJUIDesignerDev (r1.1 - 21 Aug 2003 - AlexeyEfimov)
Added:
>
>

%META:TOPICINFO{author="AlexeyEfimov" date="1061468150" format="1.0" version="1.1"}%

UIDesigner Suggestions



Suggestions of improvements

Please add your suggestions in follow table.

tip.gif You can voite suggestions via IDEA tracker on http://www.intellij.net/tracker. Each suggestion must have tracker request for voiting. Please set request type to "Feature" and starts subject by "[UIDesigner]" phrase.

Suggestion Description Votes Author
Smart and User frendly assigning Assigning class to UI form must be by choosing in avaible Swing classes in project. Also, after class assinged to form, we may assign fields of this class by selection in classes fields with compatible type. vote AlexeyEfimov
Assigning througnt code Then i assign the class to UI form, then in my class will appears the java code like the code that now we can see if decompile compiled UI classes. See section "Inline Assigning" bellow. vote AlexeyEfimov
Icon for file type Form Now it has not icon assigned for UI forms in project's tree view vote AlexeyEfimov
Visual linking support Then UI form link to class, the structure tree view must show this as class and nested form, if we look by class, and the form and nested class if we look by form. vote AlexeyEfimov
"Forms" tab The "Forms" tab in Project View, like an "Project", "Sources" or "Classpaths" droptabs. vote AlexeyEfimov
Generate class from form Why not allow the basic structure of the class to be generated from the form? Instead of binding to an existing class, the bindings define how to generate the class. vote GeoffreyMitchell
I18N support My personal preference would be to use old good property files for storing localized data and to have an ability to bind a component property to resource bundle and a key in that bundle. vote Sergei S. Ivanov

Inline Assigning

This is just idea for realization most feature of UIDesigner as code assigning. If you assign the form with a class, then on compile time IntelliJ will insert into your class layout initialization by method $$$setupUI$$$.

It no matter, when code will be changed before compiling or after compiling, because code will changed anyway. That is idea of "Inline Assigning": then you perform assigning form to swing class, the IntelliJ must do code changes before it will be compiled and prevent changes in editor window, but show code in readonly mode. The realization of deny access to changes is adding comments to generated code:

/// 1FCB2358168BC18AF {{  -- Internal IntelliJ code 
/// If it chaged externaly, the IntelliJ will not used it
And close it by:
/// 1FCB2358168BC18AF }} -- Internal IntelliJ code
To deny any changes in IntelliJ editor, execute regexp and show results as readonly block. To deny changes externaly IntelliJ calculate checksum of generated code and place it to comment. Then IntelliJ read this block it generate checksum again and compare it with checksum from comments. If both not equals, then IntelliJ throw this block and break link to UI form. If checksums both is equals, then code is not changed outside and it's valid. Let's look at decompiled code of sample attached to this topic (some code is skipped):
public class UIDesignedForm extends JPanel {
  private JPanel panel;
  private JLabel label;
  private JTextField textField;
  private JButton button;

  public UIDesignedForm() {
    super(new BorderLayout());
    $$$setupUI$$$();
    add(panel, "Center");
    if (textField.getText().length() == 0) {
      textField.setText("Sample text");
      textField.setSelectionStart(0);
      textField.setSelectionEnd(textField.getText().length());
    }
    // ... skiped
  }

  public static void main(String[] args) {
    JFrame frame = new JFrame("Testing IntelliJ UI Designer...");
    frame.getContentPane().add(new UIDesignedForm());
    frame.pack();
    // ... skiped
  }

  private void $$$setupUI$$$() {
    JPanel jpanel = new JPanel();
    panel = jpanel;
    jpanel.setLayout(
      new GridLayoutManager(
        2, 
        1, 
        new Insets(0, 0, 0, 0), 
        -1, 
        -1
      )
    );
    JButton jbutton = new JButton();
    button = jbutton;
    jbutton.setText("Button");
    jpanel.add(
      jbutton, 
      new GridConstraints(
        1, 0, 1, 1, 0, 1, 3, 0, 
        new Dimension(-1, -1), 
        new Dimension(-1, -1), 
        new Dimension(-1, -1)
      )
    );
    // ... etc
  }
}
This code may generated before compile time, in this case developer will see what is realy happen with his swing class:
public class UIDesignedForm extends JPanel {
  private JPanel panel;
  private JLabel label;
  private JTextField textField;
  private JButton button;

  /**
   * Default constructor
   */
  public UIDesignedForm() {
    super(new BorderLayout());
/// 1FCB2358168BC18AF {{  -- Internal IntelliJ code
/// If it chaged externaly, the IntelliJ will not used it
    __setupUI();
/// 1FCB2358168BC18AF }}  -- Internal IntelliJ code
    add(panel, BorderLayout.CENTER);

    if (textField.getText().length() == 0) {
      textField.setText("Sample text");
      textField.setSelectionStart(0);
      textField.setSelectionEnd(textField.getText().length());
    }
    // ... skiped
  }

  // ... skiped

/// 8FDAE45E4E123BBC9 {{  -- Internal IntelliJ code
/// If it chaged externaly, the IntelliJ will not used it
  private void $$$setupUI$$$() {
    JPanel jpanel = new JPanel();
    panel = jpanel;
    jpanel.setLayout(
      new GridLayoutManager(
        2, 
        1, 
        new Insets(0, 0, 0, 0), 
        -1, 
        -1
      )
    );
    JButton jbutton = new JButton();
    button = jbutton;
    jbutton.setText("Button");
    jpanel.add(
      jbutton, 
      new GridConstraints(
        1, 0, 1, 1, 0, 1, 3, 0, 
        new Dimension(-1, -1), 
        new Dimension(-1, -1), 
        new Dimension(-1, -1)
      )
    );
    // ... etc
  }
/// 8FDAE45E4E123BBC9 }}  -- Internal IntelliJ code
}
IntelliJ will show code of method setupUI$$$ and it's invocation point, but in readonly mode. Then IntelliJ detect that internal code changed manualy or outside of IntelliJ then IntelliJ will no serve this one since checking failed.

-- AlexeyEfimov - 10 Jul 2003


View | Diffs | r1.3 | > | r1.2 | > | r1.1 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision r1.1 - 21 Aug 2003 - 12:15 GMT - AlexeyEfimov
Revision r1.3 - 19 Dec 2003 - 11:38 GMT - AlexeyEfimov
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.