com.sibvisions.rad.ui.web.impl.container
Class WebTabsetPanel

java.lang.Object
  extended by com.sibvisions.rad.ui.web.impl.WebResource
      extended by com.sibvisions.rad.ui.web.impl.WebComponent
          extended by com.sibvisions.rad.ui.web.impl.WebContainer
              extended by com.sibvisions.rad.ui.web.impl.container.WebTabsetPanel
All Implemented Interfaces:
ITabsetPanel, IAlignmentConstants, IComponent, IContainer, IResource

public class WebTabsetPanel
extends WebContainer
implements ITabsetPanel

Web server implementation of ITabsetPanel.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
components
 
Fields inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
componentId
 
Fields inherited from interface javax.rad.ui.container.ITabsetPanel
PLACEMENT_BOTTOM, PLACEMENT_LEFT, PLACEMENT_RIGHT, PLACEMENT_TOP, TAB_LAYOUT_SCROLL, TAB_LAYOUT_WRAP
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
WebTabsetPanel()
          Creates a new instance of WebTabsetPanel.
 
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. Also notifies the layout manager to add the component to the this container's layout using the specified constraints object.
 TabsetHandler eventTabClosed()
          The TabsetHandler for the closed 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 pIndex)
          Returns whether a tab is closable.
 boolean isDragable()
          Returns whether the tabs are dragable.
 boolean isEnabledAt(int pIndex)
          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. This method also notifies the layout manager to remove the component from this container's layout via the removeLayoutComponent method.
 void setClosableAt(int pIndex, boolean pClosable)
          Sets a tab closable.
 void setDragable(boolean pDragable)
          Sets a tabs dragable.
 void setEnabledAt(int pIndex, 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 pNavigationKeysEnabled)
          En- or disables the tab navigation with the keyboard.
 void setSelectedIndex(int pSelectedIndex)
          Sets the selected index for this tabbedpane.
 void setTabLayoutPolicy(int pTabLayoutPolicy)
          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 pTabPlacement)
          Sets the tab placement.
 void setTextAt(int pIndex, String pText)
          Sets the text at pIndex to pText which can be null.
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebContainer
add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll, setLayout
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, finalize, getAsString, getBackground, getBounds, getChangedProperties, getComponentId, getComponentName, getConstraints, getCursor, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getProperty, getSize, getToolTipText, getVerticalAlignment, isBackgroundSet, isChanged, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setComponentId, setConstraints, setCursor, setEnabled, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setProperty, setProperty, setSize, setToolTipText, setVerticalAlignment, setVisible
 
Methods inherited from class com.sibvisions.rad.ui.web.impl.WebResource
getNullableAsString, getResource, setAsString, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, 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.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

WebTabsetPanel

public WebTabsetPanel()
Creates a new instance of WebTabsetPanel.

See Also:
ITabsetPanel
Method Detail

setTabPlacement

public void setTabPlacement(int pTabPlacement)
Sets the tab placement.

Specified by:
setTabPlacement in interface ITabsetPanel
Parameters:
pTabPlacement - one of the following values: ITabsetPanel.PLACEMENT_TOP, ITabsetPanel.PLACEMENT_LEFT, ITabsetPanel.PLACEMENT_RIGHT, ITabsetPanel.PLACEMENT_BOTTOM

getTabPlacement

public int getTabPlacement()
Gets the tab placement.

Specified by:
getTabPlacement in interface ITabsetPanel
Returns:
one of the following values: ITabsetPanel.PLACEMENT_TOP, ITabsetPanel.PLACEMENT_LEFT, ITabsetPanel.PLACEMENT_RIGHT, ITabsetPanel.PLACEMENT_BOTTOM

setEnabledAt

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

Specified by:
setEnabledAt in interface ITabsetPanel
Parameters:
pIndex - the position of the tab
pEnabled - true to enable and false to disable the tab

isEnabledAt

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

Specified by:
isEnabledAt in interface ITabsetPanel
Parameters:
pIndex - the position of the tab
Returns:
true if the tab is enabled or false if the tab is disabled

setTabLayoutPolicy

public void setTabLayoutPolicy(int pTabLayoutPolicy)
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.

