NextApp Echo2 Extras
v2.1.0

nextapp.echo2.extras.app
Class TabPane

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.extras.app.TabPane
All Implemented Interfaces:
java.io.Serializable, nextapp.echo2.app.Pane, nextapp.echo2.app.PaneContainer, nextapp.echo2.app.RenderIdSupport

public class TabPane
extends nextapp.echo2.app.Component
implements nextapp.echo2.app.Pane, nextapp.echo2.app.PaneContainer

A container pane which displays child components in separate tabs.

See Also:
Serialized Form

Field Summary
static java.lang.String ACTIVE_TAB_INDEX_CHANGED_PROPERTY
           
static int BORDER_TYPE_ADJACENT_TO_TABS
          Constant for the borderType property indicating that a border should be drawn immediately adjacent to the tabs only.
static int BORDER_TYPE_NONE
          Constant for the borderType property indicating that no border should be drawn around the content.
static int BORDER_TYPE_PARALLEL_TO_TABS
          Constant for the borderType property indicating that borders should be drawn above and below the content, but not at its sides.
static int BORDER_TYPE_SURROUND
          Constant for the borderType property indicating that borders should be drawn on all sides of the content.
static java.lang.String INPUT_TAB_INDEX
           
static java.lang.String PROPERTY_BORDER_TYPE
           
static java.lang.String PROPERTY_DEFAULT_CONTENT_INSETS
           
static java.lang.String PROPERTY_INSETS
           
static java.lang.String PROPERTY_TAB_ACTIVE_BACKGROUND
           
static java.lang.String PROPERTY_TAB_ACTIVE_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_TAB_ACTIVE_BORDER
           
static java.lang.String PROPERTY_TAB_ACTIVE_FONT
           
static java.lang.String PROPERTY_TAB_ACTIVE_FOREGROUND
           
static java.lang.String PROPERTY_TAB_HEIGHT
           
static java.lang.String PROPERTY_TAB_INACTIVE_BACKGROUND
           
static java.lang.String PROPERTY_TAB_INACTIVE_BACKGROUND_IMAGE
           
static java.lang.String PROPERTY_TAB_INACTIVE_BORDER
           
static java.lang.String PROPERTY_TAB_INACTIVE_FONT
           
static java.lang.String PROPERTY_TAB_INACTIVE_FOREGROUND
           
static java.lang.String PROPERTY_TAB_INSET
           
static java.lang.String PROPERTY_TAB_POSITION
           
static java.lang.String PROPERTY_TAB_SPACING
           
static java.lang.String PROPERTY_TAB_WIDTH
           
static int TAB_POSITION_BOTTOM
          Constant for the tabPosition property indicating that the tabs should be rendered beneath the content.
static int TAB_POSITION_TOP
          Constant for the tabPosition property indicating that the tabs should be rendered above the content.
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
TabPane()
           
 
Method Summary
 int getActiveTabIndex()
          Returns the index of the active tab.
 int getBorderType()
          Returns the mode in which the border will be drawn around the TabPane.
 nextapp.echo2.app.Insets getDefaultContentInsets()
          Returns the default content inset margin.
 nextapp.echo2.app.Insets getInsets()
          Returns the Insets around the entire TabPane.
 nextapp.echo2.app.Color getTabActiveBackground()
          Returns the background color used to render active tabs.
 nextapp.echo2.app.FillImage getTabActiveBackgroundImage()
          Returns the background image used to render active tabs.
 nextapp.echo2.app.Border getTabActiveBorder()
          Returns the Border used to draw the active tab and surround the content of the TabPane.
 nextapp.echo2.app.Font getTabActiveFont()
          Returns the font used to render active tabs.
 nextapp.echo2.app.Color getTabActiveForeground()
          Returns the foreground color used to render active tabs.
 nextapp.echo2.app.Extent getTabHeight()
          Returns the height of an individual tab.
 nextapp.echo2.app.Color getTabInactiveBackground()
          Returns the background color used to render inactive tabs.
 nextapp.echo2.app.FillImage getTabInactiveBackgroundImage()
          Returns the background image used to render inactive tabs.
 nextapp.echo2.app.Border getTabInactiveBorder()
          Returns the Border used to draw inactive tabs.
 nextapp.echo2.app.Font getTabInactiveFont()
          Returns the font used to render inactive tabs.
 nextapp.echo2.app.Color getTabInactiveForeground()
          Returns the foreground color used to render inactive tabs.
 nextapp.echo2.app.Extent getTabInset()
          Returns the horizontal distance from which all tabs are inset from the edge of the TabPane.
 int getTabPosition()
          Returns the position where the tabs are located relative to the pane content.
 nextapp.echo2.app.Extent getTabSpacing()
          Returns the horizontal space between individual tabs.
 nextapp.echo2.app.Extent getTabWidth()
          Returns the width of an individual tab.
 boolean isValidParent(nextapp.echo2.app.Component c)
           
 void processInput(java.lang.String inputName, java.lang.Object inputValue)
           
 void setActiveTabIndex(int newValue)
          Sets the active tab index.
 void setBorderType(int newValue)
          Sets the mode in which the border will be drawn around the TabPane.
 void setDefaultContentInsets(nextapp.echo2.app.Insets newValue)
          Sets the default content inset margin.
 void setInsets(nextapp.echo2.app.Insets newValue)
          Sets the Insets around the entire TabPane.
 void setTabActiveBackground(nextapp.echo2.app.Color newValue)
          Sets the background color used to render active tabs.
 void setTabActiveBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image used to render active tabs.
 void setTabActiveBorder(nextapp.echo2.app.Border newValue)
          Sets the Border used to draw the active tab and surround the content of the TabPane.
 void setTabActiveFont(nextapp.echo2.app.Font newValue)
          Sets the font used to render active tabs.
 void setTabActiveForeground(nextapp.echo2.app.Color newValue)
          Sets the foreground color used to render active tabs.
 void setTabHeight(nextapp.echo2.app.Extent newValue)
          Sets the height of an individual tab.
 void setTabInactiveBackground(nextapp.echo2.app.Color newValue)
          Sets the background color used to render inactive tabs.
 void setTabInactiveBackgroundImage(nextapp.echo2.app.FillImage newValue)
          Sets the background image used to render inactive tabs.
 void setTabInactiveBorder(nextapp.echo2.app.Border newValue)
          Sets the Border used to draw inactive tabs in the TabPane.
 void setTabInactiveFont(nextapp.echo2.app.Font newValue)
          Sets the font used to render inactive tabs.
 void setTabInactiveForeground(nextapp.echo2.app.Color newValue)
          Sets the foreground color used to render inactive tabs.
 void setTabInset(nextapp.echo2.app.Extent newValue)
          Sets the horizontal distance from which all tabs are inset from the edge of the TabPane.
 void setTabPosition(int newValue)
          Sets the position where the tabs are located relative to the pane content.
 void setTabSpacing(nextapp.echo2.app.Extent newValue)
          Sets the horizontal space between individual tabs.
 void setTabWidth(nextapp.echo2.app.Extent newValue)
          Sets the width of an individual tab.
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_TAB_INDEX

public static final java.lang.String INPUT_TAB_INDEX
See Also:
Constant Field Values

ACTIVE_TAB_INDEX_CHANGED_PROPERTY

public static final java.lang.String ACTIVE_TAB_INDEX_CHANGED_PROPERTY
See Also:
Constant Field Values

PROPERTY_BORDER_TYPE

public static final java.lang.String PROPERTY_BORDER_TYPE
See Also:
Constant Field Values

PROPERTY_DEFAULT_CONTENT_INSETS

public static final java.lang.String PROPERTY_DEFAULT_CONTENT_INSETS
See Also:
Constant Field Values

PROPERTY_INSETS

public static final java.lang.String PROPERTY_INSETS
See Also:
Constant Field Values

