public class RuleEditSynchronizer
extends java.lang.Object
implements de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
VxGraph
as the underlying model.Constructor and Description |
---|
RuleEditSynchronizer()
Creates a new BasicGraphEditSynchronizer.
|
RuleEditSynchronizer(boolean edgesToLabels,
int maxLabels)
Creates a new BasicGraphEditSynchronizer with custom behavior.
|
RuleEditSynchronizer(boolean edgesToLabels,
int maxLabels,
@Nullable de.uni_due.inf.ti.swing.StandardDialog<?> informationDealer) |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(de.uni_due.inf.ti.visigraph.VxNode source,
de.uni_due.inf.ti.visigraph.VxNode target) |
void |
addInterfaceEdge(de.uni_due.inf.ti.visigraph.VxNode source,
de.uni_due.inf.ti.visigraph.VxNode target) |
void |
addInterfaceNode(de.uni_due.inf.ti.visigraph.VxGraph graph,
java.awt.geom.Point2D pt) |
void |
addLabel(de.uni_due.inf.ti.visigraph.VxEdge edge,
java.lang.String label) |
void |
addLeftEdge(de.uni_due.inf.ti.visigraph.VxNode source,
de.uni_due.inf.ti.visigraph.VxNode target) |
void |
addLeftNode(de.uni_due.inf.ti.visigraph.VxGraph graph,
java.awt.geom.Point2D pt) |
void |
addNode(de.uni_due.inf.ti.visigraph.VxGraph graph,
java.awt.geom.Point2D pt) |
void |
addRightEdge(de.uni_due.inf.ti.visigraph.VxNode source,
de.uni_due.inf.ti.visigraph.VxNode target) |
void |
addRightNode(de.uni_due.inf.ti.visigraph.VxGraph graph,
java.awt.geom.Point2D pt) |
boolean |
canAddEdge(de.uni_due.inf.ti.visigraph.VxNode source,
de.uni_due.inf.ti.visigraph.VxNode target) |
boolean |
canAddLabel(de.uni_due.inf.ti.visigraph.VxEdge edge) |
boolean |
canAddNode(de.uni_due.inf.ti.visigraph.VxGraph graph)
This implementation simply returns
true . |
boolean |
canEditLabel(de.uni_due.inf.ti.visigraph.VxNode node) |
void |
editLabel(de.uni_due.inf.ti.visigraph.VxNode node,
java.lang.String newLabel) |
java.lang.String |
getNewLabelStyleName()
Returns the name of the style of labels that are added to the graph.
|
de.uni_due.inf.ti.graph.Rule |
getResultRule() |
boolean |
isPossibleSourceNode(de.uni_due.inf.ti.visigraph.VxNode source) |
void |
setEnabled(boolean bool)
Sets whether this synchronizer may add anything to the graph
|
void |
setNewInterfaceEdgeStyleName(java.lang.String style)
Sets the name of the style of edges that are added to the interface.
|
void |
setNewInterfaceNodeStyleName(java.lang.String style)
Sets the name of the style of nodes that are added to the interface.
|
void |
setNewLabelStyleName(java.lang.String style)
Sets the style of labels that are added to the graph by the user.
|
void |
setNewLeftEdgeStyleName(java.lang.String style)
Sets the name of the style of edges that are added to the graph by this
GraphEditor.
|
void |
setNewLeftNodeStyleName(java.lang.String style)
Sets the name of the style of nodes that are added to the graph.
|
void |
setNewRightEdgeStyleName(java.lang.String style)
Sets the name of the style of edges that are added to the graph by this
GraphEditor.
|
void |
setNewRightNodeStyleName(java.lang.String style)
Sets the name of the style of nodes that are added to the graph.
|
public RuleEditSynchronizer()
public RuleEditSynchronizer(boolean edgesToLabels, int maxLabels)
edgesToLabels
- whether the new BasicGraphEditSynchronizer allows edges to have
edge labels as source or targetmaxLabels
- maximum number of label nodes on an edge; -1 means unlimitedjava.lang.IllegalArgumentException
- if maxLabels < -1
public RuleEditSynchronizer(boolean edgesToLabels, int maxLabels, @Nullable de.uni_due.inf.ti.swing.StandardDialog<?> informationDealer)
public void setNewLeftNodeStyleName(java.lang.String style)
style
- style of nodes added to the graphpublic void setNewInterfaceNodeStyleName(java.lang.String style)
style
- style of nodes added to the graphpublic void setNewRightNodeStyleName(java.lang.String style)
style
- style of nodes added to the graphpublic void setNewLeftEdgeStyleName(java.lang.String style)
style
- style of edges added to a left-hand side graphpublic void setNewInterfaceEdgeStyleName(java.lang.String style)
style
- style of nodes added to the graphpublic void setNewRightEdgeStyleName(java.lang.String style)
style
- style of edges added to a right-hand side graphpublic java.lang.String getNewLabelStyleName()
public void setNewLabelStyleName(java.lang.String style)
style
- style of labels added to the graphpublic boolean isPossibleSourceNode(de.uni_due.inf.ti.visigraph.VxNode source)
isPossibleSourceNode
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public boolean canAddNode(de.uni_due.inf.ti.visigraph.VxGraph graph)
This implementation simply returns true
.
canAddNode
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public boolean canAddEdge(de.uni_due.inf.ti.visigraph.VxNode source, de.uni_due.inf.ti.visigraph.VxNode target)
canAddEdge
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public boolean canAddLabel(de.uni_due.inf.ti.visigraph.VxEdge edge)
canAddLabel
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public boolean canEditLabel(de.uni_due.inf.ti.visigraph.VxNode node)
canEditLabel
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public void addNode(de.uni_due.inf.ti.visigraph.VxGraph graph, java.awt.geom.Point2D pt)
addNode
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public void addEdge(de.uni_due.inf.ti.visigraph.VxNode source, de.uni_due.inf.ti.visigraph.VxNode target)
addEdge
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public void addLeftNode(de.uni_due.inf.ti.visigraph.VxGraph graph, java.awt.geom.Point2D pt)
public void addLeftEdge(de.uni_due.inf.ti.visigraph.VxNode source, de.uni_due.inf.ti.visigraph.VxNode target)
public void addInterfaceNode(de.uni_due.inf.ti.visigraph.VxGraph graph, java.awt.geom.Point2D pt)
public void addInterfaceEdge(de.uni_due.inf.ti.visigraph.VxNode source, de.uni_due.inf.ti.visigraph.VxNode target)
public void addRightNode(de.uni_due.inf.ti.visigraph.VxGraph graph, java.awt.geom.Point2D pt)
public void addRightEdge(de.uni_due.inf.ti.visigraph.VxNode source, de.uni_due.inf.ti.visigraph.VxNode target)
public void addLabel(de.uni_due.inf.ti.visigraph.VxEdge edge, java.lang.String label)
addLabel
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public void editLabel(de.uni_due.inf.ti.visigraph.VxNode node, java.lang.String newLabel)
editLabel
in interface de.uni_due.inf.ti.visigraph.swing.GraphEditSynchronizer
public de.uni_due.inf.ti.graph.Rule getResultRule()
public void setEnabled(boolean bool)
bool
- whether it is allowed or not