public class ContainerLayout
extends java.lang.Object
implements java.awt.LayoutManager2
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<java.lang.String> |
columnSpecs |
(package private) java.util.LinkedHashMap<java.lang.String,CellConstraints> |
componentConstraints |
(package private) java.util.Map<java.lang.String,ComponentDef> |
componentNameToComponentDef |
(package private) java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> |
componentNameToCustomProps |
(package private) java.util.Map<java.awt.Component,java.lang.String> |
componentsToNames |
(package private) FormLayout |
formLayout |
(package private) java.lang.String |
name |
(package private) java.util.List<java.lang.String> |
rowSpecs |
Constructor and Description |
---|
ContainerLayout(java.lang.String name,
java.lang.String columnSpecs,
java.lang.String rowSpecs) |
Modifier and Type | Method and Description |
---|---|
void |
addCellConstraints(java.lang.String name,
CellConstraints constraints) |
void |
addColumnSpec(int index,
java.lang.String columnSpec) |
void |
addColumnSpec(java.lang.String columnSpec) |
void |
addComponent(java.lang.String componentName,
ComponentDef componentDef,
CellConstraints constraints) |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints) |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp) |
void |
addRowSpec(int index,
java.lang.String rowSpec) |
void |
addRowSpec(java.lang.String rowSpec) |
void |
constraintsChanged(java.lang.String name,
CellConstraints constraints) |
java.util.LinkedHashMap<java.lang.String,CellConstraints> |
getCellConstraints() |
CellConstraints |
getCellConstraints(java.lang.String name) |
int |
getColumnCount() |
java.lang.String |
getColumnSpec(int index) |
java.util.List<java.lang.String> |
getColumnSpecs() |
java.lang.String |
getColumnSpecsString() |
java.awt.Component |
getComponentByName(java.lang.String name)
Returns the component with the given name or null if not found
|
CellConstraints |
getComponentConstraints(java.awt.Component component) |
ComponentDef |
getComponentDef(java.lang.String componentName) |
java.lang.String |
getComponentName(java.awt.Component component) |
protected java.util.Map<java.awt.Component,java.lang.String> |
getComponentsToNames() |
java.util.Map<java.lang.String,java.lang.Object> |
getCustomProperties(java.lang.String componentName)
Returns custom properties for the component.
|
float |
getLayoutAlignmentX(java.awt.Container target) |
float |
getLayoutAlignmentY(java.awt.Container target) |
FormLayout.LayoutInfo |
getLayoutInfo(java.awt.Container container) |
java.lang.String |
getName()
Returns the value of the name property
|
int |
getRowCount() |
java.lang.String |
getRowSpec(int index) |
java.util.List<java.lang.String> |
getRowSpecs() |
java.lang.String |
getRowSpecsString() |
void |
invalidateLayout(java.awt.Container target) |
void |
layoutContainer(java.awt.Container parent) |
static void |
main(java.lang.String[] args) |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent) |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent) |
CellConstraints |
removeCellConstraints(java.lang.String name) |
java.lang.String |
removeColumnSpec(int index) |
void |
removeLayoutComponent(java.awt.Component comp) |
java.lang.String |
removeRowSpec(int index) |
void |
setCellConstraints(java.lang.String componentName,
CellConstraints constraints) |
void |
setColumnSpec(int index,
java.lang.String columnSpec) |
void |
setName(java.lang.String name)
Registers the value of the name property
|
void |
setProperty(java.lang.String componentName,
java.lang.String property,
java.lang.Object value)
Set a user defined property for this component so that the tool can manage
the properties of the component thus reducing the burden on the user
|
void |
setRowSpec(int index,
java.lang.String rowSpec) |
java.util.List<java.lang.String> rowSpecs
java.util.List<java.lang.String> columnSpecs
java.util.LinkedHashMap<java.lang.String,CellConstraints> componentConstraints
java.util.Map<java.awt.Component,java.lang.String> componentsToNames
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> componentNameToCustomProps
java.util.Map<java.lang.String,ComponentDef> componentNameToComponentDef
FormLayout formLayout
java.lang.String name
public ContainerLayout(java.lang.String name, java.lang.String columnSpecs, java.lang.String rowSpecs)
protected java.util.Map<java.awt.Component,java.lang.String> getComponentsToNames()
public void setName(java.lang.String name)
name
- The value of the propertypublic java.lang.String getName()
public java.util.Map<java.lang.String,java.lang.Object> getCustomProperties(java.lang.String componentName)
public void setProperty(java.lang.String componentName, java.lang.String property, java.lang.Object value)
public void setCellConstraints(java.lang.String componentName, CellConstraints constraints)
public java.util.LinkedHashMap<java.lang.String,CellConstraints> getCellConstraints()
public void addComponent(java.lang.String componentName, ComponentDef componentDef, CellConstraints constraints)
public ComponentDef getComponentDef(java.lang.String componentName)
public java.lang.String getColumnSpecsString()
public java.lang.String getRowSpecsString()
public int getRowCount()
public int getColumnCount()
public java.util.List<java.lang.String> getRowSpecs()
public java.util.List<java.lang.String> getColumnSpecs()
public void constraintsChanged(java.lang.String name, CellConstraints constraints)
public CellConstraints getCellConstraints(java.lang.String name)
public void addCellConstraints(java.lang.String name, CellConstraints constraints)
public CellConstraints removeCellConstraints(java.lang.String name)
public void addColumnSpec(java.lang.String columnSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getRowSpec(int index)
public java.lang.String getColumnSpec(int index)
public void setRowSpec(int index, java.lang.String rowSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setColumnSpec(int index, java.lang.String columnSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void addRowSpec(java.lang.String rowSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String removeRowSpec(int index)
public java.lang.String removeColumnSpec(int index)
public void addRowSpec(int index, java.lang.String rowSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void addColumnSpec(int index, java.lang.String columnSpec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String getComponentName(java.awt.Component component)
public java.awt.Component getComponentByName(java.lang.String name)
public CellConstraints getComponentConstraints(java.awt.Component component)
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
public FormLayout.LayoutInfo getLayoutInfo(java.awt.Container container)
public void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public static void main(java.lang.String[] args)