org.openpermis.editor.policy.view
Class ToolTrackerAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.openpermis.editor.policy.gui.SelectableAction
          extended by org.openpermis.editor.policy.view.ToolTrackerAction
All Implemented Interfaces:
ActionListener, ItemListener, Serializable, Cloneable, EventListener, Action, ViewContextListener

public class ToolTrackerAction
extends SelectableAction
implements ViewContextListener

Action that tracks the state of a tool.

Opens and closes the tool if the action is executed.

See Also:
Serialized Form
Since:
0.1.0

Field Summary
private  Tool tool
          The tool to track.
private  ViewContext viewContext
          The view context of the tool to track.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ToolTrackerAction(Tool tool, ViewContext viewContext)
          Creates a new tool tracker for the specified tool and view context.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void viewActivated(View view)
          Indicates that a view has been activated in a view context.
 void viewClosed(View view)
          Indicates that a view has been closed in a view context.
 void viewDeactivated(View view)
          Indicates that a view has been deactivated in a view context.
 void viewOpened(View view)
          Indicates that a view has been opened in a view context.
 
Methods inherited from class org.openpermis.editor.policy.gui.SelectableAction
createCheckBox, createCheckBox, createCheckBoxMenuItem, createCheckBoxMenuItem, createToggleButton, createToggleButton, isSelected, isSelected, isSelectionEvent, itemStateChanged, setSelected
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tool

private final Tool tool
The tool to track.

Since:
0.1.0

viewContext

private final ViewContext viewContext
The view context of the tool to track.

Since:
0.1.0
Constructor Detail

ToolTrackerAction

public ToolTrackerAction(Tool tool,
                         ViewContext viewContext)
Creates a new tool tracker for the specified tool and view context.

Notes:
The tool must not be opened at the time the tracker is created!
Parameters:
tool - the tool to track.
viewContext - the view context of the tool to track.
Since:
0.1.0
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Specified by:
actionPerformed in class SelectableAction
Since:
0.1.0

viewActivated

public void viewActivated(View view)
Description copied from interface: ViewContextListener
Indicates that a view has been activated in a view context.

Specified by:
viewActivated in interface ViewContextListener
Parameters:
view - the view that has been activated.
Since:
0.1.0

viewDeactivated

public void viewDeactivated(View view)
Description copied from interface: ViewContextListener
Indicates that a view has been deactivated in a view context.

Specified by:
viewDeactivated in interface ViewContextListener
Parameters:
view - the view that has been deactivated.
Since:
0.1.0

viewOpened

public void viewOpened(View view)
Description copied from interface: ViewContextListener
Indicates that a view has been opened in a view context.

Specified by:
viewOpened in interface ViewContextListener
Parameters:
view - the view that has been opened.
Since:
0.1.0

viewClosed

public void viewClosed(View view)
Description copied from interface: ViewContextListener
Indicates that a view has been closed in a view context.

Specified by:
viewClosed in interface ViewContextListener
Parameters:
view - the view that has been closed.
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG