jdsl.extension.LEDA
Class GraphWinFile

java.lang.Object
  |
  +--jdsl.extension.LEDA.GraphWinFile

public class GraphWinFile
extends java.lang.Object

This class is used for accessing LEDA GraphWin files using JAVA. It has several methods for file accessing and modification of parameters. This version of GraphWinFile class supports nearly every feature of LEDA, but note some are marked as experimental. So please report errors and strange behaviour.

Version:
0.9
Author:
Marco Gaertler

Field Summary
static java.lang.String BOLD
          A valid font name: bold.
static java.lang.String FIXED
          A valid font name: fixed.
static java.lang.String ITALIC
          A valid font name: italic.
static java.lang.String ROMAN
          A valid font name: roman.
 
Constructor Summary
GraphWinFile()
          Constructs an empty graph.
GraphWinFile(jdsl.graph.api.Graph arg_graph)
          Constructs a graph by referencing to given graph.
GraphWinFile(java.lang.String filename)
          Constructs a graph by read file (filename) and importing all graph data.
 
Method Summary
 void applyEdgeDefaults()
          Changes all parameters for edges to (current) default.
 void applyNodeDefaults()
          Changes all parameters for nodes to (current) default.
 void clear()
          Resets all graph information.
 int getArrow(jdsl.graph.api.Edge e)
          Returns current direction.
 Color getBorderColor(jdsl.graph.api.Vertex v)
          Returns current border's color of a vertex.
 int getBorderColorIndex(jdsl.graph.api.Vertex v)
          Returns current border's color-index of a vertex.
 int getBorderWidth(jdsl.graph.api.Vertex v)
          Returns current border's width of a vertex.
 java.lang.Object getCodedData(jdsl.graph.api.Edge e)
          Returns current data-object from an edge.
 java.lang.Object getCodedData(jdsl.graph.api.Vertex v)
          Returns current data-object from a vertex.
 Color getColor(jdsl.graph.api.Edge e)
          Returns current color.
 Color getColor(jdsl.graph.api.Vertex v)
          Returns current color from a vertex.
 int getColorIndex(jdsl.graph.api.Edge e)
          Returns current color-index.
 int getColorIndex(jdsl.graph.api.Vertex v)
          Returns current color-index from a vertex.
 java.lang.Object getData(jdsl.graph.api.Edge e)
          Returns current data-object.
 java.lang.Object getData(jdsl.graph.api.Vertex v)
          Returns current data-object from a vertex.
 EdgeAttribute_int getEdgeArrow()
          Returns current arrow for all edges.
 EdgeAttribute_Color getEdgeColor()
          Returns current color for all edges.
 EdgeAttribute_int getEdgeColorIndex()
          Returns current color index for all edges.
 EdgeAttribute getEdgeData()
          Returns current data object for all edges.
 java.lang.String getEdgeDataType()
          Returns current data type for edges.
 EdgeParameters getEdgeDefaults()
          Returns a reference to default parameters for edges.
 EdgeAttribute_String getEdgeLabel()
          Returns current label for all edges.
 EdgeAttribute_Color getEdgeLabelColor()
          Returns current label color for all edges.
 EdgeAttribute_int getEdgeLabelColorIndex()
          Returns current label color index for all edges.
 java.lang.String getEdgeLabelFont()
          Returns current font (for edge labels).
 double getEdgeLabelFontSize()
          Returns current font's size (for edge labels).
 EdgeAttribute_int getEdgeLabelPosition()
          Returns current label posistion for all edges.
 EdgeAttribute_int getEdgeLabelType()
          Returns current label type for all edges.
 EdgeAttribute_PointArray getEdgePosition()
          Returns current position for all edges.
 EdgeAttribute_Point getEdgeSAnch()
          Returns current anchor (at start) for all edges.
 EdgeAttribute_int getEdgeShape()
          Returns current shape for all edges.
 EdgeAttribute_int getEdgeStyle()
          Returns current style for all edges.
 EdgeAttribute_Point getEdgeTAnch()
          Returns current anchor (at end) for all edges.
 EdgeAttribute_int getEdgeWidth()
          Returns current width for all edges.
 jdsl.graph.api.Graph getGraph()
          Returns a reference to current graph.
 java.lang.String getLabel(jdsl.graph.api.Edge e)
          Returns current label.
 java.lang.String getLabel(jdsl.graph.api.Vertex v)
          Returns current label from a vertex.
 Color getLabelColor(jdsl.graph.api.Edge e)
          Returns current color (of label).
 Color getLabelColor(jdsl.graph.api.Vertex v)
          Returns current label's color from a vertex.
 int getLabelColorIndex(jdsl.graph.api.Edge e)
          Returns current color-index (of label).
 int getLabelColorIndex(jdsl.graph.api.Vertex v)
          Returns current label's color-index from a vertex.
 int getLabelPosition(jdsl.graph.api.Edge e)
          Returns current label position.
 int getLabelPosition(jdsl.graph.api.Vertex v)
          Returns current label position from a vertex.
 int getLabelType(jdsl.graph.api.Edge e)
          Returns current label type.
 int getLabelType(jdsl.graph.api.Vertex v)
          Returns current label type from a vertex.
 GraphLayout getLayout()
          Returns a reference to (current) layout.
 java.lang.String getNodeDataType()
          Returns current data type for vertices.
 NodeParameters getNodeDefaults()
          Returns a reference to default parameters for nodes.
 java.lang.String getNodeLabelFont()
          Returns current font (for node labels).
 double getNodeLabelFontSize()
          Returns current font's size (for node labels).
 Point getSAnch(jdsl.graph.api.Edge e)
          Returns current S anchor.
 int getShape(jdsl.graph.api.Edge e)
          Returns current shape.
 int getShape(jdsl.graph.api.Vertex v)
          Returns current shape from a vertex.
 double getShapeHeight(jdsl.graph.api.Vertex v)
          Returns current shape's height of a vertex.
 double getShapeWidth(jdsl.graph.api.Vertex v)
          Returns current shape's width of a vertex.
 int getStyle(jdsl.graph.api.Edge e)
          Returns current style.
 Point getTAnch(jdsl.graph.api.Edge e)
          Returns current T anchor.
 VertexAttribute_Color getVertexBorderColor()
          Returns current border color for all vertices.
 VertexAttribute_int getVertexBorderColorIndex()
          Returns current border color index for all vertices.
 VertexAttribute_int getVertexBorderWidth()
          Returns current border width for all vertices.
 VertexAttribute_Color getVertexColor()
          Returns current color for all vertices.
 VertexAttribute_int getVertexColorIndex()
          Returns current color index for all vertices.
 VertexAttribute getVertexData()
          Returns current data object for all vertices.
 VertexAttribute_String getVertexLabel()
          Returns current label for all vertices.
 VertexAttribute_Color getVertexLabelColor()
          Returns current label color for all vertices.
 VertexAttribute_int getVertexLabelColorIndex()
          Returns current label color index for all vertices.
 VertexAttribute_int getVertexLabelPosition()
          Returns current label posistion for all vertices.
 VertexAttribute_int getVertexLabelType()
          Returns current label type for all vertices.
 VertexAttribute_Point getVertexPosition()
          Returns current position for all vertices.
 VertexAttribute_int getVertexShape()
          Returns current shape for all vertices.
 VertexAttribute_double getVertexShapeHeight()
          Returns current shape height for all vertices.
 VertexAttribute_double getVertexShapeWidth()
          Returns current shape width for all vertices.
 int getWidth(jdsl.graph.api.Edge e)
          Returns current width.
 void printAllData()
          Prints all data to standard output stream.
 void printGraph()
          Gives an overview of graph.
 void read(java.lang.String filename)
          Parses a LEDA GraphWin file and extracts all graph informations.
 void setArrow(jdsl.graph.api.Edge e, int arg)
          Sets a new direction type.
 void setBorderColor(jdsl.graph.api.Vertex v, Color arg)
          Sets a new color for border of a vertex.
 void setBorderColor(jdsl.graph.api.Vertex v, int arg)
          Sets a new color-index for border of a vertex.
 void setBorderWidth(jdsl.graph.api.Vertex v, int arg)
          Changes border's width of a vertex.
 void setColor(jdsl.graph.api.Edge e, Color arg)
          Sets a new color.
 void setColor(jdsl.graph.api.Edge e, int arg)
          Sets a new color-index.
 void setColor(jdsl.graph.api.Vertex v, Color arg)
          Sets a new color for a vertex.
 void setColor(jdsl.graph.api.Vertex v, int arg)
          Sets a new color-index for a vertex.
 void setData(jdsl.graph.api.Edge e, java.lang.Object obj)
          Sets a new data object for a edge.
 void setData(jdsl.graph.api.Vertex v, java.lang.Object obj)
          Sets a new data object for a vertex.
 void setDefaultsForEdge(jdsl.graph.api.Edge e)
          Sets default attributs for a edge.
 void setDefaultsForNode(jdsl.graph.api.Vertex v)
          Sets default attributs for a vertex.
 void setEdgeArrow(EdgeAttribute_int arrow)
          Updates arrow for all edges.
 void setEdgeColor(EdgeAttribute_Color color)
          Updates color for all edges.
 void setEdgeColorIndex(EdgeAttribute_int color)
          Updates color index for all edges.
 void setEdgeData(EdgeAttribute data)
          Updates data object for all edges.
 void setEdgeDataType(java.lang.String arg)
          Sets a new data type for edges.
 void setEdgeDefaults(EdgeParameters def)
          Changes default parameters for edges.
 void setEdgeLabel(EdgeAttribute_String label)
          Updates label for all edges.
 void setEdgeLabelColor(EdgeAttribute_Color color)
          Updates label color for all edges.
 void setEdgeLabelColorIndex(EdgeAttribute_int color)
          Updates label color index for all edges.
 void setEdgeLabelFont(java.lang.String fontName)
          Sets a new font (for edge labels).
 void setEdgeLabelFontSize(double size)
          Sets a new size for current font (of edge labels).
 void setEdgeLabelPosition(EdgeAttribute_int pos)
          Updates label posistion for all edges.
 void setEdgeLabelType(EdgeAttribute_int ltype)
          Updates label type for all edges.
 void setEdgePosition(EdgeAttribute_PointArray data)
          Updates position for all edges.
 void setEdgeSAnch(EdgeAttribute_Point s_anch)
          Updates anchor (at start) for all edges.
 void setEdgeShape(EdgeAttribute_int shape)
          Updates shape for all edges.
 void setEdgeStyle(EdgeAttribute_int style)
          Updates style for all edges.
 void setEdgeTAnch(EdgeAttribute_Point t_anch)
          Updates anchor (at end) for all edges.
 void setEdgeWidth(EdgeAttribute_int widht)
          Updates width for all edges.
 void setGraph(jdsl.graph.api.Graph graph)
          Replaces current graph reference by a new one.
 void setLabel(jdsl.graph.api.Edge e, java.lang.String arg)
          Sets a new label.
 void setLabel(jdsl.graph.api.Vertex v, java.lang.String arg)
          Sets a new label for a vertex.
 void setLabelColor(jdsl.graph.api.Edge e, Color arg)
          Changes label's color.
 void setLabelColor(jdsl.graph.api.Edge e, int arg)
          Changes label's color-index.
 void setLabelColor(jdsl.graph.api.Vertex v, Color arg)
          Changes label's color of a vertex.
 void setLabelColor(jdsl.graph.api.Vertex v, int arg)
          Changes label's color-index of a vertex.
 void setLabelPosition(jdsl.graph.api.Edge e, int arg)
          Sets a new label position.
 void setLabelPosition(jdsl.graph.api.Vertex v, int arg)
          Sets a new label position of a vertex.
 void setLabelType(jdsl.graph.api.Edge e, int arg)
          Sets a new label type.
 void setLabelType(jdsl.graph.api.Vertex v, int arg)
          Sets a new label type for a vertex.
 void setLayout(GraphLayout layout)
          Sets a new layout.
 void setLayoutElement(jdsl.graph.api.Edge edge, Point[] points)
          Sets a new Layout for a edge.
 void setLayoutElement(jdsl.graph.api.Vertex vertex, Point point)
          Sets a new Layout for a vertex.
 void setNodeDataType(java.lang.String arg)
          Sets a new data type for vertices.
 void setNodeDefaults(NodeParameters def)
          Changes default parameters for nodes.
 void setNodeLabelFont(java.lang.String fontName)
          Sets a new font (for node labels).
 void setNodeLabelFontSize(double size)
          Sets a new size for current font (of node labels).
 void setSAnch(jdsl.graph.api.Edge e, Point arg)
          Sets a new anchor at start node.
 void setShape(jdsl.graph.api.Edge e, int arg)
          Sets a new shape.
 void setShape(jdsl.graph.api.Vertex v, int arg)
          Sets a new shape for a vertex.
 void setShapeHeight(jdsl.graph.api.Vertex v, double arg)
          Changes shape's height of a vertex.
 void setShapeWidth(jdsl.graph.api.Vertex v, double arg)
          Changes shape's width of a vertex.
 void setStyle(jdsl.graph.api.Edge e, int arg)
          Sets a new style.
 void setTAnch(jdsl.graph.api.Edge e, Point arg)
          Sets a new anchor at end node.
 void setVertexBorderColor(VertexAttribute_Color color)
          Updates border color for all vertices.
 void setVertexBorderColorIndex(VertexAttribute_int color)
          Updates border color index for all vertices.
 void setVertexBorderWidth(VertexAttribute_int width)
          Updates border width for all vertices.
 void setVertexColor(VertexAttribute_Color color)
          Updates color for all vertices.
 void setVertexColorIndex(VertexAttribute_int color)
          Updates color index for all vertices.
 void setVertexData(VertexAttribute data)
          Updates data object for all vertices.
 void setVertexLabel(VertexAttribute_String label)
          Updates label for all vertices.
 void setVertexLabelColor(VertexAttribute_Color color)
          Updates label color for all vertices.
 void setVertexLabelColorIndex(VertexAttribute_int color)
          Updates label color index for all vertices.
 void setVertexLabelPosition(VertexAttribute_int pos)
          Updates label posistion for all vertices.
 void setVertexLabelType(VertexAttribute_int ltype)
          Updates label type for all vertices.
 void setVertexPosition(VertexAttribute_Point data)
          Updates position for all vertices.
 void setVertexShape(VertexAttribute_int shape)
          Updates shape for all vertices.
 void setVertexShapeHeight(VertexAttribute_double height)
          Updates shape height for all vertices.
 void setVertexShapeWidth(VertexAttribute_double width)
          Updates shape width for all vertices.
 void setWidth(jdsl.graph.api.Edge e, int arg)
          Sets a new width.
 java.lang.String toString()
          Returns a short string representation of the object.
 void write(java.lang.String filename)
          Exports current graph into a LEDA GraphWin file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROMAN

public static final java.lang.String ROMAN
A valid font name: roman.
See Also:
BOLD, ITALIC, FIXED

BOLD

public static final java.lang.String BOLD
A valid font name: bold.
See Also:
ROMAN, ITALIC, FIXED

ITALIC

public static final java.lang.String ITALIC
A valid font name: italic.
See Also:
ROMAN, BOLD, FIXED

FIXED

public static final java.lang.String FIXED
A valid font name: fixed.
See Also:
ROMAN, BOLD, ITALIC
Constructor Detail

GraphWinFile

public GraphWinFile()
Constructs an empty graph.

GraphWinFile

public GraphWinFile(java.lang.String filename)
             throws FileFormatException
Constructs a graph by read file (filename) and importing all graph data.
Parameters:
filename - a name of an existing LEDA GraphWin file (with extension ".gw")
Throws:
extension.File.FileFormatException - if errors happen during file parsing this exception will be thrown with a detail message.

GraphWinFile

public GraphWinFile(jdsl.graph.api.Graph arg_graph)
             throws java.lang.IllegalArgumentException
Constructs a graph by referencing to given graph.
Parameters:
arg_graph - any graph objects
Throws:
java.lang.IllegalArgumentException - if arg_graph is a null reference this exception will be thrown
Method Detail

printGraph

