org.grinvin.gred

Class GraphEditor

Implemented Interfaces:
HasGraphList

public class GraphEditor
extends JFrame
implements HasGraphList

Graph editor window.

Constructor Summary

GraphEditor(MutableEmbeddingModel model, GraphContext context, GraphListModel list)
Create an editor that uses the given embedding model and context.
GraphEditor(GraphListModel list)
Default constructor.

Method Summary

AttributedCommandManager
getCommandManager()
Return the command manager of this editor window.
Embedding
getEmbedding()
Get the embedding for the current graph in the editor.
Graph
getGraph()
Get the current graph in the editor.
GraphList
getGraphList()
Return the graph list model which is used by this component.
GuidesTool
getGuidesTool()
Get the guidestool for this editor.
boolean
isDirty()
Check whether the editor is 'dirty'.
void
setDirty(boolean dirty)
Set the 'dirty' flag of the editor.
void
setEmbedding(EmbeddingView newEmbedding)
Load (a copy of) the given embedding into the editor.

Constructor Details

GraphEditor

public GraphEditor(MutableEmbeddingModel model,
                   GraphContext context,
                   GraphListModel list)
Create an editor that uses the given embedding model and context. This constructor is mainly useful when models and contexts should be shared between editors. In most cases users should use the no argument constructor.

GraphEditor

public GraphEditor(GraphListModel list)
Default constructor.

Method Details

getCommandManager

public AttributedCommandManager getCommandManager()
Return the command manager of this editor window.

getEmbedding

public Embedding getEmbedding()
Get the embedding for the current graph in the editor.

getGraph

public Graph getGraph()
Get the current graph in the editor.

getGraphList

public GraphList getGraphList()
Return the graph list model which is used by this component.
Specified by:
getGraphList in interface HasGraphList

getGuidesTool

public GuidesTool getGuidesTool()
Get the guidestool for this editor.

isDirty

public boolean isDirty()
Check whether the editor is 'dirty'.

setDirty

public void setDirty(boolean dirty)
Set the 'dirty' flag of the editor.

setEmbedding

public void setEmbedding(EmbeddingView newEmbedding)
Load (a copy of) the given embedding into the editor.