|
||||||||||
| 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.Panel
public class Panel
Panel - a simple single component container.
| 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 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 | |
|---|---|
Panel()
Creates a new empty panel. |
|
Panel(Layout layout)
Creates a new empty panel with given layout. |
|
Panel(String caption)
Creates a new empty panel with caption. |
|
Panel(String caption,
Layout layout)
Creates a new empty panel with caption. |
|
| Method Summary | |
|---|---|
void |
addComponent(Component c)
Adds the component into this container. |
void |
attach()
Notifies the component that it is connected to an application. |
void |
changeVariables(Object source,
Map variables)
Called when one or more variables handled by the implementing class are changed. |
void |
componentAttachedToContainer(ComponentContainer.ComponentAttachEvent event)
A new component is attached to container. |
void |
componentDetachedFromContainer(ComponentContainer.ComponentDetachEvent event)
A component has been detached from container. |
void |
detach()
Notifies the component that it is detached from the application. |
Iterator |
getComponentIterator()
Gets the component container iterator for going trough all the components in the container. |
int |
getHeight()
Gets the height in pixels. |
int |
getHeightUnits()
Gets the height property units. |
Layout |
getLayout()
Gets the current layout of the panel. |
int |
getScrollOffsetX()
Gets scroll X offset. |
int |
getScrollOffsetY()
Gets scroll Y offset. |
String |
getTag()
Gets the component UIDL tag. |
int |
getWidth()
Gets the Width in pixel. |
int |
getWidthUnits()
Gets the width property units. |
boolean |
isScrollable()
Is the scrolling enabled. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeAllComponents()
Removes all components from this container. |
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 in pixels. |
void |
setHeightUnits(int units)
Sets the height units. |
void |
setLayout(Layout layout)
Sets the layout of the panel. |
void |
setScrollable(boolean isScrollingEnabled)
Enables or disables scrolling.. |
void |
setScrollOffsetX(int pixelsScrolledLeft)
Sets scroll X offset. |
void |
setScrollOffsetY(int pixelsScrolledDown)
Sets scroll Y offset. |
void |
setWidth(int width)
Sets the width in pixels. |
void |
setWidthUnits(int units)
Sets the width units. |
| Methods inherited from class com.itmill.toolkit.ui.AbstractComponentContainer |
|---|
addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, 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.Component |
|---|
addListener, childRequestedRepaint, 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 |
|---|
dependsOn, getDirectDependencies, isImmediate, removeDirectDependency |
| Constructor Detail |
|---|
public Panel()
public Panel(Layout layout)
layout - the layout used in the panel.public Panel(String caption)
caption - the caption used in the panel.
public Panel(String caption,
Layout layout)
caption - the caption of the panel.layout - the layout used in the panel.| Method Detail |
|---|
public Layout getLayout()
public void setLayout(Layout layout)
layout - the New layout of the panel.
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class AbstractComponenttarget - the Paint Event.
PaintException - if the paint operation failed.public String getTag()
getTag in class AbstractComponentpublic void addComponent(Component c)
addComponent in interface ComponentContaineraddComponent in class AbstractComponentContainerc - the component to be added.AbstractComponentContainer.addComponent(com.itmill.toolkit.ui.Component)public void removeComponent(Component c)
removeComponent in interface ComponentContainerremoveComponent in class AbstractComponentContainerc - The component to be added.AbstractComponentContainer.removeComponent(com.itmill.toolkit.ui.Component)public Iterator getComponentIterator()
getComponentIterator in interface ComponentContainerComponentContainer.getComponentIterator()public int getHeight()
getHeight in interface SizeableSizeable.getHeight()public int getWidth()
getWidth in interface SizeableSizeable.getWidth()public void setHeight(int height)
setHeight in interface Sizeableheight - the height to set.Sizeable.setHeight(int)public void setWidth(int width)
setWidth in interface Sizeablewidth - the width to set.Sizeable.setWidth(int)
public void changeVariables(Object source,
Map variables)
changeVariables in interface VariableOwnerchangeVariables in class AbstractComponentsource - the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - the Mapping from variable names to new variable values.VariableOwner.changeVariables(Object,
Map)public int getHeightUnits()
getHeightUnits in interface SizeableSizeable.getHeightUnits()public int getWidthUnits()
getWidthUnits in interface SizeableSizeable.getWidthUnits()public void setHeightUnits(int units)
setHeightUnits in interface Sizeableunits - the units used in height property.Sizeable.setHeightUnits(int)public void setWidthUnits(int units)
setWidthUnits in interface Sizeableunits - the units used in width property.Sizeable.setWidthUnits(int)public int getScrollOffsetX()
ScrollableScrolling offset is the number of pixels this scrollable has been scrolled to left.
getScrollOffsetX in interface Scrollablepublic int getScrollOffsetY()
ScrollableScrolling offset is the number of pixels this scrollable has been scrolled to down.
getScrollOffsetY in interface Scrollablepublic boolean isScrollable()
ScrollableEnabling scrolling allows the user to scroll the scrollable view interactively
isScrollable in interface Scrollabletrue if the scrolling is allowed, otherwise
false.public void setScrollable(boolean isScrollingEnabled)
ScrollableEnabling scrolling allows the user to scroll the scrollable view interactively
setScrollable in interface ScrollableisScrollingEnabled - true if the scrolling is allowed.public void setScrollOffsetX(int pixelsScrolledLeft)
ScrollableScrolling offset is the number of pixels this scrollable has been scrolled to left.
setScrollOffsetX in interface ScrollablepixelsScrolledLeft - the xOffset.public void setScrollOffsetY(int pixelsScrolledDown)
ScrollableScrolling offset is the number of pixels this scrollable has been scrolled to down.
setScrollOffsetY in interface ScrollablepixelsScrolledDown - the yOffset.
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 ComponentContaineroldComponent - the old component that will be replaced.newComponent - the new component to be replaced.public void componentAttachedToContainer(ComponentContainer.ComponentAttachEvent event)
componentAttachedToContainer in interface ComponentContainer.ComponentAttachListenerevent - the component attach event.ComponentContainer.ComponentAttachListener.componentAttachedToContainer(com.itmill.toolkit.ui.ComponentContainer.ComponentAttachEvent)public void componentDetachedFromContainer(ComponentContainer.ComponentDetachEvent event)
componentDetachedFromContainer in interface ComponentContainer.ComponentDetachListenerevent - the component detach event.ComponentContainer.ComponentDetachListener.componentDetachedFromContainer(com.itmill.toolkit.ui.ComponentContainer.ComponentDetachEvent)public void attach()
attach in interface Componentattach in class AbstractComponentContainerComponent.attach()public void detach()
detach in interface Componentdetach in class AbstractComponentContainerComponent.detach()public void removeAllComponents()
removeAllComponents in interface ComponentContainerremoveAllComponents in class AbstractComponentContainerComponentContainer.removeAllComponents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||