at.tuwien.ifs.somtoolbox.apps.viewer.handlers
Class ClusterSelectionEventHandler

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
      extended by edu.umd.cs.piccolo.event.PDragSequenceEventHandler
          extended by edu.umd.cs.piccolox.event.PSelectionEventHandler
              extended by at.tuwien.ifs.somtoolbox.apps.viewer.handlers.OrderedPSelectionEventHandler
                  extended by at.tuwien.ifs.somtoolbox.apps.viewer.handlers.ClusterSelectionEventHandler
All Implemented Interfaces:
edu.umd.cs.piccolo.event.PInputEventListener, EventListener

public class ClusterSelectionEventHandler
extends OrderedPSelectionEventHandler

EventHandler for selecting clusters by rectangle.

Version:
$Id: ClusterSelectionEventHandler.java 3590 2010-05-21 10:43:45Z mayer $
Author:
Rudolf Mayer, Jakob Frank

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
edu.umd.cs.piccolox.event.PSelectionEventHandler.BoundsFilter
 
Field Summary
private  MapPNode mapPNode
           
private  ArrayList<GeneralUnitPNode> markedNodes
           
private  String selectionStatusString
           
 
Fields inherited from class at.tuwien.ifs.somtoolbox.apps.viewer.handlers.OrderedPSelectionEventHandler
currentSelection
 
Fields inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
SELECTION_CHANGED_NOTIFICATION
 
Constructor Summary
ClusterSelectionEventHandler(edu.umd.cs.piccolo.PNode marqueeParent, edu.umd.cs.piccolo.PNode selectableParents)
           
 
Method Summary
 void decorateSelectedNode(edu.umd.cs.piccolo.PNode node)
           
protected  void drag(edu.umd.cs.piccolo.event.PInputEvent e)
           
protected  boolean isMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
           
 boolean isOptionSelection(edu.umd.cs.piccolo.event.PInputEvent pie)
           
private  void markCluster(edu.umd.cs.piccolo.event.PInputEvent event)
           
 void mouseClicked(edu.umd.cs.piccolo.event.PInputEvent event)
           
 void mouseReleased(edu.umd.cs.piccolo.event.PInputEvent e)
           
 void undecorateSelectedNode(edu.umd.cs.piccolo.PNode node)
           
 
Methods inherited from class at.tuwien.ifs.somtoolbox.apps.viewer.handlers.OrderedPSelectionEventHandler
alreadySelected, getSelection, init, select, select, select, startDrag, unselect, unselect, unselectAll
 
Methods inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
addSelectableParent, computeMarqueeSelection, computeOptionMarqueeSelection, createNodeFilter, dragActivityStep, dragStandardSelection, endDrag, endMarqueeSelection, endStandardSelection, getMarqueeBounds, getMarqueePaint, getMarqueePaintTransparency, getSelectableParents, getSelectionReference, getSupportDeleteKey, initializeMarquee, initializeSelection, isDeleteKeyActive, isSelectable, isSelected, keyPressed, removeSelectableParent, setDeleteKeyActive, setMarqueePaint, setMarqueePaintTransparency, setSelectableParent, setSelectableParents, startMarqueeSelection, startOptionMarqueeSelection, startStandardOptionSelection, startStandardSelection, updateMarquee
 
Methods inherited from class edu.umd.cs.piccolo.event.PDragSequenceEventHandler
dragActivityFinalStep, dragActivityFirstStep, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, paramString, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDragActivity, stopDragActivity
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

selectionStatusString

private String selectionStatusString

mapPNode

private MapPNode mapPNode

markedNodes

private ArrayList<GeneralUnitPNode> markedNodes
Constructor Detail

ClusterSelectionEventHandler

public ClusterSelectionEventHandler(edu.umd.cs.piccolo.PNode marqueeParent,
                                    edu.umd.cs.piccolo.PNode selectableParents)
Method Detail

decorateSelectedNode

public void decorateSelectedNode(edu.umd.cs.piccolo.PNode node)
Overrides:
decorateSelectedNode in class edu.umd.cs.piccolox.event.PSelectionEventHandler

undecorateSelectedNode

public void undecorateSelectedNode(edu.umd.cs.piccolo.PNode node)
Overrides:
undecorateSelectedNode in class edu.umd.cs.piccolox.event.PSelectionEventHandler

isMarqueeSelection

protected boolean isMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
Overrides:
isMarqueeSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandler

drag

protected void drag(edu.umd.cs.piccolo.event.PInputEvent e)
Overrides:
drag in class edu.umd.cs.piccolox.event.PSelectionEventHandler

mouseReleased

public void mouseReleased(edu.umd.cs.piccolo.event.PInputEvent e)
Overrides:
mouseReleased in class edu.umd.cs.piccolo.event.PDragSequenceEventHandler

mouseClicked

public void mouseClicked(edu.umd.cs.piccolo.event.PInputEvent event)
Overrides:
mouseClicked in class edu.umd.cs.piccolo.event.PBasicInputEventHandler

isOptionSelection

public boolean isOptionSelection(edu.umd.cs.piccolo.event.PInputEvent pie)
Overrides:
isOptionSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandler

markCluster

private void markCluster(edu.umd.cs.piccolo.event.PInputEvent event)