Specified by:
setTabLayoutPolicy in interface ITabsetPanel
Parameters:
pTabLayoutPolicy - the policy used to layout the tabs
See Also:
ITabsetPanel.getTabLayoutPolicy()

getTabLayoutPolicy

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

Specified by:
getTabLayoutPolicy in interface ITabsetPanel
Returns:
the tab layout policy
See Also:
ITabsetPanel.setTabLayoutPolicy(int)

setSelectedIndex

public void setSelectedIndex(int pSelectedIndex)
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.

Specified by:
setSelectedIndex in interface ITabsetPanel
Parameters:
pSelectedIndex - the index to be selected
See Also:
ITabsetPanel.getSelectedIndex()

getSelectedIndex

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

Specified by:
getSelectedIndex in interface ITabsetPanel
Returns:
the index of the selected tab
See Also:
ITabsetPanel.setSelectedIndex(int)

getIconAt

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

Specified by:
getIconAt in interface ITabsetPanel
Parameters:
pIndex - the index of the item being queried
Returns:
the icon at pIndex
See Also:
ITabsetPanel.setIconAt(int, javax.rad.ui.IImage)

setIconAt

public 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.

Specified by:
setIconAt in interface ITabsetPanel
Parameters:
pIndex - the tab index where the icon should be set
pImage - the icon to be displayed in the tab
See Also:
ITabsetPanel.getIconAt(int)

setClosableAt

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

Specified by:
setClosableAt in interface ITabsetPanel
Parameters:
pIndex - the position of the tab
pClosable - true to set closable and false to be not closable

isClosableAt

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

Specified by:
isClosableAt in interface ITabsetPanel
Parameters:
pIndex - the position of the tab
Returns:
true if the tab is closable or false if the tab is not closable

setDragable

public void setDragable(boolean pDragable)
Sets a tabs dragable.

Specified by:
setDragable in interface ITabsetPanel
Parameters:
pDragable - true to set the tabs dragable and false prevent.

isDragable

public boolean isDragable()
Returns whether the tabs are dragable.

Specified by:
isDragable in interface ITabsetPanel
Returns:
true if the tabs are dragable or false if the they are not dragable.

setTextAt

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

Specified by:
setTextAt in interface ITabsetPanel
Parameters:
pIndex - the tab index where the text should be set
pText - the text to be displayed in the tab
See Also:
ITabsetPanel.getTextAt(int)

getTextAt

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

Specified by:
getTextAt in interface ITabsetPanel
Parameters:
pIndex - the index of the tab
Returns:
the text at pIndex
See Also:
ITabsetPanel.setTextAt(int, String)

setNavigationKeysEnabled

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

Specified by:
setNavigationKeysEnabled in interface ITabsetPanel
Parameters:
pNavigationKeysEnabled - true to enable the navigation with the keyboard, otherwise false

isNavigationKeysEnabled

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

Specified by:
isNavigationKeysEnabled in interface ITabsetPanel
Returns:
true if the keyboard navigation is enabled, otherwise false

eventTabClosed

public TabsetHandler eventTabClosed()
The TabsetHandler for the closed event.

Specified by:
eventTabClosed in interface ITabsetPanel
Returns:
the TabsetHandler for the closed event.

eventTabMoved

public TabsetHandler eventTabMoved()
The TabsetHandler for the moved event.

Specified by:
eventTabMoved in interface ITabsetPanel
Returns:
the TabsetHandler for the moved event.

add

public void add(IComponent pComponent,
                Object pConstraints,
                int pIndex)
Adds the specified 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.

Specified by:
add in interface IContainer
Overrides:
add in class WebContainer
Parameters:
pComponent - the IComponent to be added
pConstraints - an object expressing layout contraints for this
pIndex - the position in the container's list at which to insert the IComponent; -1 means insert at the end component
See Also:
IComponent

remove

public void remove(int pIndex)
Removes the 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.

Specified by:
remove in interface IContainer
Overrides:
remove in class WebContainer
Parameters:
pIndex - the index of the IComponent to be removed
See Also:
IContainer.add(javax.rad.ui.IComponent), IContainer.getComponentCount()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.