Annotation Type Layout


@Retention(RUNTIME)
@Target({TYPE,FIELD})
public @interface Layout
The main case of this annotation is the definition of how to lay out Containers. There are only a few attributes to have in mind while using this annotation.

CAUTION: If this annotation is used on a RootPaneContainer the layout of the content pane is changed.

Since:
1.0
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    boolean absoluteLayout  
    int align
    This attribute determines how each row distributes empty space.
    int axis  
    int columns
    This is the number of columns specified for the grid.
    int hgap
    Constructs a border layout with the horizontal gaps between components.
    int rows
    This is the number of rows specified for the grid.
    java.lang.Class<? extends java.awt.LayoutManager> value  
    int vgap
    Constructs a border layout with the vertical gaps between components.
  • Element Details

    • value

      java.lang.Class<? extends java.awt.LayoutManager> value
      Returns:
      the used layout manager type
      Default:
      java.awt.LayoutManager.class
    • absoluteLayout

      boolean absoluteLayout
      Returns:
      whether the absolute layout should be used
      Default:
      false
    • hgap

      int hgap
      Constructs a border layout with the horizontal gaps between components.
      Returns:
      The horizontal gaps between components
      Default:
      -1
    • vgap

      int vgap
      Constructs a border layout with the vertical gaps between components.
      Returns:
      The vertical gaps between components
      Default:
      -1
    • axis

      int axis
      Returns:
      The axis to lay out components along
      Default:
      -1
    • align

      int align
      This attribute determines how each row distributes empty space.
      Returns:
      how each row distributes empty space
      Default:
      -1
    • rows

      int rows
      This is the number of rows specified for the grid.
      Returns:
      the number of rows for the grid
      Default:
      -1
    • columns

      int columns
      This is the number of columns specified for the grid.
      Returns:
      the number of columns for the grid
      Default:
      -1