ca.sqlpower.wabit.swingui.report
Class GuideAwareSelectionEventHandler

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 ca.sqlpower.wabit.swingui.report.GuideAwareSelectionEventHandler
All Implemented Interfaces:
edu.umd.cs.piccolo.event.PInputEventListener, java.util.EventListener

public class GuideAwareSelectionEventHandler
extends edu.umd.cs.piccolox.event.PSelectionEventHandler

An extension of the standard Piccolo selection handler that snaps object to guides while they are being dragged.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
edu.umd.cs.piccolox.event.PSelectionEventHandler.BoundsFilter
 
Field Summary
 
Fields inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
SELECTION_CHANGED_NOTIFICATION
 
Constructor Summary
GuideAwareSelectionEventHandler(edu.umd.cs.piccolo.PCanvas canvas, edu.umd.cs.piccolo.PNode marqueeParent, edu.umd.cs.piccolo.PNode selectableParent, WabitObject transactionObject)
           
 
Method Summary
 void decorateSelectedNode(edu.umd.cs.piccolo.PNode node)
           
protected  void dragStandardSelection(edu.umd.cs.piccolo.event.PInputEvent e)
          Overrides the normal drag handler to implement snap-to-guide behaviour.
 java.util.Collection<GuideNode> getGuides()
          Returns all the guides that are direct children of the selectable parents of this selection handler.
 void keyPressed(edu.umd.cs.piccolo.event.PInputEvent e)
           
 void keyReleased(edu.umd.cs.piccolo.event.PInputEvent event)
           
 void select(java.util.Collection items)
          Overrides the default behaviour by not selecting guides.
 void select(edu.umd.cs.piccolo.PNode node)
          Overrides the default behaviour by not selecting guides.
 void unselect(java.util.Collection arg0)
           
 void unselect(edu.umd.cs.piccolo.PNode arg0)
           
 void unselectAll()
           
 
Methods inherited from class edu.umd.cs.piccolox.event.PSelectionEventHandler
addSelectableParent, computeMarqueeSelection, computeOptionMarqueeSelection, createNodeFilter, drag, dragActivityStep, endDrag, endMarqueeSelection, endStandardSelection, getMarqueeBounds, getMarqueePaint, getMarqueePaintTransparency, getSelectableParents, getSelection, getSelectionReference, getSupportDeleteKey, init, initializeMarquee, initializeSelection, isDeleteKeyActive, isMarqueeSelection, isOptionSelection, isSelectable, isSelected, removeSelectableParent, select, setDeleteKeyActive, setMarqueePaint, setMarqueePaintTransparency, setSelectableParent, setSelectableParents, startDrag, startMarqueeSelection, startOptionMarqueeSelection, startStandardOptionSelection, startStandardSelection, undecorateSelectedNode, updateMarquee
 
Methods inherited from class edu.umd.cs.piccolo.event.PDragSequenceEventHandler
dragActivityFinalStep, dragActivityFirstStep, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, paramString, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDragActivity, stopDragActivity
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyTyped, mouseClicked, 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
 

Constructor Detail

GuideAwareSelectionEventHandler

public GuideAwareSelectionEventHandler(edu.umd.cs.piccolo.PCanvas canvas,
                                       edu.umd.cs.piccolo.PNode marqueeParent,
                                       edu.umd.cs.piccolo.PNode selectableParent,
                                       WabitObject transactionObject)
Method Detail

dragStandardSelection

protected void dragStandardSelection(edu.umd.cs.piccolo.event.PInputEvent e)
Overrides the normal drag handler to implement snap-to-guide behaviour.

Overrides:
dragStandardSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandler

decorateSelectedNode

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

select

public void select(edu.umd.cs.piccolo.PNode node)
Overrides the default behaviour by not selecting guides.

Overrides:
select in class edu.umd.cs.piccolox.event.PSelectionEventHandler

unselect

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

unselect

public void unselect(java.util.Collection arg0)
Overrides:
unselect in class edu.umd.cs.piccolox.event.PSelectionEventHandler

unselectAll

public void unselectAll()
Overrides:
unselectAll in class edu.umd.cs.piccolox.event.PSelectionEventHandler

select

public void select(java.util.Collection items)
Overrides the default behaviour by not selecting guides.

Overrides:
select in class edu.umd.cs.piccolox.event.PSelectionEventHandler

getGuides

public java.util.Collection<GuideNode> getGuides()
Returns all the guides that are direct children of the selectable parents of this selection handler.


keyPressed

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

keyReleased

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


Copyright © 2009. All Rights Reserved.