IntelliJUIDesigner 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic IntelliJUIDesigner (r1.34 - 22 Jan 2005 - AlexeyEfimov)
Changed:
<
<
>
>


 <<O>>  Difference Topic IntelliJUIDesigner (r1.33 - 01 Mar 2004 - AlexeyEfimov)
Added:
>
>


 <<O>>  Difference Topic IntelliJUIDesigner (r1.32 - 20 Jan 2004 - AlexeyEfimov)
Deleted:
<
<


 <<O>>  Difference Topic IntelliJUIDesigner (r1.31 - 17 Jan 2004 - AlexeyEfimov)
Changed:
<
<

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime (build 998)" date="1071836412" path="D:\TOOLS\idea\Aurora\lib\forms_rt.jar" size="31599" user="AlexeyEfimov" version="1.3"}%

>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime (build 1089)" date="1074377708" path="D:\TOOLS\idea\Aurora\lib\forms_rt.jar" size="31627" user="AlexeyEfimov" version="1.4"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.30 - 20 Dec 2003 - TWikiGuest)
Changed:
<
<

Follows plugins or applications usin UIDesigner in implementation:

>
>

The following plugins or applications using UIDesigner are currently being implemented:


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

  • javac2.jar IntelliJ IDEA The UIDesigner runtime and ANT task for compilation forms.
>
>

Changed:
<
<

UIDesigner Suggesstions

>
>

UIDesigner Development

Changed:
<
<

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime (build 963 and above)" date="1066925608" path="D:\TOOLS\ideaAurora\plugins\uiDesigner\lib\forms_rt.jar" size="16047" user="AlexeyEfimov" version="1.2"}%

>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime (build 998)" date="1071836412" path="D:\TOOLS\idea\Aurora\lib\forms_rt.jar" size="31599" user="AlexeyEfimov" version="1.3"}%

Changed:
<
<

%META:FILEATTACHMENT{name="javac2.jar" attr="" comment="UI Designer runtime and ANT task (build 977)" date="1069326834" path="D:\TOOLS\idea\Aurora\lib\javac2.jar" size="63983" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="javac2.jar" attr="h" comment="UI Designer runtime and ANT task (build 977)" date="1069326834" path="D:\TOOLS\idea\Aurora\lib\javac2.jar" size="63983" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.28 - 20 Nov 2003 - AlexeyEfimov)
Changed:
<
<

>
>

  • javac2.jar IntelliJ IDEA The UIDesigner runtime and ANT task for compilation forms.
Changed:
<
<

%META:FILEATTACHMENT{name="forms_rt.jar" attr="h" comment="UI Designer runtime" date="1066925608" path="D:\TOOLS\ideaAurora\plugins\uiDesigner\lib\forms_rt.jar" size="16047" user="AlexeyEfimov" version="1.2"}%

>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime (build 963 and above)" date="1066925608" path="D:\TOOLS\ideaAurora\plugins\uiDesigner\lib\forms_rt.jar" size="16047" user="AlexeyEfimov" version="1.2"}%

Added:
>
>

%META:FILEATTACHMENT{name="javac2.jar" attr="" comment="UI Designer runtime and ANT task (build 977)" date="1069326834" path="D:\TOOLS\idea\Aurora\lib\javac2.jar" size="63983" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.27 - 29 Oct 2003 - AlexeyEfimov)
Added:
>
>

Deleted:
<
<


 <<O>>  Difference Topic IntelliJUIDesigner (r1.26 - 23 Oct 2003 - AlexeyEfimov)
Changed:
<
<

%META:FILEATTACHMENT{name="forms_rt.jar" attr="h" comment="UI Designer runtime" date="1060675262" path="D:\TOOLS\ideaAurora\lib\forms_rt.jar" size="15879" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="h" comment="UI Designer runtime" date="1066925608" path="D:\TOOLS\ideaAurora\plugins\uiDesigner\lib\forms_rt.jar" size="16047" user="AlexeyEfimov" version="1.2"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.25 - 18 Sep 2003 - AlexeyEfimov)
Added:
>
>


 <<O>>  Difference Topic IntelliJUIDesigner (r1.24 - 01 Sep 2003 - AlexeyEfimov)
