|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.base.ui.AbstractComponent | +--org.millstone.base.ui.AbstractComponentContainer | +--org.millstone.base.ui.OrderedLayout
Ordered layout. Ordered layout is a component container, which shows the subcomponents in the order of their addition in specified orientation.
Nested Class Summary |
Nested classes inherited from class org.millstone.base.ui.ComponentContainer |
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
Nested classes inherited from class org.millstone.base.ui.Component |
Component.Event, Component.Listener |
Nested classes inherited from class org.millstone.base.terminal.Paintable |
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary | |
static int |
ORIENTATION_HORIZONTAL
Components are to be layed out horizontally. |
static int |
ORIENTATION_VERTICAL
Components are to be layed out vertically. |
Constructor Summary | |
OrderedLayout()
Create a new ordered layout. |
|
OrderedLayout(int orientation)
Create a new ordered layout. |
Method Summary | |
void |
addComponent(Component c)
Add a component into this container. |
void |
addComponent(Component c,
int index)
Add a component into indexed position in this container. |
void |
addComponentAsFirst(Component c)
Add a component into this container. |
java.util.Iterator |
getComponentIterator()
Get component container iterator for going trough all the components in the container. |
int |
getOrientation()
Get the orientation of the container. |
java.lang.String |
getTag()
Get component UIDL tag. |
void |
paintContent(PaintTarget target)
Paint the content of this component. |
void |
removeComponent(Component c)
Remove a component from this container. |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replace a component in the container with another one without changing position. |
void |
setOrientation(int orientation)
Set the orientation of the container. |
Methods inherited from class org.millstone.base.ui.AbstractComponentContainer |
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.millstone.base.ui.ComponentContainer |
addListener, addListener, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
Methods inherited from interface org.millstone.base.ui.Component |
addListener, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, setEnabled, setParent, setReadOnly, setStyle, setVisible |
Methods inherited from interface org.millstone.base.terminal.Paintable |
addListener, paint, removeListener, requestRepaint, requestRepaintRequests |
Methods inherited from interface org.millstone.base.terminal.VariableOwner |
changeVariables, dependsOn, getDirectDependencies, removeDirectDependency |
Field Detail |
public static int ORIENTATION_VERTICAL
public static int ORIENTATION_HORIZONTAL
Constructor Detail |
public OrderedLayout()
public OrderedLayout(int orientation)
orientation
- Orientation of the layout.Method Detail |
public java.lang.String getTag()
getTag
in class AbstractComponent
public void addComponent(Component c)
addComponent
in interface ComponentContainer
addComponent
in class AbstractComponentContainer
c
- The component to be added.public void addComponentAsFirst(Component c)
c
- The component to be added.public void addComponent(Component c, int index)
c
- The component to be added.index
- Index of the component position.
The components currently in and after the position are shifted forwards.public void removeComponent(Component c)
removeComponent
in interface ComponentContainer
removeComponent
in class AbstractComponentContainer
c
- The component to be removed.public java.util.Iterator getComponentIterator()
getComponentIterator
in interface ComponentContainer
public void paintContent(PaintTarget target) throws PaintException
paintContent
in class AbstractComponent
target
- target UIDL stream where the component should paint
itself to
PaintException
- The paint operation failed.public int getOrientation()
public void setOrientation(int orientation)
orientation
- New value of property orientation.public void replaceComponent(Component oldComponent, Component newComponent)
ComponentContainer
This method replaces component with another one is such way that the new component overtakes the position of the old component. If the old component is not in the container, the new component is added to the container. If the both component are already in the container, their positions are swapped. Component attach and detach events should be taken care as with add and remove.
replaceComponent
in interface ComponentContainer
oldComponent
- The old component that will be replaced.newComponent
- The new component to be replaced
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |