public class LinkEvent
extends java.util.EventObject
| Constructor and Description |
|---|
LinkEvent(java.lang.Object source,
DiagramLink link)
Initializes a new LinkEvent instance.
|
LinkEvent(java.lang.Object source,
DiagramLink link,
int mouseButton,
java.awt.geom.Point2D mousePosition)
Initializes a new instance of the LinkEvent class.
|
LinkEvent(java.lang.Object source,
DiagramLink link,
java.awt.geom.Point2D mousePosition,
int adjustmentHandle)
Initializes a new instance of the LinkEvent class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAdjustmentHandle()
Gets the adjustment handle being moved by the user.
|
LinkLabel |
getLabel()
Gets a LinkLabel related to this event.
|
DiagramLink |
getLink()
Gets the link for which the event raised.
|
int |
getMouseButton()
Gets which mouse button has been pressed.
|
java.awt.geom.Point2D |
getPointerPosition()
Gets the current mouse pointer position.
|
void |
setAdjustmentHandle(int adjustmentHandle)
Sets the adjustment handle being moved by the user.
|
void |
setPointerPosition(java.awt.geom.Point2D mousePosition)
Sets the current mouse pointer position.
|
public LinkEvent(java.lang.Object source,
DiagramLink link)
source - The sender of this event.link - A LinkEvent that contains the event data.public LinkEvent(java.lang.Object source,
DiagramLink link,
java.awt.geom.Point2D mousePosition,
int adjustmentHandle)
link - The DiagramLink related to the event.mousePosition - The position of the mouse cursor, in document coordinates.adjustmentHandle - An integer index of the adjustment handle related to this event.public LinkEvent(java.lang.Object source,
DiagramLink link,
int mouseButton,
java.awt.geom.Point2D mousePosition)
link - The DiagramLink related to the event.mouseButton - One of the MouseEvent button constants indicating the mouse button related to this event.mousePosition - The position of the mouse cursor, in document coordinates.public int getAdjustmentHandle()
public void setAdjustmentHandle(int adjustmentHandle)
adjustmentHandle - The index of the link's control point being moved.public DiagramLink getLink()
DiagramLink instance.public int getMouseButton()
public java.awt.geom.Point2D getPointerPosition()
public void setPointerPosition(java.awt.geom.Point2D mousePosition)
mousePosition - A Point2D object specifying the current mouse position.public LinkLabel getLabel()