actions
Class LoadConstraintsAction

java.lang.Object
  extended by actions.LoadConstraintsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class LoadConstraintsAction
extends java.lang.Object
implements java.awt.event.ActionListener

Action for loading constraints from a file.


Field Summary
private static java.util.ArrayList<Constraint> constraints
          the list of loaded constraints
private  InteractionHandler handler
          the interaction handler
private static Map map
          the previously loaded map
 
Constructor Summary
LoadConstraintsAction(InteractionHandler handler)
          Constructs a constraint loader action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
          Displays a dialog allowing the user to select a constraint file and loads the constraints.
static java.util.ArrayList<Constraint> getConstraints(InteractionHandler handler)
          Gets the list of constraints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

private InteractionHandler handler
the interaction handler


map

private static Map map
the previously loaded map


constraints

private static java.util.ArrayList<Constraint> constraints
the list of loaded constraints

Constructor Detail

LoadConstraintsAction

public LoadConstraintsAction(InteractionHandler handler)
Constructs a constraint loader action.

Parameters:
handler - - the interaction handler
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
Displays a dialog allowing the user to select a constraint file and loads the constraints.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getConstraints

public static java.util.ArrayList<Constraint> getConstraints(InteractionHandler handler)
Gets the list of constraints. If no constraints are loaded, then a file dialog is displayed.

Parameters:
handler - - the interaction handler
Returns:
- the constraints