com.norbl.cbp.ppe.gui.networkspec
Class NetworkSpecGui
java.lang.Object
com.norbl.cbp.ppe.gui.networkspec.NetworkSpecGui
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class NetworkSpecGui
- extends java.lang.Object
- implements java.awt.event.ActionListener
Gathers info and provides logic for entering a network spec.
The actual gui is drawn by NetworkSpecGuiFrame
; this
class provides all the logic.
Usage:
- The constructor creates the initial choices that will be
displayed for each param to be specified in the gui. This includes
disabling certain choices.
- The
fillSpec()
methods is then called to create
the gui in a separate thread. This method blocks until
the user submits or cancels the spec.
- This class is the gui's action handler.
- When the user makes a choice, an action is fired that
invokes the
#updateRe()
method. This method
may check the users's input (for some params) and
resets the 'enable' state of all choices based on which
choices are now feasible and/or relevant. E.g choosing
an instance type limits the feasible amis.
- When the user enters ok, parameters are checked. If ok.
the spec is checked, and if ok user gets the final
approval dialog.
- If the user entes 'cancel' the spec gui is disposed of.
Field Summary |
static java.lang.String |
CANCEL
|
static java.lang.String |
FINISH
|
Constructor Summary |
NetworkSpecGui(PPEManager ppeManager,
java.lang.Class amiChoiceClass,
java.lang.Class guiFrameClass,
java.lang.String networkName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CANCEL
public static final java.lang.String CANCEL
- See Also:
- Constant Field Values
FINISH
public static final java.lang.String FINISH
- See Also:
- Constant Field Values
NetworkSpecGui
public NetworkSpecGui(PPEManager ppeManager,
java.lang.Class amiChoiceClass,
java.lang.Class guiFrameClass,
java.lang.String networkName)
throws java.lang.Exception
- Throws:
java.lang.Exception
fillSpec
public boolean fillSpec()
fillSpec()
launches the network spec gui in a
separate thread. It then sleeps until params have been
entered.
- Returns:
choicesToNetworkSpec
public NetworkSpec choicesToNetworkSpec()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener