|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.UIContainer<ITabsetPanel>
javax.rad.genui.container.UITabsetPanel
public class UITabsetPanel
Platform and technology independent TabSetPanel. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
Field Summary |
---|
Fields inherited from class javax.rad.genui.UIContainer |
---|
components |
Fields inherited from class javax.rad.genui.UIComponent |
---|
lLastTranslationModified, parent |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.ui.container.ITabsetPanel |
---|
PLACEMENT_BOTTOM, PLACEMENT_LEFT, PLACEMENT_RIGHT, PLACEMENT_TOP, TAB_LAYOUT_SCROLL, TAB_LAYOUT_WRAP |
Constructor Summary | |
---|---|
|
UITabsetPanel()
Creates a new instance of UITabsetPanel . |
protected |
UITabsetPanel(ITabsetPanel pPanel)
Creates a new instance of UITabsetPanel with the given
tabset panel. |
Method Summary | |
---|---|
void |
add(IComponent pComponent,
Object pConstraints,
int pIndex)
Adds the specified IComponent to this container with the specified
constraints at the specified index. |
void |
doTabClosed(UITabsetEvent pEvent)
Notification that a tab was closed. |
void |
doTabMoved(UITabsetEvent pEvent)
Notfication that a tab was moved. |
TabsetHandler |
eventTabActivated()
The TabsetHandler for the activated event. |
TabsetHandler |
eventTabClosed()
The TabsetHandler for the closed event. |
TabsetHandler |
eventTabDeactivated()
The TabsetHandler for the activated event. |
TabsetHandler |
eventTabMoved()
The TabsetHandler for the moved event. |
IImage |
getIconAt(int pIndex)
Returns the tab icon at pIndex . |
int |
getSelectedIndex()
Returns the currently selected index for this tabbedpane. |
int |
getTabLayoutPolicy()
Returns the policy used by the tabbedpane to layout the tabs when all the tabs will not fit within a single run. |
int |
getTabPlacement()
Gets the tab placement. |
String |
getTextAt(int pIndex)
Returns the tab text at pIndex . |
boolean |
isClosableAt(int pTabPosition)
Returns whether a tab is closable. |
boolean |
isDragable()
Returns whether the tabs are dragable. |
boolean |
isEnabledAt(int pTabPosition)
Returns if a tab is en- or disabled. |
boolean |
isNavigationKeysEnabled()
Determines whether the navigation with the keyboard is enabled. |
void |
remove(int pIndex)
Removes the IComponent , specified by index ,
from this container. |
void |
setClosableAt(int pTabPosition,
boolean pClosable)
Sets a tab closable. |
void |
setClosableAtIfExists(int pTabPosition,
boolean pClosable)
Sets the tab closable, if it exists. |
void |
setDragable(boolean pDragable)
Sets a tabs dragable. |
void |
setEnabledAt(int pTabPosition,
boolean pEnabled)
Sets a tab en- or disabled. |
void |
setEnabledAtIfExists(int pTabPosition,
boolean pEnabled)
Sets the tab enabled, if it exists. |
void |
setIconAt(int pIndex,
IImage pImage)
Sets the icon at pIndex to pImage which can be
null . |
void |
setIconAtIfExists(int pIndex,
IImage pImage)
Sets the tab icon, if it exists. |
void |
setNavigationKeysEnabled(boolean pEnabled)
En- or disables the tab navigation with the keyboard. |
void |
setSelectedIndex(int pIndex)
Sets the selected index for this tabbedpane. |
void |
setSelectedIndexIfExists(int pIndex)
Selects the tab, if it exists. |
void |
setTabLayoutPolicy(int pLayoutPolicy)
Sets the policy which the tabbedpane will use in laying out the tabs when all the tabs will not fit within a single run. |
void |
setTabPlacement(int pPlacement)
Sets the tab placement. |
void |
setTextAt(int pIndex,
String pText)
Sets the text at pIndex to pText which
can be null . |
void |
setTextAtIfExists(int pTabPosition,
String pText)
Sets the tab text, if it exists. |
void |
updateTranslation()
Notification for updating the translation. |
Methods inherited from class javax.rad.genui.UIContainer |
---|
add, add, add, addNotify, beforeAddNotify, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll, removeNotify, setLayout, setZOrder |
Methods inherited from class javax.rad.genui.UIResource |
---|
equals, getUIResource, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.ui.IContainer |
---|
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll, setLayout |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Constructor Detail |
---|
public UITabsetPanel()
UITabsetPanel
.
ITabsetPanel
protected UITabsetPanel(ITabsetPanel pPanel)
UITabsetPanel
with the given
tabset panel.
pPanel
- the tabset panelITabsetPanel
Method Detail |
---|
public void setTabPlacement(int pPlacement)
setTabPlacement
in interface ITabsetPanel
pPlacement
- one of the following values: ITabsetPanel.PLACEMENT_TOP
, ITabsetPanel.PLACEMENT_LEFT
,
ITabsetPanel.PLACEMENT_RIGHT
, ITabsetPanel.PLACEMENT_BOTTOM
public int getTabPlacement()
getTabPlacement
in interface ITabsetPanel
ITabsetPanel.PLACEMENT_TOP
, ITabsetPanel.PLACEMENT_LEFT
,
ITabsetPanel.PLACEMENT_RIGHT
, ITabsetPanel.PLACEMENT_BOTTOM
public void setEnabledAtIfExists(int pTabPosition, boolean pEnabled)
pTabPosition
- the tab positionpEnabled
- true, if enabled.public void setEnabledAt(int pTabPosition, boolean pEnabled)
setEnabledAt
in interface ITabsetPanel
pTabPosition
- the position of the tabpEnabled
- true
to enable and false
to disable the tabpublic boolean isEnabledAt(int pTabPosition)
isEnabledAt
in interface ITabsetPanel
pTabPosition
- the position of the tab
true
if the tab is enabled or false
if the tab is disabledpublic void setTabLayoutPolicy(int pLayoutPolicy)
ITabsetPanel.TAB_LAYOUT_WRAP
JTabbedPane.TAB_LAYOUT_SCROLL
ITabsetPanel.TAB_LAYOUT_WRAP
.
setTabLayoutPolicy
in interface ITabsetPanel
pLayoutPolicy
- the policy used to layout the tabsITabsetPanel.getTabLayoutPolicy()
public int getTabLayoutPolicy()
getTabLayoutPolicy
in interface ITabsetPanel
ITabsetPanel.setTabLayoutPolicy(int)
public void setSelectedIndexIfExists(int pIndex)
pIndex
- the tab positionpublic void setSelectedIndex(int pIndex)
setSelectedIndex
in interface ITabsetPanel
pIndex
- the index to be selectedITabsetPanel.getSelectedIndex()
public int getSelectedIndex()
getSelectedIndex
in interface ITabsetPanel
ITabsetPanel.setSelectedIndex(int)
public IImage getIconAt(int pIndex)
pIndex
.
getIconAt
in interface ITabsetPanel
pIndex
- the index of the item being queried
pIndex
ITabsetPanel.setIconAt(int, javax.rad.ui.IImage)
public void setIconAtIfExists(int pIndex, IImage pImage)
pIndex
- the tab positionpImage
- the imagepublic void setIconAt(int pIndex, IImage pImage)
pIndex
to pImage
which can be
null
. This does not set disabled icon at icon
.
If the new Icon is different than the current Icon and disabled icon
is not explicitly set, the LookAndFeel will be asked to generate a disabled
Icon. To explicitly set disabled icon, use setDisableIconAt()
.
An internal exception is raised if there is no tab at that index.
setIconAt
in interface ITabsetPanel
pIndex
- the tab index where the icon should be setpImage
- the icon to be displayed in the tabITabsetPanel.getIconAt(int)
public void setClosableAtIfExists(int pTabPosition, boolean pClosable)
pTabPosition
- the tab positionpClosable
- true, if closablepublic void setClosableAt(int pTabPosition, boolean pClosable)
setClosableAt
in interface ITabsetPanel
pTabPosition
- the position of the tabpClosable
- true
to set closable and false
to be not closablepublic boolean isClosableAt(int pTabPosition)
isClosableAt
in interface ITabsetPanel
pTabPosition
- the position of the tab
true
if the tab is closable or false
if the tab is not closablepublic void setDragable(boolean pDragable)
setDragable
in interface ITabsetPanel
pDragable
- true
to set the tabs dragable and false
prevent.public boolean isDragable()
isDragable
in interface ITabsetPanel
true
if the tabs are dragable or false
if the they are not dragable.public void setTextAtIfExists(int pTabPosition, String pText)
pTabPosition
- the tab positionpText
- the textpublic void setTextAt(int pIndex, String pText)
pIndex
to pText
which
can be null
.
setTextAt
in interface ITabsetPanel
pIndex
- the tab index where the text should be setpText
- the text to be displayed in the tabITabsetPanel.getTextAt(int)
public String getTextAt(int pIndex)
pIndex
.
getTextAt
in interface ITabsetPanel
pIndex
- the index of the tab
pIndex
ITabsetPanel.setTextAt(int, String)
public void setNavigationKeysEnabled(boolean pEnabled)
setNavigationKeysEnabled
in interface ITabsetPanel
pEnabled
- true
to enable the navigation with the keyboard, otherwise false
public boolean isNavigationKeysEnabled()
isNavigationKeysEnabled
in interface ITabsetPanel
true
if the keyboard navigation is enabled, otherwise false
public TabsetHandler eventTabClosed()
eventTabClosed
in interface ITabsetPanel
public TabsetHandler eventTabMoved()
eventTabMoved
in interface ITabsetPanel
public TabsetHandler eventTabActivated()
eventTabActivated
in interface ITabsetPanel
public TabsetHandler eventTabDeactivated()
eventTabDeactivated
in interface ITabsetPanel
public void add(IComponent pComponent, Object pConstraints, int pIndex)
IComponent
to this container with the specified
constraints at the specified index. Also notifies the layout
manager to add the component to the this container's layout using
the specified constraints object.
add
in interface IContainer
add
in class UIContainer<ITabsetPanel>
pComponent
- the IComponent
to be addedpConstraints
- an object expressing layout contraints for thispIndex
- the position in the container's list at which to insert
the IComponent
; -1
means insert at the end
componentIComponent
public void remove(int pIndex)
IComponent
, specified by index
,
from this container.
This method also notifies the layout manager to remove the
component from this container's layout via the
removeLayoutComponent
method.
remove
in interface IContainer
remove
in class UIContainer<ITabsetPanel>
pIndex
- the index of the IComponent
to be removedIContainer.add(javax.rad.ui.IComponent)
,
IContainer.getComponentCount()
public void updateTranslation()
UIComponent
will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation
in class UIContainer<ITabsetPanel>
UIComponent.setTranslation(TranslationMap)
,
UIComponent.addNotify()
public void doTabClosed(UITabsetEvent pEvent)
pEvent
- the event from the tabsetpublic void doTabMoved(UITabsetEvent pEvent)
pEvent
- the event from the tabset
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |