ARoad0.gDMak
Class ActionOpenSketcher

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ARoad0.gDMak.ActionOpenSketcher
All Implemented Interfaces:
Singleton, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, javax.swing.event.TreeSelectionListener

public class ActionOpenSketcher
extends javax.swing.AbstractAction
implements Singleton, javax.swing.event.TreeSelectionListener

An action that opens a GraphicSketchView for any currently-selected object in the explorer.

See Also:
GraphicSketchView, Serialized Form

Field Summary
private static javax.swing.ImageIcon icon__
           
private static ActionOpenSketcher instance__
           
static Name SKETCH_VIEW_NAME
           
static java.lang.String SKETCH_VIEW_STRING
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
private ActionOpenSketcher()
          with this private constructor, the compiler won't generate a default public constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent _ev)
          Manages opening commands from one source: - from 'Open Sketcher' in the main menu, when in the explorer tree, a node is selected.
static ActionOpenSketcher getInstance()
          Only method to get an instance.
private static void openSelection(java.lang.Object[] _l_analyzedEvent)
          Opens the selected base object in the sketcher, which has to be open.
static ViewInBase openSketcher(java.lang.Object[] _l_analyzedEvent)
          Invoked by actionPerformed() and Desktop to display the 'Sketcher' window.
 void valueChanged(javax.swing.event.TreeSelectionEvent _ev)
          Manages the displaying of a base object in the sketcher when, in the explorer tree, a node is selected.
 
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

instance__

private static ActionOpenSketcher instance__

SKETCH_VIEW_STRING

public static final java.lang.String SKETCH_VIEW_STRING
See Also:
Constant Field Values

SKETCH_VIEW_NAME

public static final Name SKETCH_VIEW_NAME

icon__

private static javax.swing.ImageIcon icon__
Constructor Detail

ActionOpenSketcher

private ActionOpenSketcher()
with this private constructor, the compiler won't generate a default public constructor

Method Detail

getInstance

public static ActionOpenSketcher getInstance()
Only method to get an instance.

Returns:
ActionOpenSketcher

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent _ev)
Manages opening commands from one source: - from 'Open Sketcher' in the main menu, when in the explorer tree, a node is selected.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
_ev - ActionEvent produced by the click on "Open Sketcher".

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent _ev)
Manages the displaying of a base object in the sketcher when, in the explorer tree, a node is selected. No action if the sketcher is closed, or if a PropertyEditor or BaseObjectHandler listens a selection in the explorer. Based on TreeManager.analyzeSelectedNodeInExplorer()

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener
Parameters:
_ev - is from the explorer tree

openSketcher

public static ViewInBase openSketcher(java.lang.Object[] _l_analyzedEvent)
Invoked by actionPerformed() and Desktop to display the 'Sketcher' window.

Parameters:
_l_analyzedEvent - is an Object[] of three items: 0- String type of the selected base object from TreeManager.analyzeSelectedNodeInExplorer() - may be null 1- ImmutableName name of the base object - may be null 2- JInternalFrame open main frame of the base object - may be null
Returns:
the 'Sketcher' SketchViewInBase or null

openSelection

private static void openSelection(java.lang.Object[] _l_analyzedEvent)
Opens the selected base object in the sketcher, which has to be open. Called by openSketcher() and valueChanged(). Process the following ACSObjects: actor, resource, ec_resource, groupid, userid. Do not process metarights, acsrights, AclEntries and privileges. No operation if the selected object in the explorer is an acsrun, a metaright, an acsright, an aclentry, a privilege, a view or an acs, and this is the main difference with the beamer.

Parameters:
_l_analyzedEvent - is an Object[] of three items: 0- String type of the selected base object ("acs", "acsrun", "resource", "actor", "ec_resource", "groupid", "userid", "aclentry", "virtualfolder", "privilege" or "view") - may be null 1- ImmutableName name of the base object - may be null 2- JInternalFrame open main frame of the base object - may be null