javax.rad.ui.container
Interface ITabsetPanel

All Superinterfaces:
IComponent, IContainer, INamedObject, IResource
All Known Implementing Classes:
SwingTabsetPanel, UITabsetPanel

public interface ITabsetPanel
extends IContainer

Platform and technology independent TabSetPanel definition. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .

See Also:
JTabbedPane

Field Summary
static int PLACEMENT_BOTTOM
          the constant value for bottom tab placement.
static int PLACEMENT_LEFT
          the constant value for left tab placement.
static int PLACEMENT_RIGHT
          the constant value for right tab placement.
static int PLACEMENT_TOP
          the constant value for top tab placement.
static int TAB_LAYOUT_SCROLL
          Tab layout policy for providing a subset of available tabs when all the tabs will not fit within a single run.
static int TAB_LAYOUT_WRAP
          The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run.
 
Method Summary
 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 setClosableAt(int pTabPosition, boolean pClosable)
          Sets a tab closable.
 void setDragable(boolean pDragable)
          Sets a tabs dragable.
 void setEnabledAt(int pTabPosition, boolean pEnabled)
          Sets a tab en- or disabled.
 void setIconAt(int pIndex, IImage pImage)
          Sets the icon at pIndex to pImage which can be null.
 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 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.
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

PLACEMENT_TOP

static final int PLACEMENT_TOP
the constant value for top tab placement.

See Also:
Constant Field Values

PLACEMENT_LEFT

static final int PLACEMENT_LEFT
the constant value for left tab placement.

See Also:
Constant Field Values

PLACEMENT_BOTTOM

static final int PLACEMENT_BOTTOM
the constant value for bottom tab placement.

See Also:
Constant Field Values

PLACEMENT_RIGHT

static final int PLACEMENT_RIGHT
the constant value for right tab placement.

See Also:
Constant Field Values

TAB_LAYOUT_WRAP

static final int TAB_LAYOUT_WRAP
The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run.

See Also:
Constant Field Values

TAB_LAYOUT_SCROLL

static final int TAB_LAYOUT_SCROLL
Tab layout policy for providing a subset of available tabs when all the tabs will not fit within a single run. If all the tabs do not fit within a single run the look and feel will provide a way to navigate to hidden tabs.

See Also:
Constant Field Values
Method Detail

setTabPlacement

void setTabPlacement(int pPlacement)
Sets the tab placement.

Parameters:
pPlacement - one of the following values: PLACEMENT_TOP, PLACEMENT_LEFT, PLACEMENT_RIGHT, PLACEMENT_BOTTOM

getTabPlacement

int getTabPlacement()
Gets the tab placement.

Returns:
one of the following values: PLACEMENT_TOP, PLACEMENT_LEFT, PLACEMENT_RIGHT, PLACEMENT_BOTTOM

setEnabledAt

void setEnabledAt(int pTabPosition,
                  boolean pEnabled)
Sets a tab en- or disabled.

Parameters:
pTabPosition - the position of the tab
pEnabled - true to enable and false to disable the tab

isEnabledAt

boolean isEnabledAt(int pTabPosition)
Returns if a tab is en- or disabled.

Parameters:
pTabPosition - the position of the tab
Returns:
true if the tab is enabled or false if the tab is disabled

setTabLayoutPolicy

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. Possible values are: The default value, if not set by the UI, is ITabsetPanel.TAB_LAYOUT_WRAP.

Parameters:
pLayoutPolicy - the policy used to layout the tabs
Throws:
IllegalArgumentException - if layoutPolicy value isn't one of the above valid values
See Also:
getTabLayoutPolicy()

getTabLayoutPolicy

int getTabLayoutPolicy()
Returns the policy used by the tabbedpane to layout the tabs when all the tabs will not fit within a single run.

Returns:
the tab layout policy
See Also:
setTabLayoutPolicy(int)

setSelectedIndex

void setSelectedIndex(int pIndex)
Sets the selected index for this tabbedpane. The index must be a valid tab index or -1, which indicates that no tab should be selected (can also be used when there are no tabs in the tabbedpane). If a -1 value is specified when the tabbedpane contains one or more tabs, then the results will be implementation defined.

Parameters:
pIndex - the index to be selected
Throws:
IndexOutOfBoundsException - if index is out of range (index < -1 || index >= tab count)
See Also:
getSelectedIndex()

getSelectedIndex

int getSelectedIndex()
Returns the currently selected index for this tabbedpane. Returns -1 if there is no currently selected tab.

Returns:
the index of the selected tab
See Also:
setSelectedIndex(int)

setIconAt

void setIconAt(int pIndex,
               IImage pImage)
Sets the icon at 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.

Parameters:
pIndex - the tab index where the icon should be set
pImage - the icon to be displayed in the tab
Throws:
IndexOutOfBoundsException - if index is out of range (pIndex < 0 || pIndex >= tab count)
See Also:
getIconAt(int)

getIconAt

IImage getIconAt(int pIndex)
Returns the tab icon at pIndex.

Parameters:
pIndex - the index of the item being queried
Returns:
the icon at pIndex
Throws:
IndexOutOfBoundsException - if index is out of range (pIndex < 0 || pIndex >= tab count)
See Also:
setIconAt(int, javax.rad.ui.IImage)

setClosableAt

void setClosableAt(int pTabPosition,
                   boolean pClosable)
Sets a tab closable.

Parameters:
pTabPosition - the position of the tab
pClosable - true to set closable and false to be not closable

isClosableAt

boolean isClosableAt(int pTabPosition)
Returns whether a tab is closable.

Parameters:
pTabPosition - the position of the tab
Returns:
true if the tab is closable or false if the tab is not closable

setDragable

void setDragable(boolean pDragable)
Sets a tabs dragable.

Parameters:
pDragable - true to set the tabs dragable and false prevent.

isDragable

boolean isDragable()
Returns whether the tabs are dragable.

Returns:
true if the tabs are dragable or false if the they are not dragable.

setTextAt

void setTextAt(int pIndex,
               String pText)
Sets the text at pIndex to pText which can be null.

Parameters:
pIndex - the tab index where the text should be set
pText - the text to be displayed in the tab
Throws:
IndexOutOfBoundsException - if index is out of range (pIndex < 0 || pIndex >= tab count)
See Also:
getTextAt(int)

getTextAt

String getTextAt(int pIndex)
Returns the tab text at pIndex.

Parameters:
pIndex - the index of the tab
Returns:
the text at pIndex
Throws:
IndexOutOfBoundsException - if index is out of range (pIndex < 0 || pIndex >= tab count)
See Also:
setTextAt(int, String)

setNavigationKeysEnabled

void setNavigationKeysEnabled(boolean pEnabled)
En- or disables the tab navigation with the keyboard.

Parameters:
pEnabled - true to enable the navigation with the keyboard, otherwise false

isNavigationKeysEnabled

boolean isNavigationKeysEnabled()
Determines whether the navigation with the keyboard is enabled.

Returns:
true if the keyboard navigation is enabled, otherwise false

eventTabClosed

TabsetHandler eventTabClosed()
The TabsetHandler for the closed event.

Returns:
the TabsetHandler for the closed event.

eventTabMoved

TabsetHandler eventTabMoved()
The TabsetHandler for the moved event.

Returns:
the TabsetHandler for the moved event.

eventTabActivated

TabsetHandler eventTabActivated()
The TabsetHandler for the activated event.

Returns:
the TabsetHandler for the activated event.

eventTabDeactivated

TabsetHandler eventTabDeactivated()
The TabsetHandler for the activated event.

Returns:
the TabsetHandler for the deactivated event.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.