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
Answertopia.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 ConnectionEndpointLocator

java.lang.Object
  extended by
org.eclipse.draw2d.ConnectionEndpointLocator
All Implemented Interfaces:
Locator

public class ConnectionEndpointLocator
extends java.lang.Object
implements Locator

Used to place IFigures along the endpoint or starting point of a Connection. uDistance represents the distance from the Connection's owner to the IFigure. vDistance represents the distance from the IFigure to the Connection itself.


Field Summary
protected   Transposer transposer
          Transposes the location if the connection point is along the top or bottom of its owner figure.
 
Constructor Summary
ConnectionEndpointLocator ( Connection c, boolean isEnd)
          Constructs a ConnectionEndpointLocator using the given Connection.
 
Method Summary
 int getUDistance ()
          Returns the distance in pixels from the anchor's owner.
 int getVDistance ()
          Returns the distance in pixels from the connection
 void relocate ( IFigure figure)
          Relocates the given IFigure at either the source or target end of the Connection, based on the boolean given in the constructor ConnectionEndpointLocator(Connection, boolean).
 void setUDistance (int distance)
          Sets the distance in pixels from the Connection's owner.
 void setVDistance (int distance)
          Sets the distance in pixels from the Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transposer

protected 
Transposer transposer
Transposes the location if the connection point is along the top or bottom of its owner figure.

Constructor Detail

ConnectionEndpointLocator

public ConnectionEndpointLocator(
Connection c,
                                 boolean isEnd)
Constructs a ConnectionEndpointLocator using the given Connection. If isEnd is true, the location is relative to the Connection's end (or target) point. If isEnd is false, the location is relative to the Connection's start (or source) point.

Parameters:
c - The Connection
isEnd - true is location is relative to end point
Since:
2.0
Method Detail

getUDistance

public int getUDistance()
Returns the distance in pixels from the anchor's owner.

Returns:
the offset distance from the endpoint figure

getVDistance

public int getVDistance()
Returns the distance in pixels from the connection

Returns:
the offset from the connection itself

relocate

public void relocate(
IFigure figure)
Relocates the given IFigure at either the source or target end of the Connection, based on the boolean given in the constructor ConnectionEndpointLocator(Connection, boolean).

Specified by:
relocate in interface Locator
Parameters:
figure - The figure to relocate

setUDistance

public void setUDistance(int distance)
Sets the distance in pixels from the Connection's owner.

Parameters:
distance - Number of pixels to place the ConnectionEndpointLocator from its owner.
Since:
2.0

setVDistance

public void setVDistance(int distance)
Sets the distance in pixels from the Connection.

Parameters:
distance - Number of pixels to place the ConnectionEndpointLocator from its Connection.
Since:
2.0

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