ARoad0.gDMak
Class ActionOpenGraphicView

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

public class ActionOpenGraphicView
extends javax.swing.AbstractAction
implements Singleton

An action that opens a GraphicView in a frame.

Since:
0.5.0
See Also:
Serialized Form

Field Summary
private  javax.swing.JDialog dialog_
           
private static javax.swing.ImageIcon icon__
           
private static ActionOpenGraphicView instance__
           
private  javax.swing.JList jlist_
           
 
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 ActionOpenGraphicView()
          with this private constructor, the compiler won't generate a default public constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent _ev)
           
static ActionOpenGraphicView getInstance()
          Only method to get an instance.
static java.beans.PropertyDescriptor getViewPropertyDescriptor(ImmutableName _name)
          Constructs the property descriptor for the open view in the 'Full views' or 'NoMore-NoLess views' tabbed pane, where the display name is the ViewInBase name.
 void openView(java.lang.Object[] _l_names)
          Called by actionPerformed(ActionEvent) to open the selected EPRviews, to display their resources in the explorer and display the view in a frame.
static void openViewInGui(EPRViewInBase _view, boolean _createInExplorer, java.util.Map _m_GUIconfig)
          Invoked by openView(), ActionNewView, ActionOpenMainFrame, Desktop, ActionCopy to create a GraphicEPRView or a GraphicNoThanView for a EPRViewInBase or a NoThanViewInBase, to display their resources in the explorer, and to display the view in a frame or in one of the two 'all views' frames.
private static void restoreMainAndSeeWhyFrames(ImmutableName _name, javax.swing.JInternalFrame _frame, java.util.Map _m_GUIconfig)
          Opens the 'See why' frame and set the bounds of the main and 'See why' frames, if it is required in the GUI configuration.
 
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 ActionOpenGraphicView instance__

icon__

private static javax.swing.ImageIcon icon__

dialog_

private javax.swing.JDialog dialog_

jlist_

private javax.swing.JList jlist_
Constructor Detail

ActionOpenGraphicView

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

Method Detail

getInstance

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

Returns:
ActionOpenGraphicView

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent _ev)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
_ev - ActionEvent

openView

public void openView(java.lang.Object[] _l_names)
Called by actionPerformed(ActionEvent) to open the selected EPRviews, to display their resources in the explorer and display the view in a frame. Call openViewInGui().

Parameters:
_l_names - is the list of view names to open

openViewInGui

public static void openViewInGui(EPRViewInBase _view,
                                 boolean _createInExplorer,
                                 java.util.Map _m_GUIconfig)
Invoked by openView(), ActionNewView, ActionOpenMainFrame, Desktop, ActionCopy to create a GraphicEPRView or a GraphicNoThanView for a EPRViewInBase or a NoThanViewInBase, to display their resources in the explorer, and to display the view in a frame or in one of the two 'all views' frames. No check if the view is already open in a frame or a tab. This method works in the event dispatch thread, and calls a worker thread to create the graphic view. The worker thread calls back the event dispatch thread to display the view in a tab or in a frame.

Parameters:
_view - to open
_createInExplorer - is false if the view is already open in the explorer
_m_GUIconfig - is the GUI configuration map. May be null.

restoreMainAndSeeWhyFrames

private static void restoreMainAndSeeWhyFrames(ImmutableName _name,
                                               javax.swing.JInternalFrame _frame,
                                               java.util.Map _m_GUIconfig)
Opens the 'See why' frame and set the bounds of the main and 'See why' frames, if it is required in the GUI configuration. The graphic view must have been registered in ViewModel. Noop if _m_GUIconfig does not contain the right data. Does not restore the node locations in the GraphicView, since only the frames are handled. Called by openViewInGui() in the event dispatch thread.

Parameters:
_name - is the open ViewInBase name, after the creation of the relevant graphic view
_frame - is the main frame of the view
_m_GUIconfig - is the GUI configuration map. May be null.

getViewPropertyDescriptor

public static java.beans.PropertyDescriptor getViewPropertyDescriptor(ImmutableName _name)
Constructs the property descriptor for the open view in the 'Full views' or 'NoMore-NoLess views' tabbed pane, where the display name is the ViewInBase name. Called by openViewInGui() and ActionOpenAllFull/NoThanViews.getAllViewsPropertyDescriptors().

Parameters:
_name - is the open ViewInBase name
Returns:
the descriptor