org.grinvin.gred

Class GraphEditor

Implemented Interfaces:
HasURI

public class GraphEditor
extends JFrame
implements HasURI

Graph editor window.

Constructor Summary

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

Method Summary

Annotation
getAnnotation()
Get the annotation for the current graph in the editor.
Embedding
getEmbedding()
Get the embedding for the current graph in the editor.
Graph
getGraph()
Get the current graph in the editor.
GraphList
getGraphList()
URI
getURI()
boolean
isDirty()
Check whether the editor is 'dirty'.
void
setAdvancedToolbar(boolean show)
void
setDirty(boolean dirty)
Set the 'dirty' flag of the editor.
void
setGraph(EmbeddingView newEmbedding, AnnotationView newAnnotation)
Load (a copy of) the given embedding into the editor.
void
setURI(URI uri)
boolean
showAdvancedToolbar()
void
showAdvancedToolbar(boolean show)

Constructor Details

GraphEditor

public GraphEditor(MutableEmbeddingModel model,
                   MutableAnnotationModel annotation,
                   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

getAnnotation

public Annotation getAnnotation()
Get the annotation for the current graph in the editor.

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()

getURI

public URI getURI()
Specified by:
getURI in interface HasURI

isDirty

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

setAdvancedToolbar

public void setAdvancedToolbar(boolean show)

setDirty

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

setGraph

public void setGraph(EmbeddingView newEmbedding,
                     AnnotationView newAnnotation)
Load (a copy of) the given embedding into the editor.

setURI

public void setURI(URI uri)
Specified by:
setURI in interface HasURI

showAdvancedToolbar

public boolean showAdvancedToolbar()

showAdvancedToolbar

public void showAdvancedToolbar(boolean show)