|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.Identifiable
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractComponentContainer
com.itmill.toolkit.ui.OrderedLayout
com.itmill.toolkit.ui.ExpandLayout
public class ExpandLayout
Our layouts (except custom layout of course) don't currently work at all with relative widths. This layout tries to cope this issue. basically this is ordered layout which has sizeable interface 100 % height & width by default all contained components may also have sizeable interfaces sizes can be used to build flexible layout where some component gets all the space other components don't use : SizeableLayout l = new SizeableLayout(); l.addComponent(menu); l.addComponent(main); l.setComponentSize(main, new Size(100, 100)); l.addComponent(footer);
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.ComponentContainer |
|---|
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Field Summary |
|---|
| Fields inherited from class com.itmill.toolkit.ui.OrderedLayout |
|---|
ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL |
| Fields inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNITS_ROWS |
| Constructor Summary | |
|---|---|
ExpandLayout()
|
|
| Method Summary | |
|---|---|
void |
addComponent(Component c)
Add a component into this container. |
void |
addComponent(Component c,
int index)
Adds a component into indexed position in this container. |
void |
addComponentAsFirst(Component c)
Adds a component into this container. |
void |
expand(Component c)
|
int |
getHeight()
Gets the height of the object. |
int |
getHeightUnits()
Gets the height property units. |
String |
getTag()
Gets the component UIDL tag. |
int |
getWidth()
Gets the width of the object. |
int |
getWidthUnits()
Gets the width property units. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeComponent(Component c)
Removes the component from this container. |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replaces the component in the container with another one without changing position. |
void |
setHeight(int height)
Sets the height of the object. |
void |
setHeightUnits(int units)
Sets the height property units. |
void |
setWidth(int width)
Sets the width of the object. |
void |
setWidthUnits(int units)
Sets the width property units. |
| Methods inherited from class com.itmill.toolkit.ui.OrderedLayout |
|---|
getComponentIterator, getOrientation, setOrientation |
| Methods inherited from class com.itmill.toolkit.ui.AbstractComponentContainer |
|---|
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
| Methods inherited from class com.itmill.toolkit.terminal.Identifiable |
|---|
getDebugId, getUIID, setDebugId, setUIID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.itmill.toolkit.ui.ComponentContainer |
|---|
addListener, addListener, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
| Methods inherited from interface com.itmill.toolkit.ui.Component |
|---|
addListener, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isReadOnly, isVisible, removeListener, setEnabled, setParent, setReadOnly, setStyle, setVisible |
| Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
addListener, paint, removeListener, requestRepaint, requestRepaintRequests |
| Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
|---|
changeVariables, dependsOn, getDirectDependencies, isImmediate, removeDirectDependency |
| Constructor Detail |
|---|
public ExpandLayout()
| Method Detail |
|---|
public void expand(Component c)
c - Component which container will be maximizedpublic String getTag()
OrderedLayout
getTag in class OrderedLayout
public void paintContent(PaintTarget target)
throws PaintException
OrderedLayout
paintContent in class OrderedLayouttarget - the Paint Event.
PaintException - if the paint operation failed.
public void addComponent(Component c,
int index)
OrderedLayout
addComponent in class OrderedLayoutc - the component to be added.index - the Index of the component position. The components currently
in and after the position are shifted forwards.public void addComponent(Component c)
OrderedLayout
addComponent in interface ComponentContaineraddComponent in class OrderedLayoutc - the component to be added.ComponentContainer.addComponent(Component)public void addComponentAsFirst(Component c)
OrderedLayout
addComponentAsFirst in class OrderedLayoutc - the component to be added.public void removeComponent(Component c)
OrderedLayout
removeComponent in interface ComponentContainerremoveComponent in class OrderedLayoutc - the component to be removed.ComponentContainer.removeComponent(Component)
public void replaceComponent(Component oldComponent,
Component newComponent)
ComponentContainerThis 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 ComponentContainerreplaceComponent in class OrderedLayoutoldComponent - the old component that will be replaced.newComponent - the new component to be replaced.public int getHeight()
Sizeable
getHeight in interface Sizeablepublic int getHeightUnits()
Sizeable
getHeightUnits in interface Sizeablepublic int getWidth()
Sizeable
getWidth in interface Sizeablepublic int getWidthUnits()
Sizeable
getWidthUnits in interface Sizeablepublic void setHeight(int height)
Sizeable
setHeight in interface Sizeableheight - the height of the object in units specified by heightUnits
property.public void setHeightUnits(int units)
Sizeable
setHeightUnits in interface Sizeableunits - the units used in height property.public void setWidth(int width)
Sizeable
setWidth in interface Sizeablewidth - the width of the object in units specified by widthUnits
property.public void setWidthUnits(int units)
Sizeable
setWidthUnits in interface Sizeableunits - the units used in width property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||