Gephi Toolkit Javadoc

org.gephi.io.exporter.preview
Class SVGExporter

java.lang.Object
  extended by org.gephi.io.exporter.preview.SVGExporter
All Implemented Interfaces:
CharacterExporter, Exporter, VectorExporter, GraphRenderer, LongTask

public class SVGExporter
extends java.lang.Object
implements GraphRenderer, CharacterExporter, VectorExporter, LongTask

Class exporting the preview graph as an SVG image.

Author:
Jérémy Subtil

Constructor Summary
SVGExporter()
           
 
Method Summary
protected  org.w3c.dom.Document buildDOM(GraphSheet graphSheet, SupportSize supportSize)
          Builds the DOM from the preview graph.
 boolean cancel()
          Cancel the task.
 boolean execute()
          Run the export process.
 Workspace getWorkspace()
          Returns the workspace from where data are exported
 boolean isScaleStrokes()
           
 void renderCurvedEdge(Edge edge)
          Renders the given preview edge as a curved edge.
 void renderDirectedEdge(DirectedEdge edge)
          Renders the given preview directed edge.
 void renderEdge(Edge edge)
          Renders the given preview edge.
 void renderEdgeArrow(EdgeArrow arrow)
          Renders the given preview edge arrow.
 void renderEdgeArrows(DirectedEdge edge)
          Renders the arrows of the given preview edge.
 void renderEdgeLabel(EdgeLabel label)
          Renders the given preview edge label.
 void renderEdgeMiniLabel(EdgeMiniLabel miniLabel)
          Renders the given preview edge mini-label.
 void renderEdgeMiniLabels(DirectedEdge edge)
          Renders the mini-labels of the given preview edge.
 void renderGraph(Graph graph)
          Renders the given preview graph.
 void renderGraphBidirectionalEdges(Graph graph)
          Renders the bidirectional edges of the given preview graph.
 void renderGraphEdges(Graph graph)
          Renders the edges of the given preview graph.
 void renderGraphLabelBorders(Graph graph)
          Renders the label borders of the given preview graph.
 void renderGraphLabels(Graph graph)
          Renders the labels of the given preview graph.
 void renderGraphNodes(Graph graph)
          Renders the nodes of the given preview graph.
 void renderGraphSelfLoops(Graph graph)
          Renders the self-loops of the given preview graph.
 void renderGraphUndirectedEdges(Graph graph)
          Renders the undirected edges of the given preview graph.
 void renderGraphUnidirectionalEdges(Graph graph)
          Renders the unidirectional edges of the given preview graph.
 void renderNode(Node node)
          Renders the given preview node.
 void renderNodeLabel(NodeLabel label)
          Renders the given preview node label.
 void renderNodeLabelBorder(NodeLabelBorder border)
          Renders the given preview node label border.
 void renderSelfLoop(SelfLoop selfLoop)
          Renders the given preview self-loop.
 void renderStraightEdge(Edge edge)
          Renders the given preview edge as a straight edge.
 void setProgressTicket(ProgressTicket progressTicket)
          Set the progress ticket for the long task.
 void setScaleStrokes(boolean scaleStrokes)
           
 void setWorkspace(Workspace workspace)
          Sets the worksapce from where to export data
 void setWriter(java.io.Writer writer)
          Set the writer where to export.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGExporter

public SVGExporter()
Method Detail

execute

public boolean execute()
Description copied from interface: Exporter
Run the export process.

Specified by:
execute in interface Exporter
Returns:
true if the operation is successful, false if it has been cancelled

renderGraph

public void renderGraph(Graph graph)
Description copied from interface: GraphRenderer
Renders the given preview graph.

Specified by:
renderGraph in interface GraphRenderer
Parameters:
graph - the graph to render

renderGraphEdges

public void renderGraphEdges(Graph graph)
Description copied from interface: GraphRenderer
Renders the edges of the given preview graph.

Specified by:
renderGraphEdges in interface GraphRenderer
Parameters:
graph - the graph to render the edges

renderGraphSelfLoops

public void renderGraphSelfLoops(Graph graph)
Description copied from interface: GraphRenderer
Renders the self-loops of the given preview graph.

Specified by:
renderGraphSelfLoops in interface GraphRenderer
Parameters:
graph - the graph to render the self-loops

renderGraphUnidirectionalEdges

public void renderGraphUnidirectionalEdges(Graph graph)
Description copied from interface: GraphRenderer
Renders the unidirectional edges of the given preview graph.

Specified by:
renderGraphUnidirectionalEdges in interface GraphRenderer
Parameters:
graph - the graph to render the unidirectional edges

renderGraphBidirectionalEdges

public void renderGraphBidirectionalEdges(Graph graph)
Description copied from interface: GraphRenderer
Renders the bidirectional edges of the given preview graph.

Specified by:
renderGraphBidirectionalEdges in interface GraphRenderer
Parameters:
graph - the graph to render the bidirectional edges

renderGraphUndirectedEdges

public void renderGraphUndirectedEdges(Graph graph)
Description copied from interface: GraphRenderer
Renders the undirected edges of the given preview graph.

Specified by:
renderGraphUndirectedEdges in interface GraphRenderer
Parameters:
graph - the graph to render the undirected edges

renderGraphNodes

public void renderGraphNodes(Graph graph)
Description copied from interface: GraphRenderer
Renders the nodes of the given preview graph.

Specified by:
renderGraphNodes in interface GraphRenderer
Parameters:
graph - the graph to render the nodes

renderGraphLabels