Changed:
<
<

>
>

Deleted:
<
<

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="h" comment="Sample of simple form by UI designer (for 859)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%

Changed:
<
<

%META:FILEATTACHMENT{name="default-palete.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061536708" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete.jar" size="14004" user="AlexeyEfimov" version="1.2"}% %META:FILEATTACHMENT{name="default-palete-large-icons.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061536746" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete-large-icons.jar" size="5491" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="default-palete.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1062402433" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete.jar" size="4794" user="AlexeyEfimov" version="1.3"}% %META:FILEATTACHMENT{name="default-palete-large-icons.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1062402447" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete-large-icons.jar" size="3244" user="AlexeyEfimov" version="1.2"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.23 - 22 Aug 2003 - AlexeyEfimov)
Changed:
<
<

>
>

Changed:
<
<

%META:FILEATTACHMENT{name="default-palete.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061485736" moveby="AlexeyEfimov" movedto="Main.IntelliJUIDesigner" movedwhen="1061485972" movefrom="Main.IntelliJUIDesignerGuide" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete.jar" size="6319" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="default-palete.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061536708" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete.jar" size="14004" user="AlexeyEfimov" version="1.2"}% %META:FILEATTACHMENT{name="default-palete-large-icons.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061536746" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete-large-icons.jar" size="5491" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.22 - 21 Aug 2003 - AlexeyEfimov)
Changed:
<
<

UIDesigner Runtime

>
>

UIDesigner Runtime and Addons

Added:
>
>

Added:
>
>

Added:
>
>

%META:FILEATTACHMENT{name="default-palete.jar" attr="h" comment="Default Pelete Extension for UIDesigner" date="1061485736" moveby="AlexeyEfimov" movedto="Main.IntelliJUIDesigner" movedwhen="1061485972" movefrom="Main.IntelliJUIDesignerGuide" path="D:\development\projects\JetBrains\core\UIDesigner\default-palete.jar" size="6319" user="AlexeyEfimov" version="1.1"}%


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


 <<O>>  Difference Topic IntelliJUIDesigner (r1.20 - 21 Aug 2003 - AlexeyEfimov)
Changed:
<
<

Suggestions of improvements

>
>

UIDesigner Runtime

Changed:
<
<

Please add your suggestions in follow table.

>
>

Changed:
<
<

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.

>
>

UIDesigner Suggesstions

Changed:
<
<

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

>
>

Changed:
<
<

Since build 823 IntelliJ has an UI Designer. It's a tool for creating UI forms definitions and assigning them to your Swing classes.

tip.gif In build 856 to XML form definition placed namespace. This is reason to not opened previos forms in UIDesigner. To avoid this add folowing attribute to form tag:

xmlns="http://www.intellij.com/uidesigner/form/" 

IntelliJ add the private method $$$setupUI$$$ with UI layout initialization for your Swing class. It uses the internal package com.intellij.uiDesigner.core and you must add to project paths of your project jar file:

%IDEA_HOME%/plugins/uiDesigner/lib/forms_rt.jar
I prepared a sample project to help you understand how it works and placed it here (see attached file).

-- AlexeyEfimov - 19 Jun 2003

(parafrased from the javadocs inside the example class, for those who want a quick answer)

To create a UI with the UI designer you must:

  • Create a Swing class (JPanel for example) and put in it all controls, and listeners.
  • Create the UI using the UI designer and bind the From to your class name in the Form properties. Also bind all the control class members to control of the form via the properties of each control.

-- RafaelAlvarez - 21 Jun 2003

Removing UIDesigner from IntelliJ IDEA

tip.gif In build 833 UIDesigner maked as plugin extension. So, if you want to remove it from plugins directory, you will place forms_rt.jar into %IDEA_HOME%\lib directory. Otherwise, if you simple remove UIDesigner plugin from plugins directory, IntelliJ will not work stable, becose some UI components in IntelliJ already used this extension to building their UI forms (for example Project Settings will not works until you place forms_rt.jar into %IDEA_HOME%\lib directory).

In build 856 you can remove this plugin from plugins directory, IntelliJ will work OK with out UIDesigner.

-- AlexeyEfimov - 01 Jul 2003

>
>

Changed:
<
<

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime" date="1060675262" path="D:\TOOLS\ideaAurora\lib\forms_rt.jar" size="15879" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="UIDesignerSample-0.0.1.zip" attr="" comment="Demonstration of using UIDesigner" date="1061399404" path="D:\development\projects\JetBrains\samples\UIDesignerSample-0.0.1.zip" size="11808" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="h" comment="UI Designer runtime" date="1060675262" path="D:\TOOLS\ideaAurora\lib\forms_rt.jar" size="15879" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.19 - 20 Aug 2003 - AlexeyEfimov)
Changed:
<
<

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 859)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%

