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.graph
Class DirectedGraph

java.lang.Object
  extended by
org.eclipse.draw2d.graph.DirectedGraph
Direct Known Subclasses:
CompoundDirectedGraph

public class DirectedGraph
extends java.lang.Object

A graph consisting of nodes and directed edges. A DirectedGraph serves as the input to a graph layout algorithm. The algorithm will place the graph's nodes and edges according to certain goals, such as short, non-crossing edges, and readability.

Since:
2.1.2

Field Summary
  EdgeList edges
          All of the edges in the graph.
  NodeList nodes
          All of the nodes in the graph.
  RankList ranks
          Deprecated.   
 
Constructor Summary
DirectedGraph ()
           
 
Method Summary
  Insets getDefaultPadding ()
          Returns the default padding for nodes.
 int getDirection ()
          Returns the direction in which the graph will be layed out.
  Dimension getLayoutSize ()
           
  Insets getMargin ()
          Sets the outer margin for the entire graph.
  Node getNode (int rank, int index)
           
  Insets getPadding ( Node node)
          Returns the effective padding for the given node.
 void removeEdge ( Edge edge)
          Removes the given edge from the graph.
 void removeNode ( Node node)
          Removes the given node from the graph.
 void setDefaultPadding ( Insets insets)
          Sets the default padding for all nodes in the graph.
 void setDirection (int direction)
          Sets the layout direction for the graph.
 void setMargin ( Insets insets)
          Sets the graphs margin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edges

public 
EdgeList edges
All of the edges in the graph.


nodes

public 
NodeList nodes
All of the nodes in the graph.


ranks

public 
RankList ranks
Deprecated.   

For internal use only. The list of rows which makeup the final graph layout.

Constructor Detail

DirectedGraph

public DirectedGraph()
Method Detail

getDefaultPadding

public 
Insets getDefaultPadding()
Returns the default padding for nodes.

Returns:
the default padding
Since:
3.2

getDirection

public int getDirection()
Returns the direction in which the graph will be layed out.

Returns:
the layout direction
Since:
3.2

getMargin

public 
Insets getMargin()
Sets the outer margin for the entire graph. The margin is the space in which nodes should not be placed.

Returns:
the graph's margin
Since:
3.2

getPadding

public 
Insets getPadding(
Node node)
Returns the effective padding for the given node. If the node has a specified padding, it will be used, otherwise, the graph's defaultPadding is returned. The returned value must not be modified.

Parameters:
node - the node
Returns:
the effective padding for that node

getNode

public 
Node getNode(int rank,
                    int index)

removeEdge

public void removeEdge(
Edge edge)
Removes the given edge from the graph.

Parameters:
edge - the edge to be removed

removeNode

public void removeNode(
Node node)
Removes the given node from the graph. Does not remove the node's edges.

Parameters:
node - the node to remove

setDefaultPadding

public void setDefaultPadding(
Insets insets)
Sets the default padding for all nodes in the graph. Padding is the empty space left around the outside of each node. The default padding is used for all nodes which do not specify a specific amount of padding (i.e., their padding is null).

Parameters:
insets - the padding

setDirection

public void setDirection(int direction)
Sets the layout direction for the graph. Edges will be layed out in the specified direction (unless the graph contains cycles). Supported values are:

The default direction is south.

Parameters:
direction - the layout direction
Since:
3.2

setMargin

public void setMargin(
Insets insets)
Sets the graphs margin.

Parameters:
insets - the graph's margin
Since:
3.2

getLayoutSize

public 
Dimension getLayoutSize()

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