PROPERTY_TAB_ACTIVE_BACKGROUND

public static final java.lang.String PROPERTY_TAB_ACTIVE_BACKGROUND
See Also:
Constant Field Values

PROPERTY_TAB_ACTIVE_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_TAB_ACTIVE_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_TAB_ACTIVE_BORDER

public static final java.lang.String PROPERTY_TAB_ACTIVE_BORDER
See Also:
Constant Field Values

PROPERTY_TAB_ACTIVE_FONT

public static final java.lang.String PROPERTY_TAB_ACTIVE_FONT
See Also:
Constant Field Values

PROPERTY_TAB_ACTIVE_FOREGROUND

public static final java.lang.String PROPERTY_TAB_ACTIVE_FOREGROUND
See Also:
Constant Field Values

PROPERTY_TAB_HEIGHT

public static final java.lang.String PROPERTY_TAB_HEIGHT
See Also:
Constant Field Values

PROPERTY_TAB_INACTIVE_BACKGROUND

public static final java.lang.String PROPERTY_TAB_INACTIVE_BACKGROUND
See Also:
Constant Field Values

PROPERTY_TAB_INACTIVE_BACKGROUND_IMAGE

public static final java.lang.String PROPERTY_TAB_INACTIVE_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_TAB_INACTIVE_BORDER

public static final java.lang.String PROPERTY_TAB_INACTIVE_BORDER
See Also:
Constant Field Values

PROPERTY_TAB_INACTIVE_FONT

public static final java.lang.String PROPERTY_TAB_INACTIVE_FONT
See Also:
Constant Field Values

PROPERTY_TAB_INACTIVE_FOREGROUND

public static final java.lang.String PROPERTY_TAB_INACTIVE_FOREGROUND
See Also:
Constant Field Values

PROPERTY_TAB_INSET

public static final java.lang.String PROPERTY_TAB_INSET
See Also:
Constant Field Values

PROPERTY_TAB_SPACING

public static final java.lang.String PROPERTY_TAB_SPACING
See Also:
Constant Field Values

PROPERTY_TAB_POSITION

public static final java.lang.String PROPERTY_TAB_POSITION
See Also:
Constant Field Values

PROPERTY_TAB_WIDTH

public static final java.lang.String PROPERTY_TAB_WIDTH
See Also:
Constant Field Values

BORDER_TYPE_NONE

public static final int BORDER_TYPE_NONE
Constant for the borderType property indicating that no border should be drawn around the content.

See Also:
Constant Field Values

BORDER_TYPE_ADJACENT_TO_TABS

public static final int BORDER_TYPE_ADJACENT_TO_TABS
Constant for the borderType property indicating that a border should be drawn immediately adjacent to the tabs only. If the tabs are positioned at the top of the TabPane the border will only be drawn directly beneath the tabs with this setting. If the tabs are positioned at the bottom of the TabPane the border will only be drawn directly above the tabs with this setting. This is the default rendering style.

See Also:
Constant Field Values

BORDER_TYPE_PARALLEL_TO_TABS

public static final int BORDER_TYPE_PARALLEL_TO_TABS
Constant for the borderType property indicating that borders should be drawn above and below the content, but not at its sides.

See Also:
Constant Field Values

BORDER_TYPE_SURROUND

public static final int BORDER_TYPE_SURROUND
Constant for the borderType property indicating that borders should be drawn on all sides of the content.

See Also:
Constant Field Values

TAB_POSITION_BOTTOM

public static final int TAB_POSITION_BOTTOM
Constant for the tabPosition property indicating that the tabs should be rendered beneath the content.

See Also:
Constant Field Values

TAB_POSITION_TOP

public static final int TAB_POSITION_TOP
Constant for the tabPosition property indicating that the tabs should be rendered above the content. This is the default rendering style.

See Also:
Constant Field Values
Constructor Detail

TabPane

public TabPane()
Method Detail

getActiveTabIndex

public int getActiveTabIndex()
Returns the index of the active tab.

