All Classes and Interfaces
Class
Description
This class is the superclass of all parsers.
This class provides an implementation of the PathHandler that initializes
a Shape from the value of a path's 'd' attribute.
This class produces a polygon shape from a reader.
This class produces a polyline shape from a reader.
This interface defines constants for CSS.
This class provides a default implementation of ErrorHandler.
This interface must be implemented and then registred as the error handler
in order to be notified of parsing errors.
The
ExtendedGeneralPath
class represents a geometric
path constructed from straight lines, quadratic and cubic (Bezier)
curves and elliptical arc.The
ExtendedPathIterator
class represents a geometric
path constructed from straight lines, quadratic and cubic (Bezier)
curves and elliptical arcs.Implements a collection of utility methods abstracting the graph structure
taking into account graph properties such as visible/non-visible traversal
Baseclass for all timer-based animations.
A very fast and memory efficient class to encode and decode to and from BASE64 in full accordance
with RFC 2045.
On Windows XP sp1 with 1.4.2_04 and later ;), this encoder and decoder is about 10 times faster on small arrays (10 - 1000 bytes) and 2-3 times as fast on larger arrays (10000 - 1000000 bytes) compared to
On byte arrays the encoder is about 20% faster than Jakarta Commons Base64 Codec for encode and about 50% faster for decoding large arrays.
On Windows XP sp1 with 1.4.2_04 and later ;), this encoder and decoder is about 10 times faster on small arrays (10 - 1000 bytes) and 2-3 times as fast on larger arrays (10000 - 1000000 bytes) compared to
sun.misc.Encoder()/Decoder()
.On byte arrays the encoder is about 20% faster than Jakarta Commons Base64 Codec for encode and about 50% faster for decoding large arrays.
Cells are the elements of the graph model.
Codec for mxCells.
To control this editor, use mxGraph.invokesStopCellEditing, mxGraph.
Implements a mouse tracker that marks cells under the mouse.
Implements a mechanism for temporary cell Ids.
Represents the current state of a cell in a given graph view.
Represents the current state of a cell in a given graph view.
Event handler that highlights cells.
Codec for mxChildChanges.
XML codec for Java object graphs.
Singleton class that acts as a global registry for codecs.
Defines an object that contains the constraints about how to connect one
side of an edge to its terminal.
Connection handler creates new connections between cells.
Connection handler creates new connections between cells.
Implements a cost function for a constant cost per traversed cell.
Contains all global constants.
Sets the horizontal locations of node and edge dummy nodes on each layer.
Draws the edge label along a curve derived from the curve describing
the edge's path
Implements a cost function for the Euclidean length of an edge.
public static void main(String[] args)
{
try
{
String filename = Test.class.getResource(
"/com/mxgraph/online/exported.xml").getPath();
String xml = mxUtils.readFile(filename);
System.out.println("xml=" + xml);
Document doc = mxUtils.parseXml(xml);
Element root = doc.getDocumentElement();
int width = Integer.parseInt(root.getAttribute("width"));
int height = Integer.parseInt(root.getAttribute("height"));
System.out.println("width=" + width + " height=" + height);
BufferedImage img = mxUtils.createBufferedImage(width, height,
Color.WHITE);
Graphics2D g2 = img.createGraphics();
mxUtils.setAntiAlias(g2, true, true);
mxDomOutputParser reader = new mxDomOutputParser(
new mxGraphicsExportCanvas(g2));
reader.read((Element) root.getFirstChild().getNextSibling());
ImageIO.write(img, "PNG", new File(
"C:\\Users\\Gaudenz\\Desktop\\test.png"));
}
catch (Exception e)
{
e.printStackTrace();
}
}
// -------------
Document doc = mxUtils.parseXml(xml);
Element root = doc.getDocumentElement();
mxDomOutputParser reader = new mxDomOutputParser(canvas);
reader.read(root.getFirstChild());
Contains various DOM API helper methods for use with mxGraph.
A cost function that assumes that edge value is of type "double" or "String" and returns that value.
Provides various edge styles to be used as the values for
mxConstants.STYLE_EDGE in a cell style.
Defines the requirements for an edge style function.
Contains all global constants.
Base class for objects that dispatch named events.
Base class for objects that dispatch named events.
Defines the requirements for an object that listens to an event source.
Fast organic layout algorithm.
This class implements a priority queue.
Implements a node of the Fibonacci heap.
Parses a GD .txt file and imports it in the given graph.
This class depends from the classes contained in com.mxgraph.io.gd.
This class depends from the classes contained in com.mxgraph.io.gd.
Represents the different states in the parse of a file.
Codec for mxChildChanges.
Represents the geometry of a cell.
Implements a graph object that allows to create diagrams from a graph model
and stylesheet.
An abstraction of an internal hierarchy node or edge
A singleton class that provides algorithms for graphs.
For setting the preferred size of the viewport for scrolling, use
mxGraph.setMinimumGraphSize.
An abstraction of a hierarchical edge for the hierarchy layout
Internal model of a hierarchical graph.
Defines the interface that visitors use to perform operations upon the
graph information during depth first search (dfs) or other tree-traversal
strategies implemented by subclassers.
An abstraction of an internal node in the hierarchy layout
An abstraction of a rank in the hierarchy layout.
An implementation of a canvas that uses Graphics2D for painting.
Used for exporting images.
Abstract bass class for layouts
Extends mxEventSource to implement a graph model.
An outline view for a specific graph component.
Constants for graph structure properties
Implements the selection model for a graph.
Implements a view for the graph.
Action to change the current root in a view.
A converter that renders display XML data onto a graphics canvas.
An abstract converter that renders display XML data onto a canvas.
The top level compound layout of the hierarchical layout.
The specific layout interface for hierarchical layouts.
An implementation of a canvas that uses HTML for painting.
Contains various helper methods for use with mxGraph.
To set global CSS for all HTML labels, use the following code:
Defines the requirements for a canvas that paints the vertices and edges of
a graph.
Requirements for implementing technologies:
- Path rendering (move, line, quad, curve, arc)
- Images, flip v/h, aspect, alpha (PNG, JPG, GIF)
- Linear gradients (in all four directions)
- Transparency, fill and stroke
- Rotation, flip v/h
- Font rendering
- Dash patterns
- Clipping by path (not just rectangle)
- Alpha gradients (for glass effect)
- Encode result as image (PNG, JPG)
Defines the requirements for a cell that can be used in an mxGraphModel.
The cost function takes a cell and returns it's cost as a double.
Defines the requirements for an object that implements a graph layout.
Defines the requirements for a graph model to be used with mxGraph.
Defines the interface for an atomic change of the graph model.
Implements a 2-dimensional point with double precision coordinates.
Maps from keys to base64 encoded images or file locations.
An implementation of a canvas that uses Graphics2D for painting.
A rectangular shape that contains a single image.
Implements a layout manager that updates the layout for a given transaction.
Implements a line with double precision coordinates.
Performs a vertex ordering within ranks as described by Gansner et al 1993
An implementation of the first stage of the Sugiyama layout.
Codec for mxGraphModels.
Provides animation effects.
Connection handler creates new connections between cells.
Generic codec for Java objects.
An implementation of a simulated annealing layout, based on "Drawing Graphs
Nicely Using Simulated Annealing" by Davidson and Harel (1996).
A custom graph model
Provides various perimeter functions to be used in a style
as the value of mxConstants.STYLE_PERIMETER.
Defines the requirements for a perimeter function.
An instance of
ImageEncodeParam
for encoding images in
the PNG format.An ImageEncoder for the PNG file format.
A class representing the fields of a PNG suggested palette entry.
Utility class to extract the compression text portion of a PNG
Implements a 2-dimensional point with double precision coordinates.
Implements a 2-dimensional rectangle with double precision coordinates.
Codec for mxChildChanges.
Basic example of implementing a handler for rotation.
Implements a rubberband selection.
XMLReader reader = SAXParserFactory.newInstance().newSAXParser()
.getXMLReader();
reader.setContentHandler(new mxSaxExportHandler(
new mxGraphicsExportCanvas(g2)));
reader.parse(new InputSource(new StringReader(xml)));
One dimension of a spline curve
Implements a stencil for the given XML definition.
Stencil shape drawing that takes an XML definition of the shape and renders
it.
Singleton class that acts as a global converter from string to object values
in a style.
Defines the appearance of the cells in a graph.
Codec for mxStylesheets.
Contains various style helper methods for use with mxGraph.
An implementation of a canvas that uses SVG for painting.
Manager for swimlanes and nested swimlanes that sets the size of newly added
swimlanes to that of their siblings, and propagates changes to the size of a
swimlane to its siblings, if siblings is true, and its ancestors, if
bubbling is true.
Codec for mxChildChanges.
Implements a collection of utility methods for traversing the
graph structure.
Implements a 2-dimensional rectangle with double precision coordinates.
Defines the requirements for an undoable change.
Implements an undo history.
Implements a union find structure that uses union by rank and path
compression.
Contains various helper methods for use with mxGraph.
An implementation of a canvas that uses VML for painting.
Contains various XML helper methods for use with mxGraph.
This class represents a reader which normalizes the line break: \n,
\r, \r\n are replaced by \n.
This class represents a parser with support for numbers.
This class encapsulates a general parse error or warning.
This interface represents a parser.
This interface must be implemented and then registred as the
handler of a
PathParser
instance in order to be
notified of parsing events.This class implements an event-based parser for the SVG path's d
attribute values.
This interface must be implemented and then registred as the
handler of a
PointsParser
instance in order to be
notified of parsing events.This class implements an event-based parser for the SVG points
attribute values (used with polyline and polygon elements).
This interface represents objects which creates Shape objects.
This class represents a NormalizingReader which handles Strings.