NextApp Echo
1.0.5

nextapp.echo
Class StackedPane

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.AbstractPane
          extended bynextapp.echo.ContainerPane
              extended bynextapp.echo.StackedPane
All Implemented Interfaces:
java.io.Serializable

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_WIDTH_CHANGED_PROPERTY, STYLE_ORIENTATION
 
Fields inherited from class nextapp.echo.AbstractPane
PROPORTIONAL, RESIZABLE_CHANGED_PROPERTY, STYLE_RESIZABLE
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_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.
private  void fireVisiblePaneChanged()
          Notifies ChangeListeners that the visible pane has changed.
 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.
private  void verifyAddition(AbstractPane pane)
          Verifies pane addition operation to ensure panes are not added multiple times.
 
Methods inherited from class nextapp.echo.ContainerPane
add, add, applyStyle, getHeight, getOrientation, getPreferredHeight, getPreferredWidth, getWidth, remove, setOrientation, setPreferredHeight, setPreferredWidth
 
Methods inherited from class nextapp.echo.AbstractPane
isResizable, setResizable
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setRegistered, 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.

fireVisiblePaneChanged

private void fireVisiblePaneChanged()
Notifies ChangeListeners that the visible pane has changed.


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.

verifyAddition

private void verifyAddition(AbstractPane pane)
Verifies pane addition operation to ensure panes are not added multiple times.

Parameters:
pane - The pane to verify for addition.

NextApp Echo
1.0.5