interactors
Class RouteInteractor

java.lang.Object
  extended by interactors.Interactor
      extended by interactors.RouteInteractor

public class RouteInteractor
extends Interactor

Interaction for creating a relation between two objects.


Field Summary
(package private)  OntologyObject closest
           
(package private)  java.util.ArrayList<DirectionComplexity> directions
           
private  java.util.ArrayList<Edge> edges
           
private  java.util.HashMap<OntologyObject,java.lang.String> hints
           
private  javax.swing.JMenuItem item
           
static int MAX_CONNECTING_CORRIDORS
           
private  javax.swing.JPopupMenu menu
           
static int OPTIMIZATION_WINDOW_HEIGHT
           
static int OPTIMIZATION_WINDOW_WIDTH
           
static int OPTIMIZE_COMPLEXITY
           
static int OPTIMIZE_DISTANCE
           
(package private)  java.util.LinkedHashMap<OntologyObject,java.awt.Color> path
           
private  java.util.ArrayList<DecisionPoint> points
           
(package private)  OntologyObject previousSelected
           
private  Path routePath
           
(package private)  OntologyObject selected
           
private  javax.swing.JSlider slider
           
private  javax.swing.JFrame sliderFrame
           
 
Fields inherited from class interactors.Interactor
handler
 
Constructor Summary
RouteInteractor(InteractionHandler handler)
          Constructs the relation interactor.
 
Method Summary
private  void createOptimizationSlider()
          This method builds and displays the optimization slider.
 void draw(GL gl, GLU glu, GLUT glut)
          Draws a line between the selected object and the current mouse location.
 void endInteraction()
          Closes the complexity tradeoff frame.
 java.awt.Cursor getCursor()
          Gets the relation cursor.
private  void getRoute(OntologyObject start, OntologyObject finish, int optimizationFactor)
           
 void mouseMoved(java.awt.event.MouseEvent arg0)
          Called by the interaction handler when the mouse is moved.
 void mousePressed(java.awt.event.MouseEvent arg0)
          Left click selects an object if no object is selected.
 void startInteraction()
          Called when the interaction handler starts this interaction.
 
Methods inherited from class interactors.Interactor
keyPressed, keyReleased, mouseDragged, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selected

OntologyObject selected

previousSelected

OntologyObject previousSelected

closest

OntologyObject closest

directions

java.util.ArrayList<DirectionComplexity> directions

path

java.util.LinkedHashMap<OntologyObject,java.awt.Color> path

edges

private java.util.ArrayList<Edge> edges

points

private java.util.ArrayList<DecisionPoint> points

sliderFrame

private javax.swing.JFrame sliderFrame

slider

private javax.swing.JSlider slider

OPTIMIZE_COMPLEXITY

public static final int OPTIMIZE_COMPLEXITY
See Also:
Constant Field Values

OPTIMIZE_DISTANCE

public static final int OPTIMIZE_DISTANCE
See Also:
Constant Field Values

OPTIMIZATION_WINDOW_WIDTH

public static final int OPTIMIZATION_WINDOW_WIDTH
See Also:
Constant Field Values

OPTIMIZATION_WINDOW_HEIGHT

public static final int OPTIMIZATION_WINDOW_HEIGHT
See Also:
Constant Field Values

MAX_CONNECTING_CORRIDORS

public static final int MAX_CONNECTING_CORRIDORS
See Also:
Constant Field Values

menu

private javax.swing.JPopupMenu menu

item

private javax.swing.JMenuItem item

hints

private java.util.HashMap<OntologyObject,java.lang.String> hints

routePath

private Path routePath
Constructor Detail

RouteInteractor

public RouteInteractor(InteractionHandler handler)
Constructs the relation interactor.

Parameters:
handler - - the interacion handler
Method Detail

draw

public void draw(GL gl,
                 GLU glu,
                 GLUT glut)
Draws a line between the selected object and the current mouse location.

Overrides:
draw in class Interactor

getCursor

public java.awt.Cursor getCursor()
Gets the relation cursor.

Overrides:
getCursor in class Interactor

startInteraction

public void startInteraction()
Description copied from class: Interactor
Called when the interaction handler starts this interaction.

Overrides:
startInteraction in class Interactor

endInteraction

public void endInteraction()
Closes the complexity tradeoff frame.

Overrides:
endInteraction in class Interactor

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent arg0)
Description copied from class: Interactor
Called by the interaction handler when the mouse is moved.

Overrides:
mouseMoved in class Interactor

mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Left click selects an object if no object is selected. If an object is currently selected, then left click creates a relation between the previously selected object and the newly selected object. Right click deselects the current object or ends the interaction if no object is selected.

Overrides:
mousePressed in class Interactor

createOptimizationSlider

private void createOptimizationSlider()
This method builds and displays the optimization slider.


getRoute

private void getRoute(OntologyObject start,
                      OntologyObject finish,
                      int optimizationFactor)