GoGraph
v1.0


gograph.actions.go
Class SwitchExecAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--gograph.actions.go.SwitchExecAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
AlgoSelectAction

public class SwitchExecAction
extends javax.swing.AbstractAction

Switch to execution mode.

See Also:
GoGraph, GGExecPanel, Serialized Form

Field Summary
protected  GGGraph editorGraph
          Access to current editing graph.
protected  GGGraph execGraph
          Access to current executing graph.
protected  GoGraph gograph
          Access back to GoGraph panel.
 
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
SwitchExecAction(GoGraph gograph, javax.swing.ImageIcon icon, GGGraph editorGraph, GGGraph execGraph)
          Creates a new instance of SwitchExecAction.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Switch to execution mode.
 java.lang.String selectAlgo()
          Select an algorithm for execution.
 
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

gograph

protected GoGraph gograph
Access back to GoGraph panel.


editorGraph

protected GGGraph editorGraph
Access to current editing graph.


execGraph

protected GGGraph execGraph
Access to current executing graph.

Constructor Detail

SwitchExecAction

public SwitchExecAction(GoGraph gograph,
                        javax.swing.ImageIcon icon,
                        GGGraph editorGraph,
                        GGGraph execGraph)
Creates a new instance of SwitchExecAction.

Parameters:
gograph - Access back to GoGraph panel.
icon - Action icon.
editorGraph - Current editing graph.
execGraph - Current executing graph.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Switch to execution mode.

Execution pane is enabled, edition pane is disabled. Editing graph is copied in executing graph. Available actions in menubar and toolbar are updated.

Parameters:
e - Evenement source.

selectAlgo

public java.lang.String selectAlgo()
Select an algorithm for execution.

When switching from edition mode, no algorithm has yet been selected, no reinitialisation warning needed.

Returns:
Algorithm name.

GoGraph
v1.0


Copyright (C) 2003 Stewe Frei. All rights reserved.