com.sibvisions.rad.ui.qt.impl.container
Class QtTabsetPanel

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<C>
      extended by com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
          extended by com.sibvisions.rad.ui.qt.impl.QtComponent<C>
              extended by com.sibvisions.rad.ui.qt.impl.QtContainer<QVxTabWidget>
                  extended by com.sibvisions.rad.ui.qt.impl.container.QtTabsetPanel
All Implemented Interfaces:
ITabsetPanel, IAlignmentConstants, IComponent, IContainer, IResource

public class QtTabsetPanel
extends QtContainer<QVxTabWidget>
implements ITabsetPanel

The QtTabsetPanel is the ITabsetPanel implementation for QT.

See Also:
QVxTabWidget, ITabsetPanel

Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
parent
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
factory
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
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
QtTabsetPanel()
          Creates a new instance of QtTabsetPanel.
 
Method Summary
protected  void addIntern(IComponent pComponent, Object pConstraints, int pIndex)
          Internal function, for adding physical component and supporting layers.
 void doTabCloseRequest(Integer pIndex)
          Notification when a tab was closed.
 void doTabMoved(Integer pOldIndex, Integer pNewIndex)
          Notification when a tab was moved.
 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 pTabPosition)
          Not supported.
 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 removeIntern(IComponent pComponent)
          Internal function, for adding physical component and supporting layers.
 void setClosableAt(int pTabPosition, boolean pClosable)
          Not supported.
 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 class com.sibvisions.rad.ui.qt.impl.QtContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setLayoutIntern
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
addStyle, capture, getBackground, getBounds, getCursor, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyleSheet, getToolTipText, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setResourceVisible, setSize, setToolTipText, setVerticalAlignment
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setFactory, setVisible
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, 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, add, getComponent, getComponentCount, getLayout, indexOf, remove, 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

QtTabsetPanel

public QtTabsetPanel()
Creates a new instance of QtTabsetPanel.

Method Detail

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)

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)

setSelectedIndex

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

Specified by:
setSelectedIndex in interface ITabsetPanel
Parameters:
pIndex - 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)

setTabLayoutPolicy

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

Specified by:
setTabLayoutPolicy in interface ITabsetPanel
Parameters:
pLayoutPolicy - 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)

setTabPlacement

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

Specified by:
setTabPlacement in interface ITabsetPanel
Parameters:
pPlacement - 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

setClosableAt

public void setClosableAt(int pTabPosition,
                          boolean pClosable)
Not supported.

Specified by:
setClosableAt in interface ITabsetPanel
Parameters:
pTabPosition - the position of the tab
pClosable - true to set closable and false to be not closable
See Also:
ITabsetPanel.setClosableAt(int, boolean)

isClosableAt

public boolean isClosableAt(int pTabPosition)
Not supported.

Specified by:
isClosableAt in interface ITabsetPanel
Parameters:
pTabPosition - the position of the tab
Returns:
false
See Also:
ITabsetPanel.isClosableAt(int)

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.

setEnabledAt

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

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

isEnabledAt

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

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

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 pEnabled)
En- or disables the tab navigation with the keyboard.

Specified by:
setNavigationKeysEnabled in interface ITabsetPanel
Parameters:
pEnabled - 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.

addIntern

protected void addIntern(IComponent pComponent,
                         Object pConstraints,
                         int pIndex)
Internal function, for adding physical component and supporting layers.

Overrides:
addIntern in class QtContainer<QVxTabWidget>
Parameters:
pComponent - the Component to be added
pConstraints - an object expressing layout contraints for this
pIndex - the position in the container's list at which to insert the Component; -1 means insert at the end component
See Also:
QtContainer.add(IComponent, Object, int)

removeIntern

public void removeIntern(IComponent pComponent)
Internal function, for adding physical component and supporting layers.

Overrides:
removeIntern in class QtContainer<QVxTabWidget>
Parameters:
pComponent - the Component to be removed
See Also:
QtContainer.remove(int)

doTabCloseRequest

public void doTabCloseRequest(Integer pIndex)
Notification when a tab was closed.

Parameters:
pIndex - the tab index

doTabMoved

public void doTabMoved(Integer pOldIndex,
                       Integer pNewIndex)
Notification when a tab was moved.

Parameters:
pOldIndex - the old tab index
pNewIndex - the new tab index


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.