Returns:
the active tab index

getBorderType

public int getBorderType()
Returns the mode in which the border will be drawn around the TabPane.

Returns:
the border border type, one of the following values:
  • BORDER_TYPE_NONE
  • BORDER_TYPE_ADJACENT_TO_TABS (the default)
  • BORDER_TYPE_PARALLEL_TO_TABS
  • BORDER_TYPE_SURROUND

getDefaultContentInsets

public nextapp.echo2.app.Insets getDefaultContentInsets()
Returns the default content inset margin. This margin is applied by default to each child component.

Returns:
the default content inset margin

getInsets

public nextapp.echo2.app.Insets getInsets()
Returns the Insets around the entire TabPane. Insets will only be drawn on sides of the TabPane which have a border (i.e., based on the value of the borderType property). Values for this property must be in pixel units.

Returns:
the insets

getTabActiveBackground

public nextapp.echo2.app.Color getTabActiveBackground()
Returns the background color used to render active tabs.

Returns:
the active tab background

getTabActiveBackgroundImage

public nextapp.echo2.app.FillImage getTabActiveBackgroundImage()
Returns the background image used to render active tabs.

Returns:
the active tab background image

getTabActiveBorder

public nextapp.echo2.app.Border getTabActiveBorder()
Returns the Border used to draw the active tab and surround the content of the TabPane.

Returns:
the border

getTabActiveFont

public nextapp.echo2.app.Font getTabActiveFont()
Returns the font used to render active tabs.

Returns:
the active tab font

getTabActiveForeground

public nextapp.echo2.app.Color getTabActiveForeground()
Returns the foreground color used to render active tabs.

Returns:
the active tab foreground

getTabHeight

public nextapp.echo2.app.Extent getTabHeight()
Returns the height of an individual tab. Extent values for this property must be in pixel units.

Returns:
the tab height

getTabInactiveBackground

public nextapp.echo2.app.Color getTabInactiveBackground()
Returns the background color used to render inactive tabs.

Returns:
the inactive tab background

getTabInactiveBackgroundImage

public nextapp.echo2.app.FillImage getTabInactiveBackgroundImage()
Returns the background image used to render inactive tabs.

Returns:
the inactive tab background image

getTabInactiveBorder

public nextapp.echo2.app.Border getTabInactiveBorder()
Returns the Border used to draw inactive tabs.

Returns:
the border

getTabInactiveFont

public nextapp.echo2.app.Font getTabInactiveFont()
Returns the font used to render inactive tabs.

Returns:
the inactive tab font

getTabInactiveForeground

public nextapp.echo2.app.Color getTabInactiveForeground()
Returns the foreground color used to render inactive tabs.

Returns:
the inactive tab foreground

getTabInset

public nextapp.echo2.app.Extent getTabInset()
Returns the horizontal distance from which all tabs are inset from the edge of the TabPane.

Returns:
the tab inset

getTabPosition

public int getTabPosition()
Returns the position where the tabs are located relative to the pane content.

Returns:
the tab position, one of the following values:
  • TAB_POSITION_TOP
  • TAB_POSITION_BOTTOM

getTabSpacing

public nextapp.echo2.app.Extent getTabSpacing()
Returns the horizontal space between individual tabs.

Returns:
the tab spacing

getTabWidth

public nextapp.echo2.app.Extent getTabWidth()
Returns the width of an individual tab.

Returns:
the tab width

isValidParent

public boolean isValidParent(nextapp.echo2.app.Component c)
Overrides:
isValidParent in class nextapp.echo2.app.Component
See Also:
Component.isValidParent(nextapp.echo2.app.Component)

processInput

public void processInput(java.lang.String inputName,
                         java.lang.Object inputValue)
Overrides:
processInput in class nextapp.echo2.app.Component
See Also:
Component.processInput(java.lang.String, java.lang.Object)

setActiveTabIndex

public void setActiveTabIndex(int newValue)
Sets the active tab index.