>
>

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="h" comment="Sample of simple form by UI designer (for 859)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%

Added:
>
>

%META:FILEATTACHMENT{name="UIDesignerSample-0.0.1.zip" attr="" comment="Demonstration of using UIDesigner" date="1061399404" path="D:\development\projects\JetBrains\samples\UIDesignerSample-0.0.1.zip" size="11808" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.18 - 20 Aug 2003 - AlexeyEfimov)
Added:
>
>

Documentation and Guidelines


 <<O>>  Difference Topic IntelliJUIDesigner (r1.17 - 12 Aug 2003 - AlexeyEfimov)
Added:
>
>

Success stories

Follows plugins or applications usin UIDesigner in implementation:

Added:
>
>

%META:FILEATTACHMENT{name="forms_rt.jar" attr="" comment="UI Designer runtime" date="1060675262" path="D:\TOOLS\ideaAurora\lib\forms_rt.jar" size="15879" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.16 - 24 Jul 2003 - AlexeyEfimov)
Changed:
<
<

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

>
>

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


 <<O>>  Difference Topic IntelliJUIDesigner (r1.15 - 16 Jul 2003 - AlexeyEfimov)
Added:
>
>

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.

Changed:
<
<

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.   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. 2 AlexeyEfimov
Icon for file type Form Now it has not icon assigned for UI forms in project's tree view   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.   AlexeyEfimov
"Forms" tab The "Forms" tab in Project View, like an "Project", "Sources" or "Classpaths" droptabs.   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. 1 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. 1 Sergei S. Ivanov

>
>

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


 <<O>>  Difference Topic IntelliJUIDesigner (r1.14 - 16 Jul 2003 - JoeyEdelstein)
Changed:
<
<

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. 1 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. 2 AlexeyEfimov


 <<O>>  Difference Topic IntelliJUIDesigner (r1.13 - 15 Jul 2003 - AlexeyEfimov)
Changed:
<
<

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.   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. 1 AlexeyEfimov


 <<O>>  Difference Topic IntelliJUIDesigner (r1.12 - 15 Jul 2003 - AlexeyEfimov)
Added:
>
>

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. 1 Sergei S. Ivanov


 <<O>>  Difference Topic IntelliJUIDesigner (r1.11 - 15 Jul 2003 - AlexeyEfimov)
Changed:
<
<

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 856)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%

>
>

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 859)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.10 - 11 Jul 2003 - AlexeyEfimov)
Changed:
<
<

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.   GeoffreyMitchell

>
>

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. 1 GeoffreyMitchell


 <<O>>  Difference Topic IntelliJUIDesigner (r1.9 - 10 Jul 2003 - GeoffreyMitchell)
