NextApp Echo3 Extras
v3.0.b8

nextapp.echo.extras.app
Class AccordionPane

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by nextapp.echo.extras.app.AccordionPane
All Implemented Interfaces:
Serializable, Pane, PaneContainer, RenderIdSupport

public class AccordionPane
extends Component
implements Pane, PaneContainer

AccordionPane component: contains multiple children in vertically arranged tabs that slide up and down to reveal a single child at a time. May contain multiple children. May contain Panes as children.

See Also:
Serialized Form

Field Summary
static String ACTIVE_TAB_INDEX_CHANGED_PROPERTY
           
static int DEFAULT_ANIMATION_TIME
           
static String INPUT_TAB_SELECT
           
static String PROPERTY_ANIMATION_TIME
           
static String PROPERTY_DEFAULT_CONTENT_INSETS
           
static String PROPERTY_TAB_BACKGROUND
           
static String PROPERTY_TAB_BACKGROUND_IMAGE
           
static String PROPERTY_TAB_BORDER
           
static String PROPERTY_TAB_FONT
           
static String PROPERTY_TAB_FOREGROUND
           
static String PROPERTY_TAB_INSETS
           
static String PROPERTY_TAB_ROLLOVER_BACKGROUND
           
static String PROPERTY_TAB_ROLLOVER_BACKGROUND_IMAGE
           
static String PROPERTY_TAB_ROLLOVER_BORDER
           
static String PROPERTY_TAB_ROLLOVER_ENABLED
           
static String PROPERTY_TAB_ROLLOVER_FONT
           
static String PROPERTY_TAB_ROLLOVER_FOREGROUND
           
static String TAB_SELECTION_LISTENERS_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_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
AccordionPane()
          Default constructor.
 
Method Summary
 void addTabSelectionListener(TabSelectionListener l)
          Adds a TabSelectionListener to receive event notifications.
protected  void fireTabSelected(int tabIndex)
          Notifies TabSelectionListeners that the user has selected a tab.
 int getActiveTabIndex()
          Returns the index of the active tab.
 int getAnimationTime()
          Returns the animation time (in milliseconds).
 Insets getDefaultContentInsets()
          Returns the default content inset margin.
 Color getTabBackground()
          Returns the tab background color.
 FillImage getTabBackgroundImage()
          Returns the tab background image.
 Border getTabBorder()
          Returns the tab border.
 Font getTabFont()
          Returns the tab font.
 Color getTabForeground()
          Returns the tab foreground color.
 Insets getTabInsets()
          Returns the tab inset margin.
 Color getTabRolloverBackground()
          Returns the tab rollover background color.
 FillImage getTabRolloverBackgroundImage()
          Returns the tab rollover background image.
 Border getTabRolloverBorder()
          Returns the tab rollover border.
 Font getTabRolloverFont()
          Returns the tab rollover font.
 Color getTabRolloverForeground()
          Returns the tab rollover foreground color.
 boolean hasTabSelectionListeners()
          Determines the any TabSelectionListeners are registered.
 boolean isTabRolloverEnabled()
          Determines whether rollover effects are enabled.
 boolean isValidParent(Component c)
           
 void processInput(String inputName, Object inputValue)
           
 void removeTabSelectionListener(TabSelectionListener l)
          Removes a TabSelectionListener from receiving event notifications.
 void setActiveTabIndex(int newValue)
          Sets the active tab index.
 void setAnimationTime(int newValue)
          Sets the animation time (in milliseconds).
 void setDefaultContentInsets(Insets newValue)
          Sets the default content inset margin.
 void setTabBackground(Color newValue)
          Sets the tab background color.
 void setTabBackgroundImage(FillImage newValue)
          Sets the tab background image.
 void setTabBorder(Border newValue)
          Sets the tab border.
 void setTabFont(Font newValue)
          Sets the tab font.
 void setTabForeground(Color newValue)
          Sets the tab foreground color.
 void setTabInsets(Insets newValue)
          Sets the tab inset margin.
 void setTabRolloverBackground(Color newValue)
          Sets the tab rollover background color.
 void setTabRolloverBackgroundImage(FillImage newValue)
          Sets the tab rollover background image.
 void setTabRolloverBorder(Border newValue)
          Sets the tab rollover border.
 void setTabRolloverEnabled(boolean newValue)
          Sets whether tab rollover effects are enabled.
 void setTabRolloverFont(Font newValue)
          Sets the tab rollover font.
 void setTabRolloverForeground(Color newValue)
          Sets the tab rollover foreground color.
 void userTabSelect(int tabIndex)
          Processes a user request to select the tab with the given index.
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, 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

