verinec.gui.configurator
Class Configurator

java.lang.Object
  extended by verinec.gui.configurator.Configurator
All Implemented Interfaces:
IVerinecModule

public class Configurator
extends Object
implements IVerinecModule

Main class for the network configuration module.

Because most of the functionality for modifying the network is provided by the core, we just attach context menues to the nodes to allow mouse interactiv operations to change the network.

Introduces the following additional keyboard shortcuts

Author:
david.buchmann at unifr.ch

Nested Class Summary
(package private)  class Configurator.AddBindingAction
          Actions for MultiInterfaces, that is the Add Binding action.
(package private)  class Configurator.ChangeSideAction
          Action to change the side of an interface.
(package private)  class Configurator.DeconnectAction
          Action for visible (Multi) bindings and for SingleInterfaces, handles the Deconnect.
(package private)  class Configurator.DeleteAction
           
(package private)  class Configurator.DrawPanelMouse
          Additional mouse listener for the DrawPanel.
(package private)  class Configurator.EscKeyAction
          Listener for keyboard typing, reacts on esc key in edit mode to end node creation.
(package private)  class Configurator.InvertNodeSelectionAction
          Action to invert selection, that is select all previously unselected nodes and deselect all currently selected nodes.
(package private)  class Configurator.PCNodeAction
          Action for the PCNodes, that is add interfaces.
(package private)  class Configurator.PropertiesAction
           
(package private)  class Configurator.SelectAllAction
          Action to select all nodes in this network.
(package private)  class Configurator.UnSelectAllAction
          Action to unselect all nodes currently selected.
 
Field Summary
private  DrawPanel drawPanel
           
private  VerinecStudio gui
           
private  NodesToolbar nodesToolbar
           
private  MouseListener panelMouse
           
private  WireConnectionListener wireMouse
           
 
Constructor Summary
Configurator()
           
 
Method Summary
 void load(VerinecStudio parent)
          Load this module to be the active module.
 String toString()
          The toString method should just return the modules name for the module selection dropdown.
 void unload()
          Unload this module, it can clean up its own stuff etc.
 void updateComponent(NwComponent c)
          Adds context menues depending on the types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wireMouse

private WireConnectionListener wireMouse

panelMouse

private MouseListener panelMouse

gui

private VerinecStudio gui

drawPanel

private DrawPanel drawPanel

nodesToolbar

private NodesToolbar nodesToolbar
Constructor Detail

Configurator

public Configurator()
Method Detail

toString

public String toString()
Description copied from interface: IVerinecModule
The toString method should just return the modules name for the module selection dropdown.

Specified by:
toString in interface IVerinecModule
Overrides:
toString in class Object
Returns:
The module name for the dropdown.
See Also:
IVerinecModule.toString()

load

public void load(VerinecStudio parent)
          throws VerinecException
Description copied from interface: IVerinecModule
Load this module to be the active module. A module can rely on this method being called before it is used, except for the three configuration methods. During this method call, however, it is not yet the active module in the analyser. The module is unloaded and loaded again when an other network is opened in the gui.

Specified by:
load in interface IVerinecModule
Parameters:
parent - The analyser to use for call backs.
Throws:
VerinecException - If something goes wrong while loading. The module will not be used after throwing an exception.
See Also:
IVerinecModule.load(verinec.gui.VerinecStudio)

unload

public void unload()
Description copied from interface: IVerinecModule
Unload this module, it can clean up its own stuff etc. The module does not need to clean up the GUI, the framework will remove all context menues and toolbars added.

Specified by:
unload in interface IVerinecModule
See Also:
IVerinecModule.unload()

updateComponent

public void updateComponent(NwComponent c)
Adds context menues depending on the types. When the module is loading, this method is called for each NwComponent to update the component.

Parameters:
c - The component to update.

Copyright © 2005 Verinec, DIUF