Added:
>
>

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.   GeoffreyMitchell


 <<O>>  Difference Topic IntelliJUIDesigner (r1.8 - 10 Jul 2003 - AlexeyEfimov)
Changed:
<
<

Suggessions to improvements

>
>

Suggestions of improvements

Added:
>
>

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.   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.   AlexeyEfimov
Icon for file type Form Now it has not icon assigned for UI forms in project's tree view   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.   AlexeyEfimov
"Forms" tab The "Forms" tab in Project View, like an "Project", "Sources" or "Classpaths" droptabs.   AlexeyEfimov

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


 <<O>>  Difference Topic IntelliJUIDesigner (r1.7 - 10 Jul 2003 - AlexeyEfimov)
Added:
>
>

Suggessions to improvements

Please add your suggestions in follow table.

Suggestion Description Votes Author


 <<O>>  Difference Topic IntelliJUIDesigner (r1.6 - 09 Jul 2003 - AlexeyEfimov)
Added:
>
>

tip.gif In build 856 to XML form definition placed namespace. This is reason to not opened previos forms in UIDesigner. To avoid this add folowing attribute to form tag:

xmlns="http://www.intellij.com/uidesigner/form/" 
Changed:
<
<

Since build 833 UIDesigner maked as plugin extension. So, if you want to remove it from plugins directory, you will place forms_rt.jar into %IDEA_HOME%\lib directory. Otherwise, if you simple remove UIDesigner plugin from plugins directory, IntelliJ will not work stable, becose some UI components in IntelliJ already used this extension to building their UI forms (for example Project Settings will not works until you place forms_rt.jar into %IDEA_HOME%\lib directory).

>
>

In build 833 UIDesigner maked as plugin extension. So, if you want to remove it from plugins directory, you will place forms_rt.jar into %IDEA_HOME%\lib directory. Otherwise, if you simple remove UIDesigner plugin from plugins directory, IntelliJ will not work stable, becose some UI components in IntelliJ already used this extension to building their UI forms (for example Project Settings will not works until you place forms_rt.jar into %IDEA_HOME%\lib directory).

In build 856 you can remove this plugin from plugins directory, IntelliJ will work OK with out UIDesigner.

Changed:
<
<

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 833)" date="1056049023" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7814" user="AlexeyEfimov" version="1.2"}%

>
>

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 856)" date="1057766772" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7286" user="AlexeyEfimov" version="1.3"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.5 - 01 Jul 2003 - AlexeyEfimov)
Changed:
<
<

IntelliJ UI Designer Tool Samples

>
>

IntelliJ UI Designer

Samples

Changed:
<
<

In the future, maybe this topic will contain some guidelines and tips & tricks for the UI designer! smile

>
>

Removing UIDesigner from IntelliJ IDEA

tip.gif Since build 833 UIDesigner maked as plugin extension. So, if you want to remove it from plugins directory, you will place forms_rt.jar into %IDEA_HOME%\lib directory. Otherwise, if you simple remove UIDesigner plugin from plugins directory, IntelliJ will not work stable, becose some UI components in IntelliJ already used this extension to building their UI forms (for example Project Settings will not works until you place forms_rt.jar into %IDEA_HOME%\lib directory).

-- AlexeyEfimov - 01 Jul 2003


 <<O>>  Difference Topic IntelliJUIDesigner (r1.4 - 21 Jun 2003 - RafaelAlvarez)
Added:
>
>

(parafrased from the javadocs inside the example class, for those who want a quick answer)

To create a UI with the UI designer you must:

  • Create a Swing class (JPanel for example) and put in it all controls, and listeners.
  • Create the UI using the UI designer and bind the From to your class name in the Form properties. Also bind all the control class members to control of the form via the properties of each control.

-- RafaelAlvarez - 21 Jun 2003


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