public void renderGraphLabels(Graph graph)
Description copied from interface: GraphRenderer
Renders the labels of the given preview graph.

Specified by:
renderGraphLabels in interface GraphRenderer
Parameters:
graph - the graph to render the labels

renderGraphLabelBorders

public void renderGraphLabelBorders(Graph graph)
Description copied from interface: GraphRenderer
Renders the label borders of the given preview graph.

Specified by:
renderGraphLabelBorders in interface GraphRenderer
Parameters:
graph - the graph to render the label borders

renderNode

public void renderNode(Node node)
Description copied from interface: GraphRenderer
Renders the given preview node.

Specified by:
renderNode in interface GraphRenderer
Parameters:
node - the node to render

renderNodeLabel

public void renderNodeLabel(NodeLabel label)
Description copied from interface: GraphRenderer
Renders the given preview node label.

Specified by:
renderNodeLabel in interface GraphRenderer
Parameters:
label - the node label to render

renderNodeLabelBorder

public void renderNodeLabelBorder(NodeLabelBorder border)
Description copied from interface: GraphRenderer
Renders the given preview node label border.

Specified by:
renderNodeLabelBorder in interface GraphRenderer
Parameters:
border - the node label border to render

renderSelfLoop

public void renderSelfLoop(SelfLoop selfLoop)
Description copied from interface: GraphRenderer
Renders the given preview self-loop.

Specified by:
renderSelfLoop in interface GraphRenderer
Parameters:
selfLoop - the self-loop to render

renderDirectedEdge

public void renderDirectedEdge(DirectedEdge edge)
Description copied from interface: GraphRenderer
Renders the given preview directed edge.

Specified by:
renderDirectedEdge in interface GraphRenderer
Parameters:
edge - the directed edge to render

renderEdge

public void renderEdge(Edge edge)
Description copied from interface: GraphRenderer
Renders the given preview edge.

Specified by:
renderEdge in interface GraphRenderer
Parameters:
edge - the edge to render

renderStraightEdge

public void renderStraightEdge(Edge edge)
Description copied from interface: GraphRenderer
Renders the given preview edge as a straight edge.

Specified by:
renderStraightEdge in interface GraphRenderer
Parameters:
edge - the edge to render

renderCurvedEdge

public void renderCurvedEdge(Edge edge)
Description copied from interface: GraphRenderer
Renders the given preview edge as a curved edge.

Specified by:
renderCurvedEdge in interface GraphRenderer
Parameters:
edge - the edge to render

renderEdgeArrows

public void renderEdgeArrows(DirectedEdge edge)
Description copied from interface: GraphRenderer
Renders the arrows of the given preview edge.

Specified by:
renderEdgeArrows in interface GraphRenderer
Parameters:
edge - the edge to render the arrows

renderEdgeMiniLabels

public void renderEdgeMiniLabels(DirectedEdge edge)
Description copied from interface: GraphRenderer
Renders the mini-labels of the given preview edge.

Specified by:
renderEdgeMiniLabels in interface GraphRenderer
Parameters:
edge - the edge to render the mini-labels

renderEdgeArrow

public void renderEdgeArrow(EdgeArrow arrow)
Description copied from interface: GraphRenderer
Renders the given preview edge arrow.

Specified by:
renderEdgeArrow in interface GraphRenderer
Parameters:
arrow - the edge arrow to render

renderEdgeLabel

public void renderEdgeLabel(EdgeLabel label)
Description copied from interface: GraphRenderer
Renders the given preview edge label.

Specified by:
renderEdgeLabel in interface GraphRenderer
Parameters:
label - the edge label to render

renderEdgeMiniLabel

public void renderEdgeMiniLabel(EdgeMiniLabel miniLabel)
Description copied from interface: GraphRenderer
Renders the given preview edge mini-label.

Specified by:
renderEdgeMiniLabel in interface GraphRenderer
Parameters:
miniLabel - the edge mini-label to render

buildDOM

protected org.w3c.dom.Document buildDOM(GraphSheet graphSheet,
                                        SupportSize supportSize)
Builds the DOM from the preview graph.

Parameters:
graphSheet - the preview graph sheet
supportSize - the support size of the exported image

cancel

public boolean cancel()
Description copied from interface: LongTask
Cancel the task. Returns true if the task has been sucessfully cancelled, false otherwise.

Specified by:
cancel in interface LongTask
Returns:
true if the task has been sucessfully cancelled, false otherwise

setProgressTicket

public void setProgressTicket(ProgressTicket progressTicket)
Description copied from interface: LongTask
Set the progress ticket for the long task. Can't be null.

Specified by:
setProgressTicket in interface LongTask
Parameters:
progressTicket - the progress ticket for this task

setWriter

public void setWriter(java.io.Writer writer)
Description copied from interface: CharacterExporter
Set the writer where to export.

Specified by:
setWriter in interface CharacterExporter
Parameters:
writer - the writer the exporter is to write

getWorkspace

public Workspace getWorkspace()
Description copied from interface: Exporter
Returns the workspace from where data are exported

Specified by:
getWorkspace in interface Exporter
Returns:
the workspace the data are to be exported

setWorkspace

public void setWorkspace(Workspace workspace)
Description copied from interface: Exporter
Sets the worksapce from where to export data

Specified by:
setWorkspace in interface Exporter
Parameters:
workspace - the workspace to export

setScaleStrokes

public void setScaleStrokes(boolean scaleStrokes)

isScaleStrokes

public boolean isScaleStrokes()

Gephi Toolkit Javadoc