public class LwContainer extends LwComponent implements IContainer
Modifier and Type | Field and Description |
---|---|
protected LayoutSerializer |
myLayoutSerializer |
myClientProperties, myDelegeeClientProperties
Constructor and Description |
---|
LwContainer(java.lang.String className) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(ComponentVisitor visitor) |
void |
addComponent(LwComponent component) |
boolean |
areChildrenExclusive()
Returns true if only one of the children of the component can be visible at a time
(for example, the component is a tabbed pane or a container with CardLayout).
|
static LwComponent |
createComponentFromTag(Element child) |
protected java.awt.LayoutManager |
createInitialLayout() |
ColorDescriptor |
getBorderColor() |
java.awt.Insets |
getBorderSize() |
StringDescriptor |
getBorderTitle() |
ColorDescriptor |
getBorderTitleColor() |
FontDescriptor |
getBorderTitleFont() |
int |
getBorderTitleJustification() |
int |
getBorderTitlePosition() |
BorderType |
getBorderType() |
IComponent |
getComponent(int index) |
int |
getComponentCount() |
java.awt.LayoutManager |
getLayout() |
java.lang.String |
getLayoutManager() |
int |
indexOfComponent(IComponent lwComponent) |
boolean |
isGrid() |
boolean |
isXY() |
void |
read(Element element,
PropertiesProvider provider) |
protected void |
readBorder(Element element)
'border' is required subtag
|
protected void |
readChildren(Element element,
PropertiesProvider provider)
'children' is required attribute
|
protected void |
readConstraintsForChild(Element element,
LwComponent component)
TODO[anton,vova] looks like it is better to pass contraints tag
|
protected void |
readLayout(Element element)
'xy' or 'grid'
|
protected void |
readNoLayout(Element element,
PropertiesProvider provider) |
void |
setBorderTitle(StringDescriptor title) |
void |
setBorderType(BorderType type) |
void |
setLayout(java.awt.LayoutManager layout) |
void |
setLayoutManager(java.lang.String layoutManager) |
getAssignedIntrospectedProperties, getBinding, getBounds, getClientProperty, getComponentClassName, getConstraints, getCustomLayoutConstraints, getDelegeeClientProperties, getErrorComponentProperties, getId, getModifiedProperties, getParent, getParentContainer, getPropertyValue, isCustomCreate, isDefaultBinding, putClientProperty, readBase, readConstraints, readProperties, setBinding, setBounds, setCustomLayoutConstraints, setId, setParent, setPropertyValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBinding, getClientProperty, getComponentClassName, getConstraints, getCustomLayoutConstraints, getId, getModifiedProperties, getParentContainer, isCustomCreate, putClientProperty
protected LayoutSerializer myLayoutSerializer
protected java.awt.LayoutManager createInitialLayout()
public final java.awt.LayoutManager getLayout()
public final void setLayout(java.awt.LayoutManager layout)
public java.lang.String getLayoutManager()
public final boolean isGrid()
public final boolean isXY()
isXY
in interface IContainer
public final void addComponent(LwComponent component)
component
- component to be added.java.lang.IllegalArgumentException
- if component
is null
java.lang.IllegalArgumentException
- if component
already exist in the
containerpublic final IComponent getComponent(int index)
getComponent
in interface IContainer
public final int getComponentCount()
getComponentCount
in interface IContainer
public int indexOfComponent(IComponent lwComponent)
indexOfComponent
in interface IContainer
public final BorderType getBorderType()
getBorderType
in interface IContainer
null
.BorderType
public boolean accept(ComponentVisitor visitor)
accept
in interface IComponent
accept
in class LwComponent
public final void setBorderType(BorderType type)
java.lang.IllegalArgumentException
- if type
is null
BorderType
public final StringDescriptor getBorderTitle()
getBorderTitle
in interface IContainer
null
.public final void setBorderTitle(StringDescriptor title)
title
- new border's title. null
means that
the containr doesn't have have titled border.public int getBorderTitleJustification()
public int getBorderTitlePosition()
public FontDescriptor getBorderTitleFont()
public ColorDescriptor getBorderTitleColor()
public java.awt.Insets getBorderSize()
public ColorDescriptor getBorderColor()
protected void readConstraintsForChild(Element element, LwComponent component)
element
- XML element which should contains 'constraints' tagprotected final void readBorder(Element element)
protected final void readChildren(Element element, PropertiesProvider provider) throws java.lang.Exception
java.lang.Exception
public static LwComponent createComponentFromTag(Element child) throws java.lang.Exception
java.lang.Exception
protected final void readLayout(Element element)
public void setLayoutManager(java.lang.String layoutManager)
public void read(Element element, PropertiesProvider provider) throws java.lang.Exception
read
in class LwComponent
provider
- can be null if no component classes should not be createdjava.lang.Exception
protected void readNoLayout(Element element, PropertiesProvider provider) throws java.lang.Exception
java.lang.Exception
public boolean areChildrenExclusive()
IComponent
areChildrenExclusive
in interface IComponent
areChildrenExclusive
in class LwComponent