public void printGraph()
Gives an overview of graph.

Note:
all info objects from all vertices and edges are printed to standard output.

clear

public void clear()
Resets all graph information.

Note:
graph, parameters and layout are cleared

getGraph

public jdsl.graph.api.Graph getGraph()
Returns a reference to current graph.

setGraph

public void setGraph(jdsl.graph.api.Graph graph)
              throws java.lang.IllegalArgumentException
Replaces current graph reference by a new one.
Parameters:
graph - any graph object
Throws:
java.lang.IllegalArgumentException - if graph is null this exception will be thrown

toString

public java.lang.String toString()
Returns a short string representation of the object. This usually looks like: GraphWinFile file (in/out) or GraphWinFile graph(..)
Overrides:
toString in class java.lang.Object

setNodeDefaults

public void setNodeDefaults(NodeParameters def)
Changes default parameters for nodes.
Parameters:
any - NodeParameters object

applyNodeDefaults

public void applyNodeDefaults()
Changes all parameters for nodes to (current) default.

getNodeDefaults

public NodeParameters getNodeDefaults()
Returns a reference to default parameters for nodes.

setEdgeDefaults

public void setEdgeDefaults(EdgeParameters def)
Changes default parameters for edges.
Parameters:
def - any NodeParameters object

applyEdgeDefaults

