edu.wpi.cs.dsrg.xmldb.xat.component.gui.listeners
Class StatsInteractor

java.lang.Object
  |
  +--diva.canvas.interactor.AbstractInteractor
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.component.gui.listeners.StatsInteractor
All Implemented Interfaces:
java.util.EventListener, diva.canvas.interactor.Interactor, diva.canvas.event.LayerListener, diva.canvas.event.LayerMotionListener

public class StatsInteractor
extends diva.canvas.interactor.AbstractInteractor

The StatsInteractor handles user interaction with nodes and queues. When the user clicks a node or queue a statistic table is opened for the node or queue, respectively.

Author:
Maylene Waltz

Constructor Summary
StatsInteractor(diva.graph.GraphController controller)
          Create a new StatsInteractor and give it a pointer to its controller so it can find other useful objects
 
Method Summary
 diva.canvas.event.EventLayer getEventLayer()
          Get the layer that drag events are listened on
 diva.canvas.FigureLayer getFigureLayer()
          Get the layer that figures are selected on
 void mousePressed(diva.canvas.event.LayerEvent e)
          Handles the mouse pressed event.
 void mouseReleased(diva.canvas.event.LayerEvent e)
          Handles the mouse release event.
 void openStats(java.lang.Object semanticObject)
          If the statistics table is already open for the given semanticObject, then focus to that tab.
 void setEventLayer(diva.canvas.event.EventLayer l)
          Set the layer that drag events are listened on
 void setFigureLayer(diva.canvas.FigureLayer l)
          Set the layer that figures are selected on
 
Methods inherited from class diva.canvas.interactor.AbstractInteractor
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsInteractor

public StatsInteractor(diva.graph.GraphController controller)
Create a new StatsInteractor and give it a pointer to its controller so it can find other useful objects

Method Detail

getEventLayer

public diva.canvas.event.EventLayer getEventLayer()
Get the layer that drag events are listened on


getFigureLayer

public diva.canvas.FigureLayer getFigureLayer()
Get the layer that figures are selected on


mousePressed

public void mousePressed(diva.canvas.event.LayerEvent e)
Handles the mouse pressed event.

Specified by:
mousePressed in interface diva.canvas.event.LayerListener
Overrides:
mousePressed in class diva.canvas.interactor.AbstractInteractor

mouseReleased

public void mouseReleased(diva.canvas.event.LayerEvent e)
Handles the mouse release event. A statistic table is opened for the node or queue that was RIGHT-clicked.

Specified by:
mouseReleased in interface diva.canvas.event.LayerListener
Overrides:
mouseReleased in class diva.canvas.interactor.AbstractInteractor

openStats

public void openStats(java.lang.Object semanticObject)
If the statistics table is already open for the given semanticObject, then focus to that tab. Otherwise, make a new tab and create the statistics table for the given semanticObject.

Parameters:
semanticObject - the semantic object that was RIGHT-clicked

setEventLayer

public void setEventLayer(diva.canvas.event.EventLayer l)
Set the layer that drag events are listened on


setFigureLayer

public void setFigureLayer(diva.canvas.FigureLayer l)
Set the layer that figures are selected on