nextapp.echo
Class StackedPane

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.AbstractPane
          extended by nextapp.echo.ContainerPane
              extended by nextapp.echo.StackedPane
All Implemented Interfaces:
java.io.Serializable, Component

public class StackedPane
extends ContainerPane

A stacked pane resembles a stack of cards in concept. While panes may be added and removed from a StackedPane, only the top pane is visible. A StackedPane is useful when an application needs to offer a user interface where users can navigate down and then back up a hierarchy.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.ContainerPane
CONTENT_CHANGED_PROPERTY, ORIENTATION_CHANGED_PROPERTY, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, PREFERRED_HEIGHT_CHANGED_PROPERTY, PREFERRED_HEIGHT_EXTENT_CHANGED_PROPERTY, PREFERRED_WIDTH_CHANGED_PROPERTY, PREFERRED_WIDTH_EXTENT_CHANGED_PROPERTY, STYLE_ORIENTATION
 
Fields inherited from class nextapp.echo.AbstractPane
PROPORTIONAL, RESIZABLE_CHANGED_PROPERTY, STYLE_RESIZABLE
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
StackedPane()
           
 
Method Summary
 void addChangeListener(ChangeListener l)
          Adds a listener to be notified of change events.
 AbstractPane close()
          Closes the top pane.
 void close(AbstractPane pane)
          Closes the specified pane.
 void closeUntilVisible(AbstractPane pane)
          Closes panes until the specified pane is again visible.
 AbstractPane getPane(int index)
          Returns the pane at the specified index.
 AbstractPane getVisiblePane()
          Returns the currently visible (top) pane.
 void insert(int index, AbstractPane pane)
          Inserts the pane into the stacked pane.
 void open(AbstractPane pane)
          Opens a new pane.
 void removeChangeListener(ChangeListener l)
          Removes a listener from being notified of change events.
 void replaceVisiblePane(AbstractPane pane)
          Replaces the currently visible pane with the provided pane.
 int size()
          Returns the number of panes in this StackedPane.
 
Methods inherited from class nextapp.echo.ContainerPane
add, add, applyStyle, getHeightExtent, getOrientation, getPreferredHeight, getPreferredHeightExtent, getPreferredWidth, getPreferredWidthExtent, getWidthExtent, remove, setOrientation, setPreferredHeight, setPreferredHeightExtent, setPreferredWidth, setPreferredWidthExtent
 
Methods inherited from class nextapp.echo.AbstractPane
getHeight, getWidth, isResizable, setResizable
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackedPane

public StackedPane()
Method Detail

addChangeListener

public void addChangeListener(ChangeListener l)
Adds a listener to be notified of change events. The listener will be notified when the visible pane has changed.

Parameters:
l - The ChangeListener to be added.

close

public AbstractPane close()
Closes the top pane.

Returns:
The pane that was closed.
Throws:
java.lang.IllegalStateException - If called when no child panes exist in the StackedPane.

close

public void close(AbstractPane pane)
Closes the specified pane.

Parameters:
pane - The pane to be closed.

closeUntilVisible

public void closeUntilVisible(AbstractPane pane)
Closes panes until the specified pane is again visible.

Parameters:
pane - The pane that should be made visible.

getPane

public AbstractPane getPane(int index)
Returns the pane at the specified index.

Parameters:
index - The index of the pane.
Returns:
The pane at the specified index.

getVisiblePane

public AbstractPane getVisiblePane()
Returns the currently visible (top) pane.

Returns:
the currently visible (top) pane.

insert

public void insert(int index,
                   AbstractPane pane)
Inserts the pane into the stacked pane. The pane will be made visible if the specified index is one greater than that the previously currently pane.

Parameters:
index - The index at which to insert the pane.
pane - The pane to be inserted.

open

public void open(AbstractPane pane)
Opens a new pane.

Parameters:
pane - The pane to open.

replaceVisiblePane

public void replaceVisiblePane(AbstractPane pane)
Replaces the currently visible pane with the provided pane.

Parameters:
pane - The new visible pane.

size

public int size()
Returns the number of panes in this StackedPane. This number includes both the obscured panes and the open pane.

Returns:
The number of panes in this StackedPane.

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a listener from being notified of change events.

Parameters:
l - The ChangeListener to be added.