public void applyEdgeDefaults()
Changes all parameters for edges to (current) default.

getEdgeDefaults

public EdgeParameters getEdgeDefaults()
Returns a reference to default parameters for edges.

getNodeLabelFont

public java.lang.String getNodeLabelFont()
Returns current font (for node labels).
Returns:
font name

setNodeLabelFont

public void setNodeLabelFont(java.lang.String fontName)
Sets a new font (for node labels).
Parameters:
fontName - a valid font name

getNodeLabelFontSize

public double getNodeLabelFontSize()
Returns current font's size (for node labels).
Returns:
font size

setNodeLabelFontSize

public void setNodeLabelFontSize(double size)
Sets a new size for current font (of node labels).
Parameters:
size - new size

getEdgeLabelFont

public java.lang.String getEdgeLabelFont()
Returns current font (for edge labels).
Returns:
font name

setEdgeLabelFont

public void setEdgeLabelFont(java.lang.String fontName)
Sets a new font (for edge labels).
Parameters:
fontName - a valid font name

getEdgeLabelFontSize

public double getEdgeLabelFontSize()
Returns current font's size (for edge labels).
Returns:
font size

setEdgeLabelFontSize

public void setEdgeLabelFontSize(double size)
Sets a new size for current font (of edge labels).
Parameters:
size - new size

getLayout

public GraphLayout getLayout()
Returns a reference to (current) layout.
Returns:
a layout for graphs

setLayout

public void setLayout(GraphLayout layout)
Sets a new layout.
Parameters:
layout - a valid layout

setLayoutElement

public void setLayoutElement(jdsl.graph.api.Vertex vertex,
                             Point point)
