Package org.eclipse.draw2d
Class XYAnchor
java.lang.Object
org.eclipse.draw2d.ConnectionAnchorBase
org.eclipse.draw2d.XYAnchor
- All Implemented Interfaces:
ConnectionAnchor
Supports an anchor in the XY layout. This anchor exists independently without
an owner.
-
Field Summary
Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase
listeners
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocation
(Point reference) Returns the location of this anchor relative to the reference point given in as input.getOwner()
Returnsnull
as these anchors inherently do not depend on other figures for their location.Returns the point which is used as the reference by this connection anchor.void
setLocation
(Point p) Sets the location of this anchor and notifies all the listeners of the update.Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
addAnchorListener, fireAnchorMoved, removeAnchorListener
-
Constructor Details
-
XYAnchor
Constructs an XYAnchor at the Point p.- Parameters:
p
- the point where this anchor will be located- Since:
- 2.0
-
-
Method Details
-
getLocation
Returns the location of this anchor relative to the reference point given in as input. Since this is XY layout, the location of the point is independent of the reference point.- Parameters:
reference
- The reference Point in absolute coordinates- Returns:
- The anchor's location
- See Also:
-
getOwner
Returnsnull
as these anchors inherently do not depend on other figures for their location.- Returns:
- The IFigure that contains this ConnectionAnchor
- Since:
- 2.0
- See Also:
-
getReferencePoint
Returns the point which is used as the reference by this connection anchor. In the case of the XYAnchor, this point is the same as its location.- Returns:
- The reference Point
- See Also:
-
setLocation
Sets the location of this anchor and notifies all the listeners of the update.- Parameters:
p
- the new location of this anchor- Since:
- 2.0
- See Also:
-