ACTIVE_TAB_INDEX_CHANGED_PROPERTY

public static final String ACTIVE_TAB_INDEX_CHANGED_PROPERTY
See Also:
Constant Field Values

TAB_SELECTION_LISTENERS_CHANGED_PROPERTY

public static final String TAB_SELECTION_LISTENERS_CHANGED_PROPERTY
See Also:
Constant Field Values

DEFAULT_ANIMATION_TIME

public static final int DEFAULT_ANIMATION_TIME
See Also:
Constant Field Values

INPUT_TAB_SELECT

public static final String INPUT_TAB_SELECT
See Also:
Constant Field Values

PROPERTY_ANIMATION_TIME

public static final String PROPERTY_ANIMATION_TIME
See Also:
Constant Field Values

PROPERTY_DEFAULT_CONTENT_INSETS

public static final String PROPERTY_DEFAULT_CONTENT_INSETS
See Also:
Constant Field Values

PROPERTY_TAB_BACKGROUND

public static final String PROPERTY_TAB_BACKGROUND
See Also:
Constant Field Values

PROPERTY_TAB_BACKGROUND_IMAGE

public static final String PROPERTY_TAB_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_TAB_BORDER

public static final String PROPERTY_TAB_BORDER
See Also:
Constant Field Values

PROPERTY_TAB_FONT

public static final String PROPERTY_TAB_FONT
See Also:
Constant Field Values

PROPERTY_TAB_FOREGROUND

public static final String PROPERTY_TAB_FOREGROUND
See Also:
Constant Field Values

PROPERTY_TAB_INSETS

public static final String PROPERTY_TAB_INSETS
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_BACKGROUND

public static final String PROPERTY_TAB_ROLLOVER_BACKGROUND
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_BACKGROUND_IMAGE

public static final String PROPERTY_TAB_ROLLOVER_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_BORDER

public static final String PROPERTY_TAB_ROLLOVER_BORDER
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_ENABLED

public static final String PROPERTY_TAB_ROLLOVER_ENABLED
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_FONT

public static final String PROPERTY_TAB_ROLLOVER_FONT
See Also:
Constant Field Values

PROPERTY_TAB_ROLLOVER_FOREGROUND

public static final String PROPERTY_TAB_ROLLOVER_FOREGROUND
See Also:
Constant Field Values
Constructor Detail

AccordionPane

public AccordionPane()
Default constructor.

Method Detail

addTabSelectionListener

public void addTabSelectionListener(TabSelectionListener l)
Adds a TabSelectionListener to receive event notifications.

Parameters:
l - the TabSelectionListener to add

fireTabSelected

protected void fireTabSelected(int tabIndex)
Notifies TabSelectionListeners that the user has selected a tab.


getActiveTabIndex

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

Returns:
the active tab index

getAnimationTime

public int getAnimationTime()
Returns the animation time (in milliseconds). A value of zero indicates animation is disabled.

Returns:
the animation time

getDefaultContentInsets

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

Returns:
the default content inset margin

getTabBackground

public Color getTabBackground()
Returns the tab background color.

Returns:
the tab background color

getTabBackgroundImage

public FillImage getTabBackgroundImage()
Returns the tab background image.

Returns:
the tab background image

getTabBorder