Sets a new Layout for a vertex.
Parameters:
vertex - which vertex
point - which position
See Also:
setLayoutElement(Edge, Point[])

setLayoutElement

public void setLayoutElement(jdsl.graph.api.Edge edge,
                             Point[] points)
Sets a new Layout for a edge.
Parameters:
edge - which edge
points - which positions
See Also:
setLayoutElement(Vertex, Point)

read

public void read(java.lang.String filename)
          throws FileFormatException
Parses a LEDA GraphWin file and extracts all graph informations.
Parameters:
filename - name of an existing LEDA GraphWin file (with extention ".gw").
Throws:
FileFormatException - if some parsing errors occour during this method, an exception will be thrown.

write

public void write(java.lang.String filename)
           throws java.io.IOException
Exports current graph into a LEDA GraphWin file. Note: If a GraphWin file (version 1.32) was imported, a GraphWin file (version 1.32!) would be written. In all other cases a GraphWin file (version 1.4) would be written.
Parameters:
filename - name of target file (GraphWin files have usually the extension ".gw")
Throws:
FileFormatException - if some I/O errprs occur during this method, an exception will be thrown.

setDefaultsForNode

public void setDefaultsForNode(jdsl.graph.api.Vertex v)
Sets default attributs for a vertex.
Parameters:
v - target vertex
See Also:
NodeParameters.setDefaults()

setColor

public void setColor(jdsl.graph.api.Vertex v,
                     Color arg)
Sets a new color for a vertex.
Parameters:
v - target vertex
arg - a valid color
See Also:
Parameters.setColor(jdsl.extension.LEDA.Color)

setColor

public void setColor(jdsl.graph.api.Vertex v,
                     int arg)
Sets a new color-index for a vertex.
Parameters:
v - target vertex
arg - a valid color-index
See Also:
Parameters.setColor(int)

setShape

public void setShape(jdsl.graph.api.Vertex v,
                     int arg)
Sets a new shape for a vertex.
Parameters:
v - target vertex
arg - a valid shape
See Also:
Parameters.setShape(int)

setShapeWidth

public void setShapeWidth(jdsl.graph.api.Vertex v,
                          double arg)
Changes shape's width of a vertex.
Parameters:
v - target vertex
arg - new width
See Also:
NodeParameters.setShapeWidth(double)

setShapeHeight

public void setShapeHeight(jdsl.graph.api.Vertex v,
                           double arg)
Changes shape's height of a vertex.
Parameters:
v - target vertex
arg - new height
See Also:
NodeParameters.setShapeHeight(double)

setBorderColor

public void setBorderColor(jdsl.graph.api.Vertex v,
                           Color arg)
Sets a new color for border of a vertex.
Parameters:
v - target vertex
arg - a valid color
See Also:
NodeParameters.setBorderColor(jdsl.extension.LEDA.Color)

setBorderColor

public void setBorderColor(jdsl.graph.api.Vertex v,
                           int arg)
Sets a new color-index for border of a vertex.
Parameters:
v - target vertex
arg - a valid color-index
See Also:
NodeParameters.setBorderColor(jdsl.extension.LEDA.Color)

setBorderWidth

public void setBorderWidth(jdsl.graph.api.Vertex v,
                           int arg)
Changes border's width of a vertex.
Parameters:
v - target vertex
See Also:
NodeParameters.setBorderWidth(int)

setLabelType

public void setLabelType(jdsl.graph.api.Vertex v,
                         int arg)
Sets a new label type for a vertex.
Parameters:
v - target vertex
arg - a valid label type
See Also:
Parameters.setLabelType(int)

setLabelColor

public void setLabelColor(jdsl.graph.api.Vertex v,
                          Color arg)
Changes label's color of a vertex.
Parameters:
v - target vertex
arg - a valid color
See Also:
Parameters.setLabelColor(jdsl.extension.LEDA.Color)

setLabelColor

public void setLabelColor(jdsl.graph.api.Vertex v,
                          int arg)
Changes label's color-index of a vertex.
Parameters:
v - target vertex
arg - a valid color-index
See Also:
Parameters.setLabelColor(jdsl.extension.LEDA.Color)

setLabelPosition

public void setLabelPosition(jdsl.graph.api.Vertex v,
                             int arg)
Sets a new label position of a vertex.
Parameters:
v - target vertex
arg - a valid label position
See Also:
Parameters.setLabelPosition(int)

setLabel

public void setLabel(jdsl.graph.api.Vertex v,
                     java.lang.String arg)
Sets a new label for a vertex.
Parameters:
v - target vertex
arg - a string
See Also:
Parameters.setLabel(java.lang.String)

getColor

public Color getColor(jdsl.graph.api.Vertex v)
Returns current color from a vertex.
Parameters:
v - target vertex
Returns:
a valid color
See Also:
Parameters.getColor()

