@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 booleanabsoluteLayoutintalignThis attribute determines how each row distributes empty space.intaxisintcolumnsThis is the number of columns specified for the grid.inthgapConstructs a border layout with the horizontal gaps between components.introwsThis is the number of rows specified for the grid.java.lang.Class<? extends java.awt.LayoutManager>valueintvgapConstructs 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 hgapConstructs a border layout with the horizontal gaps between components.- Returns:
- The horizontal gaps between components
- Default:
- -1
-
vgap
int vgapConstructs 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 alignThis attribute determines how each row distributes empty space.- Returns:
- how each row distributes empty space
- Default:
- -1
-
rows
int rowsThis is the number of rows specified for the grid.- Returns:
- the number of rows for the grid
- Default:
- -1
-
columns
int columnsThis is the number of columns specified for the grid.- Returns:
- the number of columns for the grid
- Default:
- -1
-