public Border getTabBorder()
Returns the tab border.

Returns:
the tab border

getTabFont

public Font getTabFont()
Returns the tab font.

Returns:
the tab font

getTabForeground

public Color getTabForeground()
Returns the tab foreground color.

Returns:
the tab foreground color

getTabInsets

public Insets getTabInsets()
Returns the tab inset margin.

Returns:
the tab inset margin

getTabRolloverBackground

public Color getTabRolloverBackground()
Returns the tab rollover background color.

Returns:
the tab rollover background color

getTabRolloverBackgroundImage

public FillImage getTabRolloverBackgroundImage()
Returns the tab rollover background image.

Returns:
the tab rollover background image

getTabRolloverBorder

public Border getTabRolloverBorder()
Returns the tab rollover border.

Returns:
the tab rollover border

getTabRolloverFont

public Font getTabRolloverFont()
Returns the tab rollover font.

Returns:
the tab rollover font

getTabRolloverForeground

public Color getTabRolloverForeground()
Returns the tab rollover foreground color.

Returns:
the tab rollover foreground color

hasTabSelectionListeners

public boolean hasTabSelectionListeners()
Determines the any TabSelectionListeners are registered.

Returns:
true if any TabSelectionListeners are registered

isTabRolloverEnabled

public boolean isTabRolloverEnabled()
Determines whether rollover effects are enabled. Default value is true.

Returns:
true if rollover effects should be enabled.

isValidParent

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

processInput

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

removeTabSelectionListener

public void removeTabSelectionListener(TabSelectionListener l)
Removes a TabSelectionListener from receiving event notifications.

Parameters:
l - the TabSelectionListener to remove

setActiveTabIndex

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

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

setAnimationTime

public void setAnimationTime(int newValue)
Sets the animation time (in milliseconds). A value of zero indicates animation is disabled.

Parameters:
newValue - the new animation time

setDefaultContentInsets

public void setDefaultContentInsets(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

setTabBackground

public void setTabBackground(Color newValue)
Sets the tab background color.

Parameters:
newValue - the new tab background color

setTabBackgroundImage

public void setTabBackgroundImage(FillImage newValue)
Sets the tab background image.

Parameters:
newValue - the new tab background image

setTabBorder

public void setTabBorder(Border newValue)
Sets the tab border.

Parameters:
newValue - the new tab border

setTabFont

public void setTabFont(Font newValue)
Sets the tab font.

Parameters:
newValue - the new tab font

setTabForeground

public void setTabForeground(Color newValue)
Sets the tab foreground color.

Parameters:
newValue - the new tab foreground color

setTabInsets

public void setTabInsets(Insets newValue)
Sets the tab inset margin.

Parameters:
newValue - the new tab inset margin

setTabRolloverBackground

public void setTabRolloverBackground(Color newValue)
Sets the tab rollover background color.

Parameters:
newValue - the new tab rollover background color

setTabRolloverBackgroundImage

public void setTabRolloverBackgroundImage(FillImage newValue)
Sets the tab rollover background image.

Parameters:
newValue - the new tab rollover background image

setTabRolloverBorder

public void setTabRolloverBorder(Border newValue)
Sets the tab rollover border.

Parameters:
newValue - the new tab rollover border

setTabRolloverEnabled

public void setTabRolloverEnabled(boolean newValue)
Sets whether tab rollover effects are enabled.

Parameters:
newValue - the new rollover effect state

setTabRolloverFont

public void setTabRolloverFont(Font newValue)
Sets the tab rollover font.

Parameters:
newValue - the new tab rollover font

setTabRolloverForeground

public void setTabRolloverForeground(Color newValue)
Sets the tab rollover foreground color.

Parameters:
newValue - the new tab rollover foreground color

userTabSelect

public void userTabSelect(int tabIndex)
Processes a user request to select the tab with the given index.

Parameters:
tabIndex - the new tab index

NextApp Echo3 Extras
v3.0.b8