getColorIndex

public int getColorIndex(jdsl.graph.api.Vertex v)
Returns current color-index from a vertex.
Parameters:
v - target vertex
Returns:
a valid color-index
See Also:
Parameters.getColor()

getShape

public int getShape(jdsl.graph.api.Vertex v)
Returns current shape from a vertex.
Parameters:
v - target vertex
Returns:
a valid shape
See Also:
Parameters.getShape()

getShapeWidth

public double getShapeWidth(jdsl.graph.api.Vertex v)
Returns current shape's width of a vertex.
Parameters:
v - target vertex
Returns:
a non-negativ integer
See Also:
NodeParameters.getShapeWidth()

getShapeHeight

public double getShapeHeight(jdsl.graph.api.Vertex v)
Returns current shape's height of a vertex.
Parameters:
v - target vertex
Returns:
a non-negativ integer
See Also:
NodeParameters.getShapeHeight()

getBorderColor

public Color getBorderColor(jdsl.graph.api.Vertex v)
Returns current border's color of a vertex.
Parameters:
v - target vertex
Returns:
a valid color
See Also:
NodeParameters.getBorderColor()

getBorderColorIndex

public int getBorderColorIndex(jdsl.graph.api.Vertex v)
Returns current border's color-index of a vertex.
Parameters:
v - target vertex
Returns:
a valid color-index
See Also:
NodeParameters.getBorderColor()

getBorderWidth

public int getBorderWidth(jdsl.graph.api.Vertex v)
Returns current border's width of a vertex.
Parameters:
v - target vertex
Returns:
a non-negativ integer
See Also:
NodeParameters.getBorderWidth()

getLabelType

public int getLabelType(jdsl.graph.api.Vertex v)
Returns current label type from a vertex.
Parameters:
v - target vertex
Returns:
a valid label type
See Also:
Parameters.getLabelType()

getLabelColor

public Color getLabelColor(jdsl.graph.api.Vertex v)
Returns current label's color from a vertex.
Parameters:
v - target vertex
Returns:
a valid color
See Also:
Parameters.getLabelColor()

getLabelColorIndex

public int getLabelColorIndex(jdsl.graph.api.Vertex v)
Returns current label's color-index from a vertex.
Parameters:
v - target vertex
Returns:
a valid color-index
See Also:
Parameters.getLabelColor()

getLabelPosition

public int getLabelPosition(jdsl.graph.api.Vertex v)
Returns current label position from a vertex.
Parameters:
v - target vertex
Returns:
a valid position
See Also:
Parameters.getLabelPosition()

getLabel

public java.lang.String getLabel(jdsl.graph.api.Vertex v)
Returns current label from a vertex.
Parameters:
v - target vertex
Returns:
a string
See Also:
Parameters.getLabel()

getData

public java.lang.Object getData(jdsl.graph.api.Vertex v)
Returns current data-object from a vertex.
Parameters:
v - target vertex
Returns:
a string

getCodedData

public java.lang.Object getCodedData(jdsl.graph.api.Vertex v)
Returns current data-object from a vertex.
Parameters:
v - target vertex
Returns:
a string

setDefaultsForEdge

public void setDefaultsForEdge(jdsl.graph.api.Edge e)
Sets default attributs for a edge.
Parameters:
e - target edge
See Also:
EdgeParameters.setDefaults()

setColor

public void setColor(jdsl.graph.api.Edge e,
                     Color arg)
Sets a new color.
Parameters:
e - target edge
arg - a valid color
See Also:
Parameters.setColor(jdsl.extension.LEDA.Color)

setColor

public void setColor(jdsl.graph.api.Edge e,
                     int arg)
Sets a new color-index.
Parameters:
e - target edge
arg - a valid color-index
See Also:
Parameters.setColor(jdsl.extension.LEDA.Color)

setWidth

public void setWidth(jdsl.graph.api.Edge e,
                     int arg)
Sets a new width.
Parameters:
e - target edge
arg - a non-negativ integer
See Also:
EdgeParameters.setWidth(int)

setShape

public void setShape(jdsl.graph.api.Edge e,
                     int arg)
Sets a new shape.
Parameters:
e - target edge
arg - a valid shape
See Also:
EdgeParameters.setShape(int)

setStyle

public void setStyle(jdsl.graph.api.Edge e,
                     int arg)
Sets a new style.
Parameters:
e - target edge
arg - a valid style
See Also:
EdgeParameters.setStyle(int)

setArrow

public void setArrow(jdsl.graph.api.Edge e,
                     int arg)
Sets a new direction type.
Parameters:
e - target edge
arg - a valid direction
See Also:
EdgeParameters.setArrow(int)

setSAnch

public void setSAnch(jdsl.graph.api.Edge e,
                     Point arg)
