|
||||||||||
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.TabSheet
Tabsheet component.
Nested Class Summary | |
class |
TabSheet.SelectedTabChangeEvent
Selected Tab Change event. |
static interface |
TabSheet.SelectedTabChangeListener
Selected Tab Change Event listener |
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.Listener |
Nested classes inherited from class org.millstone.base.terminal.Paintable |
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Constructor Summary | |
TabSheet()
Construct new Tabsheet. |
Method Summary | |
void |
addComponent(Component c)
Add a component into this container. |
void |
addListener(TabSheet.SelectedTabChangeListener listener)
Add selected tab change listener |
void |
addTab(Component c,
java.lang.String caption,
Resource icon)
Add a new tab into TabSheet. |
boolean |
areTabsHidden()
Are tabs hidden. |
void |
changeVariables(java.lang.Object source,
java.util.Map variables)
Invoked when the value of a variable has changed. |
protected void |
fireSelectedTabChange()
Emit options change event. |
java.util.Iterator |
getComponentIterator()
Get component container iterator for going trough all the components in the container. |
Component |
getSelectedTab()
Get the selected tab |
java.lang.String |
getTabCaption(Component c)
Get the caption for a component |
Resource |
getTabIcon(Component c)
Get the icon for a component |
java.lang.String |
getTag()
Get component UIDL tag. |
void |
hideTabs(boolean tabsHidden)
Setter for property tabsHidden. |
void |
moveComponentsFrom(ComponentContainer source)
Move all components from another container to this container. |
void |
paintContent(PaintTarget target)
Paint the content of this component. |
void |
removeComponent(Component c)
Remove a component from this container. |
void |
removeListener(TabSheet.SelectedTabChangeListener listener)
Remove selected tab change listener |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replace a component in the container with another one without changing position. |
void |
setSelectedTab(Component c)
Set the selected tab |
void |
setTabCaption(Component c,
java.lang.String caption)
Set the caption for a component |
void |
setTabIcon(Component c,
Resource icon)
Set the icon for a component |
Methods inherited from class org.millstone.base.ui.AbstractComponentContainer |
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, removeAllComponents, removeListener, removeListener |
Methods inherited from class org.millstone.base.ui.AbstractComponent |
addListener, addListener, addListener, addListener, childRequestedRepaint, dependsOn, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getDescription, getDirectDependencies, getErrorMessage, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setDescription, setEnabled, setIcon, setImmediate, setLocale, setParent, setReadOnly, setStyle, setVisible |
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.Component |
addListener, childRequestedRepaint, 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 |
dependsOn, getDirectDependencies, removeDirectDependency |
Constructor Detail |
public TabSheet()
Method Detail |
public java.util.Iterator getComponentIterator()
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, java.lang.String caption, Resource icon)
c
- The component to be added onto tab.caption
- The caption of the tab.icon
- Set the icon of the tab.public java.lang.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
target
- target UIDL stream where the component should paint
itself to
PaintException
- The paint operation failed.public boolean areTabsHidden()
public void hideTabs(boolean tabsHidden)
tabsHidden
- True if the tabs should be hidden.public java.lang.String getTabCaption(Component c)
public void setTabCaption(Component c, java.lang.String caption)
public Resource getTabIcon(Component c)
public void setTabIcon(Component c, Resource icon)
public void setSelectedTab(Component c)
public Component getSelectedTab()
public void changeVariables(java.lang.Object source, java.util.Map variables)
changeVariables
in interface VariableOwner
changeVariables
in class AbstractComponent
source
- Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables
- Mapping from variable names to new variable valuespublic 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.
oldComponent
- The old component that will be replaced.newComponent
- The new component to be replacedpublic void addListener(TabSheet.SelectedTabChangeListener listener)
listener
- Listener to be added.public void removeListener(TabSheet.SelectedTabChangeListener listener)
listener
- Listener to be removed.protected void fireSelectedTabChange()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |