public class LineSelectionEventHandler extends OrderedPSelectionEventHandler
Modifier and Type | Field and Description |
---|---|
private HashMap<Object,Boolean> |
allItems |
static float |
BLUR_FACTOR |
(package private) edu.umd.cs.piccolox.nodes.PLine |
currentLine |
(package private) static Point2D |
endPoint |
(package private) static Point2D |
lastPoint |
private Vector<edu.umd.cs.piccolo.PNode> |
lineParts |
private edu.umd.cs.piccolo.PNode |
marqueeParent |
(package private) static Point2D |
nextPoint |
private edu.umd.cs.piccolo.PNode |
pressNode |
private List<edu.umd.cs.piccolo.PNode> |
selectableParents |
static String |
SELECTION_CHANGED_NOTIFICATION |
private String |
selectionStatusString |
(package private) static 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,
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, unselectAll
addSelectableParent, 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, updateMarquee
dragActivityFinalStep, dragActivityFirstStep, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, paramString, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDragActivity, stopDragActivity
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter, toString
public static final String SELECTION_CHANGED_NOTIFICATION
public static final float BLUR_FACTOR
private String selectionStatusString
private Vector<edu.umd.cs.piccolo.PNode> lineParts
private List<edu.umd.cs.piccolo.PNode> selectableParents
private edu.umd.cs.piccolo.PNode marqueeParent
private edu.umd.cs.piccolo.PNode pressNode
static Point2D startPoint
static Point2D lastPoint
static Point2D nextPoint
static 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.PSelectionEventHandler
public void undecorateSelectedNode(edu.umd.cs.piccolo.PNode node)
undecorateSelectedNode
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
public void init()
init
in class OrderedPSelectionEventHandler
public void deleteOldLine()
protected void startDrag(edu.umd.cs.piccolo.event.PInputEvent e)
startDrag
in class OrderedPSelectionEventHandler
protected void drag(edu.umd.cs.piccolo.event.PInputEvent e)
drag
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
protected boolean isMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent pie)
isMarqueeSelection
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
protected void initializeMarquee(edu.umd.cs.piccolo.event.PInputEvent e)
initializeMarquee
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
protected void startMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
startMarqueeSelection
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
protected void updateWhatever(edu.umd.cs.piccolo.event.PInputEvent e)
protected boolean onSelection(GeneralUnitPNode upn, Point2D selectedPoint)
protected void endMarqueeSelection(edu.umd.cs.piccolo.event.PInputEvent e)
endMarqueeSelection
in class edu.umd.cs.piccolox.event.PSelectionEventHandler
protected void endStandardSelection(edu.umd.cs.piccolo.event.PInputEvent e)
endStandardSelection
in class edu.umd.cs.piccolox.event.PSelectionEventHandler