public abstract class Layout extends Object
Constructor and Description |
---|
Layout() |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Object value,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
Object |
cloneConstraint(Object constraint) |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
protected Component[] |
getChildrenInTraversalOrder(Container parent)
Gets the children of the parent container in the order that they should
be traversed when tabbing through a form.
|
Object |
getComponentConstraint(Component comp)
Returns the optional component constraint
|
abstract Dimension |
getPreferredSize(Container parent)
Returns the container preferred size
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isConstraintTracking()
If this method returns true, the addLayoutComponent method will be called when replacing a
layout for every component within the container
|
boolean |
isOverlapSupported()
This method returns true if the Layout allows Components to
Overlap.
|
abstract void |
layoutContainer(Container parent)
Layout the given parent container children
|
boolean |
obscuresPotential(Container parent)
Some layout managers can obscure their child components in some cases this
returns true if the basic underpinnings are in place for that.
|
boolean |
overridesTabIndices(Container parent)
If a layout specifies a different traversal order of its components than the
component index, then it should override this method to return true, and
it should also override
getChildrenInTraversalOrder(com.codename1.ui.Container)
to set the tab indices of a container's children. |
void |
removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
int |
updateTabIndices(Container parent,
int offset)
Updates the tab traversal order
|
public abstract void layoutContainer(Container parent)
parent
- the given parent containerpublic abstract Dimension getPreferredSize(Container parent)
parent
- the parent containerpublic void addLayoutComponent(Object value, Component comp, Container c)
value
- optional meta data information, like alignment orientationcomp
- the added component to the layoutc
- the parent containerpublic void removeLayoutComponent(Component comp)
comp
- the removed component from layoutpublic Object getComponentConstraint(Component comp)
comp
- the component whose constraint should be returnedpublic boolean isOverlapSupported()
public boolean equals(Object o)
public int hashCode()
public boolean isConstraintTracking()
public boolean obscuresPotential(Container parent)
parent
- parent containerpublic boolean overridesTabIndices(Container parent)
getChildrenInTraversalOrder(com.codename1.ui.Container)
to set the tab indices of a container's children.parent
- The parent component.public final int updateTabIndices(Container parent, int offset)
parent
- offset
- protected Component[] getChildrenInTraversalOrder(Container parent)
This should only be overridden if the Layout defines a different traversal order than the standard index order.
Layouts that implement this method, should override the overridesTabIndices(com.codename1.ui.Container)
method to return true.
parent
-