$darkmode
DENOPTIM
|
A Panel that holds the JUNG representation of a graph. More...
Classes | |
class | EdgeDrawPaintTransformer |
class | EdgeLabelTransformer |
class | EdgeStrokeTransformer |
class | GraphOptsPopup |
class | JEdge |
An edge in the JUNG Graph. More... | |
class | JVertex |
a vertex in the JUNG Graph. More... | |
enum | JVertexType |
enum | LabelType |
class | PopupGraphMousePlugin |
class | VertexFillPaintTransformer |
class | VertexLabelTransformer |
class | VertexShapePaintTransformer |
Public Member Functions | |
GraphViewerPanel () | |
Constructor. More... | |
void | cleanup () |
Removes the currently loaded graph viewer. More... | |
void | loadGraphToViewer (DGraph dnGraph) |
Load the given DGraph to this graph viewer. More... | |
void | loadGraphToViewer (Template tmpl) |
Load the DGraph contained in a Template into the graph viewer. More... | |
void | loadGraphToViewer (DGraph dnGraph, JUNGGraphSnapshot prevStatus) |
Load the given DGraph to the graph viewer. More... | |
edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | convertDnGraphToGSGraph (DGraph dnG) |
Created a JUNG graph object that represents a DGraph , and allows to load a graphical representation into the viewer. More... | |
edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | convertDnGraphToGSGraph (DGraph dnpGraph, Template tmpl) |
Created a JUNG graph object that represents a DGraph , and allows to load a graphical representation into the viewer. More... | |
void | loadGraphToViewer (edu.uci.ics.jung.graph.Graph< JVertex, JEdge > g) |
Load the given graph to the graph viewer. More... | |
void | loadGraphToViewer (edu.uci.ics.jung.graph.Graph< JVertex, JEdge > g, JUNGGraphSnapshot prevStatus) |
Load the given graph to the graph viewer. More... | |
void | loadGraphToViewer (edu.uci.ics.jung.graph.Graph< JVertex, JEdge > g, JUNGGraphSnapshot prevStatus, boolean lock) |
Load the given graph to the graph viewer. More... | |
void | loadGraphToViewer (edu.uci.ics.jung.graph.Graph< JVertex, JEdge > g, JUNGGraphSnapshot prevStatus, boolean lock, double reScaling) |
Load the given graph to the graph viewer. More... | |
void | fireMouseModePropertyChange (int i) |
Files a property change relative to the mode of mouse transformation. More... | |
void | centerGraphLayout () |
void | setMouseMode (ModalGraphMouse.Mode mode) |
void | alterLabels (LabelType labelType, boolean show) |
Adds or removes labels from the elements selected in the graph view. More... | |
Set< JEdge > | getSelectedEdges () |
Finds of selected edges from the viewer. More... | |
Set< JVertex > | getSelectedNodes () |
Finds selected nodes from the viewer. More... | |
boolean | hasSelected () |
Check is there is any node selected in the viewer. More... | |
JUNGGraphSnapshot | getGraphStatusSnapshot () |
Returns a copy of the graph loaded into the viewer. More... | |
void | dispose () |
Static Public Attributes | |
static final String | PROPERTYNODECLICKED = "NODECLICKED" |
static final String | PROPERTYMOUSEMODE = "SETMOUSEMODE" |
Package Attributes | |
edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | loadedGraph |
DNPSpringLayout< JVertex, JEdge > | layout |
VisualizationViewer< JVertex, JEdge > | viewer |
Private Member Functions | |
void | initialize () |
Builds the initialized component. More... | |
Point2D | getLayoutCenter () |
void | inheritFeatures (JUNGGraphSnapshot prevStatus, boolean lock) |
Static Private Member Functions | |
static void | renumberAPs (Template tmpl, edu.uci.ics.jung.graph.Graph< JVertex, JEdge > graph) |
Private Attributes | |
double | scaling = 1.0 |
DefaultModalGraphMouse< JVertex, JEdge > | gm |
Static Private Attributes | |
static final long | serialVersionUID = 2L |
Version UID. More... | |
A Panel that holds the JUNG representation of a graph.
Definition at line 77 of file GraphViewerPanel.java.
denoptim.gui.GraphViewerPanel.GraphViewerPanel | ( | ) |
Constructor.
Definition at line 319 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.initialize().
void denoptim.gui.GraphViewerPanel.alterLabels | ( | LabelType | labelType, |
boolean | show | ||
) |
Adds or removes labels from the elements selected in the graph view.
The logics is a bit complex in that the behaviour is special in case one/more nodes are selected AND we want to alter the APClass labels: if there is only one selected node, then we display the APClasses on all incident vertexes, if there is more than one,
labelType | the type of label to act on. |
show | use true to display labels, or false to hide labels of the given kind. |
Definition at line 1136 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.getSelectedNodes(), denoptim.gui.GraphViewerPanel.loadedGraph, and denoptim.gui.GraphViewerPanel.viewer.
Referenced by denoptim.gui.GraphVertexMolViewerPanel.alterLabels(), and denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup().
void denoptim.gui.GraphViewerPanel.centerGraphLayout | ( | ) |
Definition at line 673 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.getLayoutCenter(), and denoptim.gui.GraphViewerPanel.viewer.
Referenced by denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
void denoptim.gui.GraphViewerPanel.cleanup | ( | ) |
Removes the currently loaded graph viewer.
Definition at line 342 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.viewer.
Referenced by denoptim.gui.GraphVertexMolViewerPanel.clearCurrentSystem(), denoptim.gui.GraphViewerPanel.dispose(), denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup(), denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer(), and denoptim.gui.VertexAsGraphViewPanel.loadVertexStructure().
edu.uci.ics.jung.graph.Graph< JVertex, JEdge > denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph | ( | DGraph | dnG | ) |
Created a JUNG graph object that represents a DGraph
, and allows to load a graphical representation into the viewer.
dnG | the DGraph to be converted. |
Definition at line 404 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph().
Referenced by denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
edu.uci.ics.jung.graph.Graph< JVertex, JEdge > denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph | ( | DGraph | dnpGraph, |
Template | tmpl | ||
) |
Created a JUNG graph object that represents a DGraph
, and allows to load a graphical representation into the viewer.
dnG | the DGraph to be converted. |
tmpl | null, or the Template that contains the DGraph . If this is not null the numbering of the AP nodes will be based on the list of APs of the Template , otherwise (if tmpl is null) the numbering refers to the AP list of the vertex that is part of the dnG graph. |
Definition at line 424 of file GraphViewerPanel.java.
References denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getVertexList(), denoptim.gui.GraphViewerPanel.JVertexType.RCV, and denoptim.gui.GraphViewerPanel.renumberAPs().
void denoptim.gui.GraphViewerPanel.dispose | ( | ) |
Definition at line 1252 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.cleanup().
Referenced by denoptim.gui.GraphVertexMolViewerPanel.dispose(), and denoptim.gui.VertexAsGraphViewPanel.dispose().
void denoptim.gui.GraphViewerPanel.fireMouseModePropertyChange | ( | int | i | ) |
Files a property change relative to the mode of mouse transformation.
i | use 0 for picking mode, 1 for move mode. |
Definition at line 666 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.PROPERTYMOUSEMODE.
Referenced by denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup().
JUNGGraphSnapshot denoptim.gui.GraphViewerPanel.getGraphStatusSnapshot | ( | ) |
Returns a copy of the graph loaded into the viewer.
Definition at line 1240 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.layout, and denoptim.gui.GraphViewerPanel.loadedGraph.
Referenced by denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup(), and denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer().
|
private |
Definition at line 687 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.layout, and denoptim.gui.GraphViewerPanel.loadedGraph.
Referenced by denoptim.gui.GraphViewerPanel.centerGraphLayout().
Set< JEdge > denoptim.gui.GraphViewerPanel.getSelectedEdges | ( | ) |
Finds of selected edges from the viewer.
Definition at line 1186 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.loadedGraph, and denoptim.gui.GraphViewerPanel.viewer.
Set< JVertex > denoptim.gui.GraphViewerPanel.getSelectedNodes | ( | ) |
Finds selected nodes from the viewer.
Definition at line 1219 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.viewer.
Referenced by denoptim.gui.GraphViewerPanel.alterLabels(), denoptim.gui.GraphVertexMolViewerPanel.getAPsSelectedInViewer(), and denoptim.gui.GraphVertexMolViewerPanel.getSelectedNodesInViewer().
boolean denoptim.gui.GraphViewerPanel.hasSelected | ( | ) |
Check is there is any node selected in the viewer.
true
if there is at least one node selected. Definition at line 1230 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.viewer.
Referenced by denoptim.gui.GraphVertexMolViewerPanel.hasSelectedNodes().
|
private |
Definition at line 929 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.LabelType.APC, denoptim.gui.GraphViewerPanel.LabelType.APID, denoptim.gui.GraphViewerPanel.LabelType.BBID, denoptim.gui.GraphViewerPanel.LabelType.BT, denoptim.gui.JUNGGraphSnapshot.getEdgeIDsWithLabel(), denoptim.gui.JUNGGraphSnapshot.getVertexeIDsWithLabel(), denoptim.gui.GraphViewerPanel.layout, denoptim.gui.GraphViewerPanel.loadedGraph, and denoptim.gui.JUNGGraphSnapshot.vertexPosition.
Referenced by denoptim.gui.GraphViewerPanel.loadGraphToViewer().
|
private |
Builds the initialized component.
Definition at line 330 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.GraphViewerPanel().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | DGraph | dnGraph | ) |
Load the given DGraph
to this graph viewer.
dnGraph | the graph to load. |
Definition at line 362 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
Referenced by denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup(), denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer(), denoptim.gui.GraphViewerPanel.loadGraphToViewer(), and denoptim.gui.VertexAsGraphViewPanel.loadVertexStructure().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | DGraph | dnGraph, |
JUNGGraphSnapshot | prevStatus | ||
) |
Load the given DGraph
to the graph viewer.
dnGraph | the graph to load. |
prevStatus | the snapshot of the previous status. We use this to remember previously chosen settings, such as the labels to be displayed, or the position of nodes. |
Definition at line 390 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | g | ) |
Load the given graph to the graph viewer.
g | the graph to load |
Definition at line 504 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.loadGraphToViewer().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | g, |
JUNGGraphSnapshot | prevStatus | ||
) |
Load the given graph to the graph viewer.
g | the graph to load |
prevStatus | the snapshot of the previous status. We use this to remember previously chosen settings, such as the labels to be displayed, or the position of nodes. |
Definition at line 518 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.loadGraphToViewer().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | g, |
JUNGGraphSnapshot | prevStatus, | ||
boolean | lock | ||
) |
Load the given graph to the graph viewer.
g | the graph to load |
prevStatus | the snapshot of the previous status. We use this to remember previously chosen settings, such as the labels to be displayed, or the position of nodes. |
lock | decides whether we lock the initial position of nodes or not. |
Definition at line 534 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.loadGraphToViewer().
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | edu.uci.ics.jung.graph.Graph< JVertex, JEdge > | g, |
JUNGGraphSnapshot | prevStatus, | ||
boolean | lock, | ||
double | reScaling | ||
) |
Load the given graph to the graph viewer.
g | the graph to load |
prevStatus | the snapshot of the previous status. We use this to remember previously chosen settings, such as the labels to be displayed, or the position of nodes. |
lock | decides whether we lock the initial position of nodes or not. |
reScaling | a factor to be multiplied to the current scaling of the graph layout size. This allows to reduce/enlarge the space considered for plotting the graph. |
Definition at line 552 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.centerGraphLayout(), denoptim.gui.GraphViewerPanel.JVertex.expandable, denoptim.gui.GraphViewerPanel.gm, denoptim.gui.GUIPreferences.graphLabelFontSize, denoptim.gui.GraphViewerPanel.inheritFeatures(), denoptim.gui.GraphViewerPanel.layout, denoptim.gui.GraphViewerPanel.loadedGraph, denoptim.gui.GraphViewerPanel.PROPERTYNODECLICKED, denoptim.gui.GraphViewerPanel.scaling, and denoptim.gui.GraphViewerPanel.viewer.
void denoptim.gui.GraphViewerPanel.loadGraphToViewer | ( | Template | tmpl | ) |
Load the DGraph
contained in a Template
into the graph viewer.
tmpl | the template containing the graph to visualise. |
Definition at line 374 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), denoptim.graph.Template.getInnerGraph(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
|
staticprivate |
Definition at line 477 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.JVertexType.AP, denoptim.graph.Template.getAttachmentPoints(), denoptim.graph.Template.getInnerAPFromOuterAP(), and denoptim.graph.AttachmentPoint.toString().
Referenced by denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph().
void denoptim.gui.GraphViewerPanel.setMouseMode | ( | ModalGraphMouse.Mode | mode | ) |
Definition at line 921 of file GraphViewerPanel.java.
References denoptim.gui.GraphViewerPanel.gm.
Referenced by denoptim.gui.GraphVertexMolViewerPanel.setMouseMode().
Definition at line 88 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.loadGraphToViewer(), and denoptim.gui.GraphViewerPanel.setMouseMode().
|
package |
Definition at line 85 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.getGraphStatusSnapshot(), denoptim.gui.GraphViewerPanel.getLayoutCenter(), denoptim.gui.GraphViewerPanel.inheritFeatures(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
Definition at line 84 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.alterLabels(), denoptim.gui.GraphViewerPanel.getGraphStatusSnapshot(), denoptim.gui.GraphViewerPanel.getLayoutCenter(), denoptim.gui.GraphViewerPanel.getSelectedEdges(), denoptim.gui.GraphViewerPanel.GraphOptsPopup.GraphOptsPopup(), denoptim.gui.GraphViewerPanel.inheritFeatures(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
|
static |
Definition at line 96 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.fireMouseModePropertyChange(), and denoptim.gui.GraphVertexMolViewerPanel.initialize().
|
static |
Definition at line 95 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphVertexMolViewerPanel.initialize(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().
|
private |
Definition at line 86 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.loadGraphToViewer().
|
staticprivate |
Version UID.
Definition at line 82 of file GraphViewerPanel.java.
Definition at line 87 of file GraphViewerPanel.java.
Referenced by denoptim.gui.GraphViewerPanel.alterLabels(), denoptim.gui.GraphViewerPanel.centerGraphLayout(), denoptim.gui.GraphViewerPanel.cleanup(), denoptim.gui.GraphViewerPanel.getSelectedEdges(), denoptim.gui.GraphViewerPanel.getSelectedNodes(), denoptim.gui.GraphViewerPanel.hasSelected(), and denoptim.gui.GraphViewerPanel.loadGraphToViewer().