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 AbstractRouter

java.lang.Object
  extended by
org.eclipse.draw2d.AbstractRouter
All Implemented Interfaces:
ConnectionRouter
Direct Known Subclasses:
AutomaticRouter, BendpointConnectionRouter, ConnectionRouter.NullConnectionRouter, ManhattanConnectionRouter, ShortestPathConnectionRouter

public abstract class AbstractRouter
extends java.lang.Object
implements ConnectionRouter

Base class for implementing a connection router. This class provides stubs for constraint usage, and some utility methods.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d. ConnectionRouter
ConnectionRouter.NullConnectionRouter
 
Field Summary
 
Fields inherited from interface org.eclipse.draw2d. ConnectionRouter
NULL
 
Constructor Summary
AbstractRouter ()
           
 
Method Summary
 java.lang.Object getConstraint ( Connection connection)
          Returns the constraint for the given Connection.
protected   Point getEndPoint ( Connection connection)
          A convenience method for obtaining a connection's endpoint.
protected   Point getStartPoint ( Connection conn)
          A convenience method for obtaining a connection's start point.
 void invalidate ( Connection connection)
          Causes the router to discard any cached information about the given Connection.
 void remove ( Connection connection)
          Removes the given Connection from this routers list of Connections it is responsible for.
 void setConstraint ( Connection connection, java.lang.Object constraint)
          Sets the constraint for the given Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d. ConnectionRouter
route
 

Constructor Detail

AbstractRouter

public AbstractRouter()
Method Detail

getConstraint

public java.lang.Object getConstraint(
Connection connection)
Returns the constraint for the given Connection.

Specified by:
getConstraint in interface ConnectionRouter
Parameters:
connection - The connection
Returns:
The constraint
Since:
2.0

getEndPoint

protected 
Point getEndPoint(
Connection connection)
A convenience method for obtaining a connection's endpoint. The connection's endpoint is a point in absolute coordinates obtained by using its source and target ConnectionAnchor. The returned Point is a static singleton that is reused to reduce garbage collection. The caller may modify this point in any way. However, the point will be reused and its values overwritten during the next call to this method.

Parameters:
connection - The connection
Returns:
The endpoint
Since:
2.0

getStartPoint

protected 
Point getStartPoint(
Connection conn)
A convenience method for obtaining a connection's start point. The connection's startpoint is a point in absolute coordinates obtained by using its source and target ConnectionAnchor. The returned Point is a static singleton that is reused to reduce garbage collection. The caller may modify this point in any way. However, the point will be reused and its values overwritten during the next call to this method.

Parameters:
conn - The connection
Returns:
The start point
Since:
2.0

invalidate

public void invalidate(
Connection connection)
Causes the router to discard any cached information about the given Connection.

Specified by:
invalidate in interface ConnectionRouter
Parameters:
connection - The connection to invalidate
Since:
2.0

remove

public void remove(
Connection connection)
Removes the given Connection from this routers list of Connections it is responsible for.

Specified by:
remove in interface ConnectionRouter
Parameters:
connection - The connection to remove
Since:
2.0

setConstraint

public void setConstraint(
Connection connection,
                          java.lang.Object constraint)
Sets the constraint for the given Connection.

Specified by:
setConstraint in interface ConnectionRouter
Parameters:
connection - The connection
constraint - The constraint
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