Class SingleFiledLayout
java.lang.Object
com.inductiveautomation.ignition.client.util.gui.tablelayout.SingleFiledLayout
- All Implemented Interfaces:
LayoutManager
,Serializable
SingleFiledLayout lays out components singled filed. This layout manager is like FlowLayout except that all
components are placed in a single row or column.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Bottom justify componentsstatic final int
Center componentsstatic final int
Align components in a columnstatic int
Default gap -- derived classes may overridestatic final int
Full justify componentsprotected int
Space between components in pixelsprotected int
LEFT, TOP, CENTER, FULL, BOTTOM, RIGHT -- how should components of different sizes be alignedstatic final int
Left justify componentsprotected int
ROW or COLUMN -- should the components be aligned in a row or columnstatic final int
Right justify componentsstatic final int
Align components in a rowstatic final int
Top justify components -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance of SingleFiledLayout that will align components in a column using the default gap and LEFT justification.SingleFiledLayout
(int orientation) Constructs an instance of SingleFiledLayout using the default gap and LEFT or TOP justification.SingleFiledLayout
(int orientation, int justification, int gap) Constructs an instance of SingleFiledLayout. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(String name, Component component) Adds the specified component with the specified name to the layout.void
layoutContainer
(Container container) To lay out the specified container using this layout.minimumLayoutSize
(Container container) Determines the minimum size of the container argument using this layout.preferredLayoutSize
(Container container) Determines the preferred size of the container argument using this layout.void
removeLayoutComponent
(Component component) Removes the specified component with the specified name from the layout.
-
Field Details
-
COLUMN
public static final int COLUMNAlign components in a column- See Also:
-
ROW
public static final int ROWAlign components in a row- See Also:
-
LEFT
public static final int LEFTLeft justify components- See Also:
-
TOP
public static final int TOPTop justify components- See Also:
-
CENTER
public static final int CENTERCenter components- See Also:
-
FULL
public static final int FULLFull justify components- See Also:
-
BOTTOM
public static final int BOTTOMBottom justify components- See Also:
-
RIGHT
public static final int RIGHTRight justify components- See Also:
-
DEFAULT_GAP
public static int DEFAULT_GAPDefault gap -- derived classes may override -
orientation
protected int orientationROW or COLUMN -- should the components be aligned in a row or column -
justification
protected int justificationLEFT, TOP, CENTER, FULL, BOTTOM, RIGHT -- how should components of different sizes be aligned -
gap
protected int gapSpace between components in pixels
-
-
Constructor Details
-
SingleFiledLayout
public SingleFiledLayout()Constructs an instance of SingleFiledLayout that will align components in a column using the default gap and LEFT justification. -
SingleFiledLayout
public SingleFiledLayout(int orientation) Constructs an instance of SingleFiledLayout using the default gap and LEFT or TOP justification.- Parameters:
orientation
- ROW or COLUMN -- should the components be aligned in a row or column
-
SingleFiledLayout
public SingleFiledLayout(int orientation, int justification, int gap) Constructs an instance of SingleFiledLayout.- Parameters:
orientation
- ROW or COLUMN -- should the components be aligned in a row or columnjustification
- LEFT, TOP, CENTER, FULL, BOTTOM, RIGHT -- how should components of different sizes be alignedgap
- space between components in pixels
-
-
Method Details
-
layoutContainer
To lay out the specified container using this layout. This method repositions the components in the specified target container.User code should not have to call this method directly.
- Specified by:
layoutContainer
in interfaceLayoutManager
- Parameters:
container
- container being served by this layout manager
-
preferredLayoutSize
Determines the preferred size of the container argument using this layout. The preferred size is the smallest size that, if used for the container's size, will ensure that no component is truncated when the component is its preferred size.- Specified by:
preferredLayoutSize
in interfaceLayoutManager
- Parameters:
container
- container being served by this layout manager- Returns:
- a dimension indicating the container's preferred size
-
minimumLayoutSize
Determines the minimum size of the container argument using this layout. The minimum size is the smallest size that, if used for the container's size, will ensure that no component is truncated. The minimum size is the preferred size.- Specified by:
minimumLayoutSize
in interfaceLayoutManager
- Parameters:
container
- container being served by this layout manager- Returns:
- a dimension indicating the container's minimum size
-
addLayoutComponent
Adds the specified component with the specified name to the layout.- Specified by:
addLayoutComponent
in interfaceLayoutManager
- Parameters:
name
- dummy parametercomponent
- component to add
-
removeLayoutComponent
Removes the specified component with the specified name from the layout.- Specified by:
removeLayoutComponent
in interfaceLayoutManager
- Parameters:
component
- component being removed
-