Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d
Class XYAnchor

java.lang.Object
  extended by

org.eclipse.draw2d.ConnectionAnchorBase
      extended by
org.eclipse.draw2d.XYAnchor
All Implemented Interfaces:
ConnectionAnchor

public class XYAnchor
extends ConnectionAnchorBase

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
XYAnchor ( Point p)
          Constructs an XYAnchor at the Point p.
 
Method Summary
  Point getLocation ( Point reference)
          Returns the location of this anchor relative to the reference point given in as input.
  IFigure getOwner ()
          Returns null as these anchors inherently do not depend on other figures for their location.
  Point getReferencePoint ()
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYAnchor

public XYAnchor(
Point p)
Constructs an XYAnchor at the Point p.

Parameters:
p - the point where this anchor will be located
Since:
2.0
Method Detail

getLocation

public 
Point getLocation(
Point reference)
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:
ConnectionAnchor.getLocation(Point)

getOwner

public 
IFigure getOwner()
Returns null 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:
ConnectionAnchor.getOwner()

getReferencePoint

public 
Point 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:
ConnectionAnchor.getReferencePoint()

setLocation

public void setLocation(
Point p)
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:
getLocation(Point)

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire