net.sf.doolin.gui.action.path.item
Class AbstractActionPath

java.lang.Object
  extended by net.sf.doolin.gui.action.path.item.AbstractActionPath
All Implemented Interfaces:
ActionPath
Direct Known Subclasses:
BusMonitoringRefreshActionPath, GUIActionPath, GUIStatusBar, PlaceholderActionPath, ReplacementActionPath, SeparatorActionPath, SubActionPath

public abstract class AbstractActionPath
extends Object
implements ActionPath

Basic implementation for an ActionPath. Its provides support for the stack of paths.

Author:
Damien Coraboeuf

Constructor Summary
AbstractActionPath()
          Constructor with an empty stack.
AbstractActionPath(List<String> paths)
          Constructor with a predefined stack.
 
Method Summary
protected  String getPathID()
          Builds a path identifier from the path stack.
 Stack<String> getPathStack()
          Returns a stack of sub-paths where to install the action.
 String getSource()
          Returns null.
 String getTarget()
          Returns null.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.doolin.gui.action.path.item.ActionPath
install
 

Constructor Detail

AbstractActionPath

public AbstractActionPath()
Constructor with an empty stack.


AbstractActionPath

public AbstractActionPath(List<String> paths)
Constructor with a predefined stack.

Parameters:
paths - List of elements in the stack. It will be reverted to create the stack.
Method Detail

getPathID

protected String getPathID()
Builds a path identifier from the path stack.

Returns:
Identifier

getPathStack

public Stack<String> getPathStack()
Description copied from interface: ActionPath
Returns a stack of sub-paths where to install the action. This stack can be used directly by the called of its method. An empty stack means that the action is installed at the root of the menu builder. Any stack element forces the menu builder to create sub menu builders.

Specified by:
getPathStack in interface ActionPath
Returns:
A stack of path.
See Also:
MenuBuilder

getSource

public String getSource()
Returns null.

Specified by:
getSource in interface ActionPath
Returns:
Identifier

getTarget

public String getTarget()
Returns null.

Specified by:
getTarget in interface ActionPath
Returns:
Identifier or null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.