Parameters:
newValue - the index of the child Component whose tab should be displayed

setBorderType

public void setBorderType(int newValue)
Sets the mode in which the border will be drawn around the TabPane.

Parameters:
newValue - the new border type one of the following values:
  • BORDER_TYPE_NONE
  • BORDER_TYPE_ADJACENT_TO_TABS (the default)
  • BORDER_TYPE_PARALLEL_TO_TABS
  • BORDER_TYPE_SURROUND

setDefaultContentInsets

public void setDefaultContentInsets(nextapp.echo2.app.Insets newValue)
Sets the default content inset margin. This margin is applied by default to each child component.

Parameters:
newValue - the new default content inset margin

setInsets

public void setInsets(nextapp.echo2.app.Insets newValue)
Sets the Insets around the entire TabPane. Insets will only be drawn on sides of the TabPane which have a border (i.e., based on the value of the borderType property). Values for this property must be in pixel units.

Parameters:
newValue - the new inset margin

setTabActiveBackground

public void setTabActiveBackground(nextapp.echo2.app.Color newValue)
Sets the background color used to render active tabs.

Parameters:
newValue - the new active tab background

setTabActiveBackgroundImage

public void setTabActiveBackgroundImage(nextapp.echo2.app.FillImage newValue)
Sets the background image used to render active tabs.

Parameters:
newValue - the new active tab background image

setTabActiveBorder

public void setTabActiveBorder(nextapp.echo2.app.Border newValue)
Sets the Border used to draw the active tab and surround the content of the TabPane.

Parameters:
newValue - the new border

setTabActiveFont

public void setTabActiveFont(nextapp.echo2.app.Font newValue)
Sets the font used to render active tabs.

Parameters:
newValue - the new active tab font

setTabActiveForeground

public void setTabActiveForeground(nextapp.echo2.app.Color newValue)
Sets the foreground color used to render active tabs.

Parameters:
newValue - the new active tab foreground

setTabHeight

public void setTabHeight(nextapp.echo2.app.Extent newValue)
Sets the height of an individual tab. Extent values for this property must be in pixel units.

Parameters:
newValue - the new tab height

setTabInactiveBackground

public void setTabInactiveBackground(nextapp.echo2.app.Color newValue)
Sets the background color used to render inactive tabs.

Parameters:
newValue - the new inactive tab background

setTabInactiveBackgroundImage

public void setTabInactiveBackgroundImage(nextapp.echo2.app.FillImage newValue)
Sets the background image used to render inactive tabs.

Parameters:
newValue - the new inactive tab background image

setTabInactiveBorder

public void setTabInactiveBorder(nextapp.echo2.app.Border newValue)
Sets the Border used to draw inactive tabs in the TabPane.

Parameters:
newValue - the new border

setTabInactiveFont

public void setTabInactiveFont(nextapp.echo2.app.Font newValue)
Sets the font used to render inactive tabs.

Parameters:
newValue - the new inactive tab font

setTabInactiveForeground

public void setTabInactiveForeground(nextapp.echo2.app.Color newValue)
Sets the foreground color used to render inactive tabs.

Parameters:
newValue - the new inactive tab foreground

setTabInset

public void setTabInset(nextapp.echo2.app.Extent newValue)
Sets the horizontal distance from which all tabs are inset from the edge of the TabPane.

Parameters:
newValue - the new tab inset

setTabPosition

public void setTabPosition(int newValue)
Sets the position where the tabs are located relative to the pane content.

Parameters:
newValue - the new tab position, one of the following values:
  • TAB_POSITION_TOP
  • TAB_POSITION_BOTTOM

setTabSpacing

public void setTabSpacing(nextapp.echo2.app.Extent newValue)
Sets the horizontal space between individual tabs.

Parameters:
newValue - the new tab spacing

setTabWidth

public void setTabWidth(nextapp.echo2.app.Extent newValue)
Sets the width of an individual tab.

Parameters:
newValue - the new tab width

NextApp Echo2 Extras
v2.1.0