|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractComponentContainer
com.itmill.toolkit.ui.TabSheet
public class TabSheet
Tabsheet component.
Nested Class Summary | |
---|---|
class |
TabSheet.SelectedTabChangeEvent
Selected Tab Change event. |
static interface |
TabSheet.SelectedTabChangeListener
Selected Tab Change Event listener |
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractComponent |
---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
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 |
---|
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
TabSheet()
Constructs a new Tabsheet. |
Method Summary | |
---|---|
void |
addComponent(Component c)
Adds a new tab into TabSheet. |
void |
addListener(TabSheet.SelectedTabChangeListener listener)
Adds the selected tab change listener |
void |
addTab(Component c)
Adds a new tab into TabSheet. |
void |
addTab(Component c,
String caption,
Resource icon)
Adds a new tab into TabSheet. |
boolean |
areTabsHidden()
Are tabs hidden. |
void |
changeVariables(Object source,
Map variables)
Invoked when the value of a variable has changed. |
void |
detach()
Notifies all contained components that the container is detached from a window. |
protected void |
fireSelectedTabChange()
Emits the options change event. |
Iterator |
getComponentIterator()
Gets the component container iterator for going trough all the components in the container. |
Component |
getSelectedTab()
Gets the selected tab. |
String |
getTabCaption(Component c)
Gets the caption for a component. |
Resource |
getTabIcon(Component c)
Gets the icon for a component. |
String |
getTag()
Gets the component UIDL tag. |
void |
hideTabs(boolean tabsHidden)
Setter for property tabsHidden. |
void |
moveComponentsFrom(ComponentContainer source)
Moves all components from another container to this container. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeComponent(Component c)
Removes the component from this container. |
void |
removeListener(TabSheet.SelectedTabChangeListener listener)
Removes the selected tab change listener |
void |
repaintRequested(Paintable.RepaintRequestEvent event)
Receives repaint request events. |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replaces the component in the container with another one without changing position. |
void |
setSelectedTab(Component c)
Sets the selected tab. |
void |
setTabCaption(Component c,
String caption)
Sets tabs captions. |
void |
setTabIcon(Component c,
Resource icon)
Sets overridden icon for given component. |
Methods inherited from class com.itmill.toolkit.ui.AbstractComponentContainer |
---|
addListener, addListener, attach, fireComponentAttachEvent, fireComponentDetachEvent, removeAllComponents, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth |
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, addStyleName, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, setParent, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
---|
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId |
Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
---|
isImmediate |
Methods inherited from interface com.itmill.toolkit.terminal.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
Constructor Detail |
---|
public TabSheet()
Method Detail |
---|
public Iterator getComponentIterator()
getComponentIterator
in interface ComponentContainer
public void removeComponent(Component c)
removeComponent
in interface ComponentContainer
removeComponent
in class AbstractComponentContainer
c
- the component to be removed.ComponentContainer.removeComponent(Component)
public void addComponent(Component c)
addComponent
in interface ComponentContainer
addComponent
in class AbstractComponentContainer
c
- the component to be added.ComponentContainer.addComponent(Component)
public void addTab(Component c, String caption, Resource icon)
c
- the component to be added onto tab.caption
- the caption to be set for the component and used rendered in
tab baricon
- the icon to be set for the component and used rendered in tab
barpublic void addTab(Component c)
c
- the component to be added onto tab.public String getTag()
getTag
in class AbstractComponent
public void moveComponentsFrom(ComponentContainer source)
moveComponentsFrom
in interface ComponentContainer
moveComponentsFrom
in class AbstractComponentContainer
source
- the container components are removed from.public void paintContent(PaintTarget target) throws PaintException
paintContent
in class AbstractComponent
event
- the Paint Event.
PaintException
- if the paint operation failed.public boolean areTabsHidden()
public void hideTabs(boolean tabsHidden)
tabsHidden
- True if the tabs should be hidden.public String getTabCaption(Component c)
c
- the component.public void setTabCaption(Component c, String caption)
c
- the component.caption
- the caption to set.public Resource getTabIcon(Component c)
c
- the component.public void setTabIcon(Component c, Resource icon)
c
- icon
- public void setSelectedTab(Component c)
c
- public Component getSelectedTab()
public void changeVariables(Object source, Map variables)
changeVariables
in interface VariableOwner
changeVariables
in class AbstractComponent
source
- 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.AbstractComponent.changeVariables(java.lang.Object,
java.util.Map)
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.public void addListener(TabSheet.SelectedTabChangeListener listener)
listener
- the Listener to be added.public void removeListener(TabSheet.SelectedTabChangeListener listener)
listener
- the Listener to be removed.protected void fireSelectedTabChange()
public void repaintRequested(Paintable.RepaintRequestEvent event)
Paintable.RepaintRequestListener
repaintRequested
in interface Paintable.RepaintRequestListener
event
- the repaint request event specifying the paintable source.public void detach()
AbstractComponentContainer
detach
in interface Component
detach
in class AbstractComponentContainer
Component.detach()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |