public class PSWTSelectionEventHandler extends PSelectionEventHandler
PSelectionEventHandler.BoundsFilter
Modifier and Type | Field and Description |
---|---|
(package private) Point2D |
canvasPressPt |
(package private) PSWTPath |
marquee |
(package private) PNode |
marqueeParent |
(package private) Point2D |
pressPt |
SELECTION_CHANGED_NOTIFICATION
Constructor and Description |
---|
PSWTSelectionEventHandler(PNode marqueeParent,
List selectableParents)
Creates a selection event handler.
|
PSWTSelectionEventHandler(PNode marqueeParent,
PNode selectableParent)
Creates a selection event handler.
|
Modifier and Type | Method and Description |
---|---|
void |
decorateSelectedNode(PNode node)
Modifies the provided node so that it is displayed as selected.
|
protected void |
dragActivityStep(PInputEvent aEvent)
This gets called continuously during the drag, and is used to animate the
marquee.
|
protected void |
endMarqueeSelection(PInputEvent e)
Removes marquee and clears selection.
|
protected PBounds |
getMarqueeBounds()
Returns the bounds of the current selection marquee.
|
protected void |
initializeMarquee(PInputEvent e)
Creates an empty marquee child for use in displaying the marquee around
the selection.
|
protected void |
initializeSelection(PInputEvent pie)
Starts a selection based on the provided event.
|
void |
undecorateSelectedNode(PNode node)
Undoes any modifications to the provided node so that it is not displayed as selected.
|
protected void |
updateMarquee(PInputEvent pie)
Updates the marquee rectangle as the result of a drag.
|
addSelectableParent, computeMarqueeSelection, computeOptionMarqueeSelection, createNodeFilter, drag, dragStandardSelection, endDrag, endStandardSelection, getMarqueePaint, getMarqueePaintTransparency, getSelectableParents, getSelection, getSelectionReference, getSupportDeleteKey, init, isDeleteKeyActive, isMarqueeSelection, isOptionSelection, isSelectable, isSelected, keyPressed, removeSelectableParent, select, select, select, setDeleteKeyActive, setMarqueePaint, setMarqueePaintTransparency, setSelectableParent, setSelectableParents, startDrag, startMarqueeSelection, startOptionMarqueeSelection, startStandardOptionSelection, startStandardSelection, unselect, unselect, unselectAll
dragActivityFinalStep, dragActivityFirstStep, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDragActivity, stopDragActivity
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter
PSWTPath marquee
PNode marqueeParent
Point2D pressPt
Point2D canvasPressPt
public PSWTSelectionEventHandler(PNode marqueeParent, 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 PSWTSelectionEventHandler(PNode marqueeParent, List selectableParents)
marqueeParent
- The node to which the event handler dynamically adds
a marquee (temporarily) to represent the area being selected.selectableParents
- A list of nodes whose children will be selected
by this event handler.public void decorateSelectedNode(PNode node)
decorateSelectedNode
in class PSelectionEventHandler
node
- node to be decoratedpublic void undecorateSelectedNode(PNode node)
undecorateSelectedNode
in class PSelectionEventHandler
node
- node to be undecoratedprotected void initializeSelection(PInputEvent pie)
initializeSelection
in class PSelectionEventHandler
pie
- event used to populate the selectionprotected void initializeMarquee(PInputEvent e)
initializeMarquee
in class PSelectionEventHandler
e
- event responsible for the initializationprotected void updateMarquee(PInputEvent pie)
updateMarquee
in class PSelectionEventHandler
pie
- event responsible for the change in the marqueeprotected PBounds getMarqueeBounds()
getMarqueeBounds
in class PSelectionEventHandler
protected void endMarqueeSelection(PInputEvent e)
endMarqueeSelection
in class PSelectionEventHandler
e
- event responsible for the end of the selectionprotected void dragActivityStep(PInputEvent aEvent)
dragActivityStep
in class PSelectionEventHandler
aEvent
- event responsible for this step in the drag sequenceCopyright © 1995-2013 Piccolo2D. All Rights Reserved.