public class LineSelectionEventHandler extends OrderedPSelectionEventHandler
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashMap<java.lang.Object,java.lang.Boolean> |
allItems |
static float |
BLUR_FACTOR |
(package private) edu.umd.cs.piccolox.nodes.PLine |
currentLine |
(package private) static java.awt.geom.Point2D |
endPoint |
(package private) static java.awt.geom.Point2D |
lastPoint |
private java.util.Vector<edu.umd.cs.piccolo.PNode> |
lineParts |
private edu.umd.cs.piccolo.PNode |
marqueeParent |
(package private) static java.awt.geom.Point2D |
nextPoint |
private edu.umd.cs.piccolo.PNode |
pressNode |
private java.util.List<edu.umd.cs.piccolo.PNode> |
selectableParents |
static java.lang.String |
SELECTION_CHANGED_NOTIFICATION |
private java.lang.String |
selectionStatusString |
(package private) static java.awt.geom.Point2D |
startPoint |
currentSelection| Constructor and Description |
|---|
LineSelectionEventHandler(edu.umd.cs.piccolo.PNode marqueeParent,
edu.umd.cs.piccolo.PNode selectableParent)
Creates a selection event handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decorateSelectedNode(edu.umd.cs.piccolo.PNode node) |
void |
deleteOldLine()
delete the old selection / line
|
protected void |
drag(edu.umd.cs.piccolo.event.PInputEvent e) |
protected void |
endMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e) |
protected void |
endStandardSelection(edu.umd.cs.piccolo.event.PInputEvent e) |
void |
init() |
protected void |
initializeMarquee(edu.umd.cs.piccolo.event.PInputEvent e) |
protected boolean |
isMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent pie) |
protected boolean |
onSelection(GeneralUnitPNode upn,
java.awt.geom.Point2D selectedPoint)
check if the given Point lies on the given UnitPNode
|
protected void |
startDrag(edu.umd.cs.piccolo.event.PInputEvent e) |
protected void |
startMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e) |
void |
undecorateSelectedNode(edu.umd.cs.piccolo.PNode node) |
protected void |
updateWhatever(edu.umd.cs.piccolo.event.PInputEvent e)
adds the node specified by the event e to the current selection (if it is not selected already)
|
alreadySelected, getSelection, select, select, select, unselect, unselect, unselectAlladdSelectableParent, computeMarqueeSelection, computeOptionMarqueeSelection, createNodeFilter, dragActivityStep, dragStandardSelection, endDrag, getMarqueeBounds, getMarqueePaint, getMarqueePaintTransparency, getSelectableParents, getSelectionReference, getSupportDeleteKey, initializeSelection, isDeleteKeyActive, isOptionSelection, isSelectable, isSelected, keyPressed, removeSelectableParent, setDeleteKeyActive, setMarqueePaint, setMarqueePaintTransparency, setSelectableParent, setSelectableParents, startOptionMarqueeSelection, startStandardOptionSelection, startStandardSelection, updateMarqueedragActivityFinalStep, dragActivityFirstStep, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, paramString, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDragActivity, stopDragActivityacceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter, toStringpublic static final java.lang.String SELECTION_CHANGED_NOTIFICATION
public static final float BLUR_FACTOR
private java.lang.String selectionStatusString
private java.util.Vector<edu.umd.cs.piccolo.PNode> lineParts
private java.util.List<edu.umd.cs.piccolo.PNode> selectableParents
private edu.umd.cs.piccolo.PNode marqueeParent
private java.util.HashMap<java.lang.Object,java.lang.Boolean> allItems
private edu.umd.cs.piccolo.PNode pressNode
static java.awt.geom.Point2D startPoint
static java.awt.geom.Point2D lastPoint
static java.awt.geom.Point2D nextPoint
static java.awt.geom.Point2D endPoint
edu.umd.cs.piccolox.nodes.PLine currentLine
public LineSelectionEventHandler(edu.umd.cs.piccolo.PNode marqueeParent,
edu.umd.cs.piccolo.PNode selectableParent)
marqueeParent - The node to which the event handler dynamically adds a marquee (temporarily) to represent
the area being selected.selectableParent - The node whose children will be selected by this event handler.public void decorateSelectedNode(edu.umd.cs.piccolo.PNode node)
decorateSelectedNode in class edu.umd.cs.piccolox.event.PSelectionEventHandlerpublic void undecorateSelectedNode(edu.umd.cs.piccolo.PNode node)
undecorateSelectedNode in class edu.umd.cs.piccolox.event.PSelectionEventHandlerpublic void init()
init in class OrderedPSelectionEventHandlerpublic void deleteOldLine()
protected void startDrag(edu.umd.cs.piccolo.event.PInputEvent e)
startDrag in class OrderedPSelectionEventHandlerprotected void drag(edu.umd.cs.piccolo.event.PInputEvent e)
drag in class edu.umd.cs.piccolox.event.PSelectionEventHandlerprotected boolean isMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent pie)
isMarqueeSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandlerprotected void initializeMarquee(edu.umd.cs.piccolo.event.PInputEvent e)
initializeMarquee in class edu.umd.cs.piccolox.event.PSelectionEventHandlerprotected void startMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
startMarqueeSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandlerprotected void updateWhatever(edu.umd.cs.piccolo.event.PInputEvent e)
protected boolean onSelection(GeneralUnitPNode upn, java.awt.geom.Point2D selectedPoint)
protected void endMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
endMarqueeSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandlerprotected void endStandardSelection(edu.umd.cs.piccolo.event.PInputEvent e)
endStandardSelection in class edu.umd.cs.piccolox.event.PSelectionEventHandler