Module org.autogui
Package org.autogui

Annotation Interface GuiInits


@Retention(RUNTIME) @Target({TYPE,METHOD,FIELD}) public @interface GuiInits
aggregation of static preferences of components. It can control initial settings of some components.

For example, a split-pane has the flag for determining it's splitting orientation, vertical or horizontal. In the library, users can change the flag after GUI component construction. This annotation can provide the initial state of the flag as like the following:

    @GuiIncluded
    @GuiInits(splitPane = @GuiInitSplitPane(vertical=true))
    public class MyApp {
         @GuiIncluded
         public MySubPane1 getPane1() {
             ...
         }
         @GuiIncluded
         public MySubPane2 getPane2() {
             ...
         }
    }
 

This annotation can be attached to a class or a member. Where to attach it depends on the attribute (e.g. for splitPane(), it needs to be attached to a class, but for action(), to a method).

The settings provided by the annotation might be overwritten by user's preferences.

The default values of the annotation equals to abcense of the annotation.

Since:
1.8
  • Element Details

    • tabbedPane

      GuiInitTabbedPane tabbedPane
      attached to a class with sub-panes
       @GuiIncluded @GuiInits(tabbedPane=@GuiInitTabbedPane(noTab=true))
       public class C { @GuiIncluded public S1 s1(){...} @GuiIncluded public S1 s1(){...} ...}
       
      Default:
      @org.autogui.base.annotation.GuiInitTabbedPane
    • splitPane

      GuiInitSplitPane splitPane
      attached to a class with sub-panes
       @GuiIncluded @GuiInits(splitPane=@GuiInitSplitPane(vertical=true))
       public class C { @GuiIncluded public S1 s1(){...} @GuiIncluded public S1 s1(){...} ...}
       
      Default:
      @org.autogui.base.annotation.GuiInitSplitPane
    • window

      attached to the class of the application root
       @GuiIncluded @GuiInits(window=@GuiInitWindow(width=600, height=400))
       public class C { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitWindow
    • table

      attached to a property method or field of a collection-table
       @GuiIncluded @GuiInits(table=@GuiInitTable(rowFitToContent=true))
       public List<E> table() { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitTable
    • tableColumn

      GuiInitTableColumn tableColumn
      attached to a property method or field of a collection-column
       @GuiIncluded @GuiInits(tableColumn=@GuiInitTableColumn(width=300))
       public E column() { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitTableColumn
    • tableColumnString

      GuiInitTableColumnString tableColumnString
      attached to a property method or field of an editable string collection-column
       @GuiIncluded @GuiInits(tableColumnString=@GuiInitTableColumnString(editFinishByEnterAndKey=true))
       public String column() { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitTableColumnString
    • numberSpinner

      GuiInitNumberSpinner numberSpinner
      attached to a property method or field of a number-spinner
       @GuiIncluded @GuiInits(numberSpinner=@GuiInitNumberSpinner(format="#.##0"))
       public int prop() { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitNumberSpinner
    • action

      attached to an action method
       @GuiIncluded @GuiInits(action=@GuiInitAction(confirm=true))
       public void action() { ... }
       
      Default:
      @org.autogui.base.annotation.GuiInitAction