Sets a new anchor at start node. This is a experimenal feature
Parameters:
e - target edge
arg - target offset
See Also:
EdgeParameters.setSAnch(jdsl.extension.LEDA.Layout.Geometry.Point)

setTAnch

public void setTAnch(jdsl.graph.api.Edge e,
                     Point arg)
Sets a new anchor at end node. This is a experimental feature.
Parameters:
e - target edge
arg - target offset
See Also:
EdgeParameters.setTAnch(jdsl.extension.LEDA.Layout.Geometry.Point)

setLabelType

public void setLabelType(jdsl.graph.api.Edge e,
                         int arg)
Sets a new label type.
Parameters:
e - target edge
arg - a valid label type
See Also:
EdgeParameters.setLabelType(int)

setLabelColor

public void setLabelColor(jdsl.graph.api.Edge e,
                          Color arg)
Changes label's color.
Parameters:
e - target edge
arg - a valid color
See Also:
Parameters.setLabelColor(jdsl.extension.LEDA.Color)

setLabelColor

public void setLabelColor(jdsl.graph.api.Edge e,
                          int arg)
Changes label's color-index.
Parameters:
e - target edge
arg - a valid color-index
See Also:
Parameters.setLabelColor(jdsl.extension.LEDA.Color)

setLabelPosition

public void setLabelPosition(jdsl.graph.api.Edge e,
                             int arg)
Sets a new label position.
Parameters:
e - target edge
arg - a valid label position
See Also:
EdgeParameters.setLabelPosition(int)

setLabel

public void setLabel(jdsl.graph.api.Edge e,
                     java.lang.String arg)
Sets a new label.
Parameters:
e - target edge
arg - a string
See Also:
Parameters.setLabel(java.lang.String)

getColor

public Color getColor(jdsl.graph.api.Edge e)
Returns current color.
Parameters:
e - target edge
Returns:
a valid color
See Also:
Parameters.getColor()

getColorIndex

public int getColorIndex(jdsl.graph.api.Edge e)
Returns current color-index.
Parameters:
e - target edge
Returns:
a valid color-index
See Also:
Parameters.getColor()

getWidth

public int getWidth(jdsl.graph.api.Edge e)
Returns current width.
Parameters:
e - target edge
Returns:
a non-negativ integer
See Also:
EdgeParameters.getWidth()

getShape

public int getShape(jdsl.graph.api.Edge e)
Returns current shape.
Parameters:
e - target edge
Returns:
a valid color
See Also:
Parameters.getShape()

getStyle

public int getStyle(jdsl.graph.api.Edge e)
Returns current style.
Parameters:
e - target edge
Returns:
a valid style
See Also:
EdgeParameters.getStyle()

getArrow

public int getArrow(jdsl.graph.api.Edge e)
Returns current direction.
Parameters:
e - target edge
Returns:
a valid direction
See Also:
EdgeParameters.getArrow()

getSAnch

public Point getSAnch(jdsl.graph.api.Edge e)
Returns current S anchor. This is a experimental feature.
Parameters:
e - target edge
Returns:
a point
See Also:
EdgeParameters.getSAnch()

getTAnch

public Point getTAnch(jdsl.graph.api.Edge e)
Returns current T anchor. This is a experimental feature.
Parameters:
e - target edge
Returns:
a point
See Also:
EdgeParameters.getTAnch()

getLabelType

public int getLabelType(jdsl.graph.api.Edge e)
Returns current label type.
Parameters:
e - target edge
Returns:
a valid label type
See Also:
Parameters.getLabelType()

getLabelColor

public Color getLabelColor(jdsl.graph.api.Edge e)
Returns current color (of label).
Parameters:
e - target edge
Returns:
a valid color
See Also:
Parameters.getLabelColor()

getLabelColorIndex

public int getLabelColorIndex(jdsl.graph.api.Edge e)
Returns current color-index (of label).
Parameters:
e - target edge
Returns:
a valid color-index
See Also:
Parameters.getLabelColor()

getLabelPosition

public int getLabelPosition(jdsl.graph.api.Edge e)
Returns current label position.
Parameters:
e - target edge
Returns:
a valid position
See Also:
EdgeParameters.getLabelPosition()

getLabel

public java.lang.String getLabel(jdsl.graph.api.Edge e)
Returns current label.
Parameters:
e - target edge
Returns:
a string
See Also:
Parameters.getLabel()

getData

public java.lang.Object getData(jdsl.graph.api.Edge e)
Returns current data-object.
Parameters:
e - target edge
Returns:
a string

getCodedData

public java.lang.Object getCodedData(jdsl.graph.api.Edge e)
Returns current data-object from an edge.
Parameters:
e - target edge
Returns:
a string

setNodeDataType

public void setNodeDataType(java.lang.String arg)
                     throws DataFormatException
Sets a new data type for vertices.
Parameters:
arg - a type name, like: "byte", "String" , ...
Throws:
DataFormatException - is throwns, if arg isn't a valid type

setEdgeDataType

public void setEdgeDataType(java.lang.String arg)
                     throws DataFormatException
Sets a new data type for edges.
Parameters:
arg - a type name, like: "byte", "String" , ...
Throws:
DataFormatException - is throwns, if arg isn't a valid type

getNodeDataType

public java.lang.String getNodeDataType()
Returns current data type for vertices.
Returns:
type name

getEdgeDataType

public java.lang.String getEdgeDataType()
Returns current data type for edges.
Returns:
type name

setData

public void setData(jdsl.graph.api.Vertex v,
                    java.lang.Object obj)
             throws DataFormatException
Sets a new data object for a vertex.
Parameters:
v - choosen vertex
obj - data object
Throws:
DataFormatException - is thrown, if obj's type and current data type for vertices doesn't match.

setData

public void setData(jdsl.graph.api.Edge e,
                    java.lang.Object obj)
             throws DataFormatException
Sets a new data object for a edge.
Parameters:
e - choosen edge
obj - data object
Throws:
DataFormatException - is thrown, if obj's type and current data type for edges doesn't match.

printAllData

public void printAllData()
Prints all data to standard output stream. This is usual used for debugging.

setVertexColor

public void setVertexColor(VertexAttribute_Color color)
Updates color for all vertices.

getVertexColor

public VertexAttribute_Color getVertexColor()
Returns current color for all vertices.

setVertexColorIndex

public void setVertexColorIndex(VertexAttribute_int color)
Updates color index for all vertices.

getVertexColorIndex

public VertexAttribute_int getVertexColorIndex()
Returns current color index for all vertices.

setVertexShape

public void setVertexShape(VertexAttribute_int shape)
Updates shape for all vertices.

getVertexShape

public VertexAttribute_int getVertexShape()
Returns current shape for all vertices.

setVertexShapeWidth

public void setVertexShapeWidth(VertexAttribute_double width)
Updates shape width for all vertices.

getVertexShapeWidth

public VertexAttribute_double getVertexShapeWidth()
Returns current shape width for all vertices.

setVertexShapeHeight

public void setVertexShapeHeight(VertexAttribute_double height)
Updates shape height for all vertices.

getVertexShapeHeight

public VertexAttribute_double getVertexShapeHeight()
Returns current shape height for all vertices.

setVertexBorderColor

public void setVertexBorderColor(VertexAttribute_Color color)
Updates border color for all vertices.

getVertexBorderColor

public VertexAttribute_Color getVertexBorderColor()
Returns current border color for all vertices.

setVertexBorderColorIndex

public void setVertexBorderColorIndex(VertexAttribute_int color)
Updates border color index for all vertices.

getVertexBorderColorIndex

public VertexAttribute_int getVertexBorderColorIndex()
Returns current border color index for all vertices.

setVertexBorderWidth

public void setVertexBorderWidth(VertexAttribute_int width)
Updates border width for all vertices.

getVertexBorderWidth

public VertexAttribute_int getVertexBorderWidth()
Returns current border width for all vertices.

setVertexLabelType

public void setVertexLabelType(VertexAttribute_int ltype)
Updates label type for all vertices.

getVertexLabelType

public VertexAttribute_int getVertexLabelType()
Returns current label type for all vertices.

setVertexLabelColor

public void setVertexLabelColor(VertexAttribute_Color color)
Updates label color for all vertices.

getVertexLabelColor

public VertexAttribute_Color getVertexLabelColor()
Returns current label color for all vertices.

setVertexLabelColorIndex

public void setVertexLabelColorIndex(VertexAttribute_int color)
Updates label color index for all vertices.

getVertexLabelColorIndex

public VertexAttribute_int getVertexLabelColorIndex()
Returns current label color index for all vertices.

setVertexLabelPosition

public void setVertexLabelPosition(VertexAttribute_int pos)
Updates label posistion for all vertices.

getVertexLabelPosition

public VertexAttribute_int getVertexLabelPosition()
Returns current label posistion for all vertices.

setVertexLabel

public void setVertexLabel(VertexAttribute_String label)
Updates label for all vertices.

getVertexLabel

public VertexAttribute_String getVertexLabel()
Returns current label for all vertices.

setVertexData

public void setVertexData(VertexAttribute data)
Updates data object for all vertices.

getVertexData

public VertexAttribute getVertexData()
Returns current data object for all vertices.

setVertexPosition

public void setVertexPosition(VertexAttribute_Point data)
Updates position for all vertices.

getVertexPosition

public VertexAttribute_Point getVertexPosition()
Returns current position for all vertices.

setEdgeColor

public void setEdgeColor(EdgeAttribute_Color color)
Updates color for all edges.

getEdgeColor

public EdgeAttribute_Color getEdgeColor()
Returns current color for all edges.

setEdgeColorIndex

public void setEdgeColorIndex