IntelliJ adds the method $$$setupUI$$$ with UI layout initialization for your Swing class. It uses the internal package com.intellij.uiDesigner.core, but this package is (currently) expected in idea_rt.jar. Therefore, you must have idea.jar in your project class path, but this really slows down IntelliJ itself. So, I copied this package into a separate jar file and put it into the classpath. Maybe it's not right, because the license says I can't do it...

>
>

IntelliJ add the private method $$$setupUI$$$ with UI layout initialization for your Swing class. It uses the internal package com.intellij.uiDesigner.core and you must add to project paths of your project jar file:

%IDEA_HOME%/plugins/uiDesigner/lib/forms_rt.jar
Changed:
<
<

-- AlexeyEfimov - 11 Jun 2003

>
>

-- AlexeyEfimov - 19 Jun 2003

Changed:
<
<

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer" date="1055335092" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="24401" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer (for 833)" date="1056049023" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="7814" user="AlexeyEfimov" version="1.2"}%


 <<O>>  Difference Topic IntelliJUIDesigner (r1.2 - 12 Jun 2003 - YannCebron)
Changed:
<
<

Since build 823 IntelliJ have an UI Designer. This is tool for creating UI forms definitions and assigning it to your Swing classes.

>
>

Since build 823 IntelliJ has an UI Designer. It's a tool for creating UI forms definitions and assigning them to your Swing classes.

Changed:
<
<

IntelliJ add $$$setupUI$$$ to your class with UI layout initialization for you Swing class. Now this method used internal package com.intellij.uiDesigner.core, but this package is expected in idea_rt.jar. And you must have idea.jar in project class path, but it realy slow down IntelliJ itself. So, i had copy this package into separate jar file and set in into classpath. Maybe it not right, becose license says what i can't do it...

>
>

IntelliJ adds the method $$$setupUI$$$ with UI layout initialization for your Swing class. It uses the internal package com.intellij.uiDesigner.core, but this package is (currently) expected in idea_rt.jar. Therefore, you must have idea.jar in your project class path, but this really slows down IntelliJ itself. So, I copied this package into a separate jar file and put it into the classpath. Maybe it's not right, because the license says I can't do it...

Changed:
<
<

I prepare my sample project to help understand how it works and placed it here (see attached file).

>
>

I prepared a sample project to help you understand how it works and placed it here (see attached file).

Changed:
<
<

In feature, maybe this topic will conteins some guidelines and tiptricks for it great tool! smile

>
>

In the future, maybe this topic will contain some guidelines and tips & tricks for the UI designer! smile


 <<O>>  Difference Topic IntelliJUIDesigner (r1.1 - 11 Jun 2003 - AlexeyEfimov)
Added:
>
>

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

IntelliJ UI Designer Tool Samples

Since build 823 IntelliJ have an UI Designer. This is tool for creating UI forms definitions and assigning it to your Swing classes.

IntelliJ add $$$setupUI$$$ to your class with UI layout initialization for you Swing class. Now this method used internal package com.intellij.uiDesigner.core, but this package is expected in idea_rt.jar. And you must have idea.jar in project class path, but it realy slow down IntelliJ itself. So, i had copy this package into separate jar file and set in into classpath. Maybe it not right, becose license says what i can't do it...

I prepare my sample project to help understand how it works and placed it here (see attached file).

-- AlexeyEfimov - 11 Jun 2003

In feature, maybe this topic will conteins some guidelines and tiptricks for it great tool! smile %META:FILEATTACHMENT{name="intellijTestCases-uiDesigner.zip" attr="" comment="Sample of simple form by UI designer" date="1055335092" path="D:\Development\java\intellijTestCases\intellijTestCases-uiDesigner.zip" size="24401" user="AlexeyEfimov" version="1.1"}%


View | Diffs | r1.34 | > | r1.33 | > | r1.32 | 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 - 11 Jun 2003 - 12:38 GMT - AlexeyEfimov
Revision r1.34 - 22 Jan 2005 - 16:00 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.