|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.awt.impl.AwtResource<C>
com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
com.sibvisions.rad.ui.swing.impl.SwingComponent<JVxTabbedPane>
com.sibvisions.rad.ui.swing.impl.container.SwingTabsetPanel
public class SwingTabsetPanel
The SwingTabsetPanel
is the ITabsetPanel
implementation for swing.
JTabbedPane
,
ITabsetPanel
Field Summary |
---|
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent |
---|
eventComponentMoved, eventComponentResized, eventSource, factory, parent |
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource |
---|
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 | |
---|---|
SwingTabsetPanel()
Creates a new instance of SwingTabsetPanel . |
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 |
closeTab(TabEvent pEvent)
Invoked when a tab will be closed (before it will be closed). |
void |
deselectTab(TabEvent pEvent)
Invoked when a tab will be deselected. |
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 |
moveTab(TabEvent pEvent)
Invoked when a tab was moved from one index to another index. |
void |
remove(int pIndex)
Removes the IComponent , specified by index ,
from this container. |
void |
selectTab(TabEvent pEvent)
Invoked when a tab is the curent selected tab. |
void |
setClosableAt(int pTabPosition,
boolean pEnabled)
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 class com.sibvisions.rad.ui.swing.impl.SwingComponent |
---|
capture, getToolTipText, setBackground, setToolTipText |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtContainer |
---|
add, add, add, addIntern, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll, removeIntern, setLayout, setLayoutIntern |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource |
---|
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, getComponent, getComponentCount, getLayout, indexOf, remove, removeAll, setLayout |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Constructor Detail |
---|
public SwingTabsetPanel()
SwingTabsetPanel
.
Method Detail |
---|
public void selectTab(TabEvent pEvent)
selectTab
in interface ITabListener
pEvent
- the eventpublic void deselectTab(TabEvent pEvent) throws Exception
deselectTab
in interface ITabListener
pEvent
- the event
Exception
- when the tab should not be deselectedpublic void closeTab(TabEvent pEvent) throws Exception
closeTab
in interface ITabListener
pEvent
- the event
Exception
- if the close operation is not possiblepublic void moveTab(TabEvent pEvent)
moveTab
in interface ITabListener
pEvent
- the eventpublic 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 setEnabledAt(int pTabPosition, boolean pEnabled)
setEnabledAt
in interface ITabsetPanel
pTabPosition
- the position of the tabpEnabled
- true
to enable and false
to disable the tabpublic int getTabPlacement()
getTabPlacement
in interface ITabsetPanel
ITabsetPanel.PLACEMENT_TOP
, ITabsetPanel.PLACEMENT_LEFT
,
ITabsetPanel.PLACEMENT_RIGHT
, ITabsetPanel.PLACEMENT_BOTTOM
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 getTabLayoutPolicy()
getTabLayoutPolicy
in interface ITabsetPanel
ITabsetPanel.setTabLayoutPolicy(int)
public 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 getSelectedIndex()
getSelectedIndex
in interface ITabsetPanel
ITabsetPanel.setSelectedIndex(int)
public void setSelectedIndex(int pIndex)
setSelectedIndex
in interface ITabsetPanel
pIndex
- the index to be selectedITabsetPanel.getSelectedIndex()
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 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 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 setClosableAt(int pTabPosition, boolean pEnabled)
setClosableAt
in interface ITabsetPanel
pTabPosition
- the position of the tabpEnabled
- true
to set closable and false
to be not closablepublic boolean isDragable()
isDragable
in interface ITabsetPanel
true
if the tabs are dragable or false
if the they are not dragable.public void setDragable(boolean pDragable)
setDragable
in interface ITabsetPanel
pDragable
- true
to set the tabs dragable and false
prevent.public 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 AwtContainer<JVxTabbedPane>
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 AwtContainer<JVxTabbedPane>
pIndex
- the index of the IComponent
to be removedIContainer.add(javax.rad.ui.IComponent)
,
IContainer.getComponentCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |