Search this API

y.layout
Class LayoutGraphWriter

java.lang.Object
  extended by y.layout.LayoutGraphWriter

public final class LayoutGraphWriter
extends java.lang.Object

This class writes the basic layout and structure as well as existing grouping information of a LayoutGraph instance or a pair of Graph and GraphLayout instances in GML format.

 
This class is for debugging purposes only and is not recommended for production use.
 

Constructor Summary
LayoutGraphWriter(Graph graph)
          Creates a new instance of LayoutGraphWriter that writes out only the structural information of the graph.
LayoutGraphWriter(Graph graph, GraphLayout layout)
          Creates a new instance of LayoutGraphWriter that writes out structural and layout information of the graph.
LayoutGraphWriter(LayoutGraph graph)
          Creates a new instance of LayoutGraphWriter that writes out structural and layout information of the graph.
 
Method Summary
 void write(java.io.File file)
          Writes the graph to a file in GML format which can be read e.g. by yEd.
 void write(java.lang.String file)
          Writes the graph to a file in GML format which can be read e.g. by yEd.
 void write(java.io.Writer writer)
          Writes the graph to a writer in GML format which can be read e.g. by yEd.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutGraphWriter

public LayoutGraphWriter(Graph graph)
Creates a new instance of LayoutGraphWriter that writes out only the structural information of the graph.

Parameters:
graph - the graph to be written

LayoutGraphWriter

public LayoutGraphWriter(LayoutGraph graph)
Creates a new instance of LayoutGraphWriter that writes out structural and layout information of the graph.

Parameters:
graph - the graph to be written containing layout information

LayoutGraphWriter

public LayoutGraphWriter(Graph graph,
                         GraphLayout layout)
Creates a new instance of LayoutGraphWriter that writes out structural and layout information of the graph.

Parameters:
graph - the graph to be written
layout - the layout information of the graph to be written
Method Detail

write

public void write(java.lang.String file)
           throws java.io.IOException
Writes the graph to a file in GML format which can be read e.g. by yEd.

Parameters:
file - the filename
Throws:
java.io.IOException - if creating the file fails

write

public void write(java.io.File file)
           throws java.io.IOException
Writes the graph to a file in GML format which can be read e.g. by yEd.

Parameters:
file - the file
Throws:
java.io.IOException - if creating the file fails

write

public void write(java.io.Writer writer)
           throws java.io.IOException
Writes the graph to a writer in GML format which can be read e.g. by yEd.

Parameters:
writer - the writer
Throws:
java.io.IOException - if creating the file fails

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.