public class PickEvent extends MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
source
Constructor and Description |
---|
PickEvent(Component source,
int id,
long when,
int modifiers,
int x,
int y,
int clickCount,
boolean popupTrigger)
Construct a
PickEvent object at point (x,y). |
PickEvent(MouseEvent event)
Construct a
PickEvent object. |
Modifier and Type | Method and Description |
---|---|
ChartNode |
getNode()
Gets this
ChartNode . |
static double |
pointToLine(int Px,
int Py,
int[] devA,
int[] devB)
Compute the distance from the point (Px,Py) to the line
segment AB.
|
void |
setNode(ChartNode node)
Sets the
ChartNode . |
getButton, getClickCount, getLocationOnScreen, getModifiersEx, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint
consume, getMaskForButton, getModifiers, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
getComponent
getSource
public PickEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
PickEvent
object at point (x,y).source
- the Component
that originated the eventid
- an int
that identifies the eventwhen
- a long
that gives the time the event occurredmodifiers
- an int
that gives the modifier keys down during event (e.g. shift, ctrl, alt, meta)x
- an int
, the x coordinate of the point (x,y)y
- an int
, the y coordinate of the point (x,y)clickCount
- an int
which specifies the number of mouse button
clicks necessary to trigger the eventpopupTrigger
- is a boolean
, true if this event is a trigger for a popup menupublic PickEvent(MouseEvent event)
PickEvent
object.event
- a MouseEvent
public ChartNode getNode()
ChartNode
.public static double pointToLine(int Px, int Py, int[] devA, int[] devB)
Px
- an int
, the x coordinate of the point (Px,Py)Py
- an int
, the y coordinate of the point (Px,Py)devA
- an int
array which contains the point which
defines the head of the line segment.devB
- an int
array which contains the point which
defines the tail of the line segment.double
, the distance from the point (Px,Py) to
the line segment AB.public void setNode(ChartNode node)
ChartNode
.node
- the ChartNode
to be setCopyright © 1970-2016 Rogue Wave Software
Built May 19 2016.