|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.guis.graphDrawing.VisualGraph
Title : VisualGraph
Description : VisualGraph is a visual wrapper for Graph: a VisualGraph contains a reference to a Graph with visual attributes and methods. In this way, visualization (or drawing) of a Graph is separeted from the structure Graph.
Copyright : Copyright (c) Adil KABBAJ 2004-2009
Field Summary | |
static java.awt.Font |
fontTxtFld
|
Graph |
graph
|
boolean |
isBrowseView
|
java.util.ArrayList |
vedges
|
java.util.ArrayList |
vnodes
|
Constructor Summary | |
VisualGraph()
Create a VisualGraph |
|
VisualGraph(Graph graph)
Create a VisualGraph for the specified graph |
Method Summary | |
void |
addEdge(Edge vedge,
VisualNode Source,
VisualNode Target)
Add a VisualEdge to the current VisualGraph |
void |
addEdge(VisualEdge vedge)
Add a VisualEdge to the current VisualGraph |
void |
addNode(VisualNode vnode)
Add a VisualNode to the current VisualGraph |
void |
clear()
Clear the content of the current VisualGraph |
void |
clear(GraphDrawPanel graphDrawPanel)
Remove from the current VisualGraph all VisualNodes that are contained in the tracker of the specified graphDrawPanel |
void |
clearVGraphOnly()
|
static VisualGraph |
copy(Graph graph,
java.util.ArrayList lstVNodes,
java.util.ArrayList lstVEdges)
Copy the part of the current Visual Graph that is determined by the list of Visual Nodes and the list of Visual Edges that are contained in the current Visual Graph |
VisualNode |
createAddVNode(Node node,
Lexicon lexicon,
java.awt.Graphics g,
boolean ViewMode,
int c)
|
static VisualGraph |
createSubVGraph(Graph graph,
VisualNode SelectedVnode,
VisualGraph lstExistingvNode,
Lexicon lexicon,
java.awt.Graphics g,
boolean rearrange)
|
static VisualGraph |
createSubVGraph(Graph graph,
VisualNode SelectedVnode,
VisualGraph lstExistingvNode,
Lexicon lexicon,
java.awt.Graphics g,
boolean rearrange,
java.awt.Point verticalspacing)
Create a SubVisualGraph for VisualGraph And used to reorganize the subgraph too when selectedVNode is Null. |
static VisualGraph |
createSubVGraph(Graph graph,
VisualNode SelectedVnode,
VisualGraph lstExistingvNode,
Lexicon lexicon,
java.awt.Graphics g,
boolean rearrange,
java.awt.Point verticalspacing,
boolean ViewMode)
|
static VisualGraph |
createVGraph(Graph graph,
Lexicon lexicon,
java.awt.Graphics g)
Create a VisualGraph for the specified graph. |
static VisualGraph |
createVGraph2(Graph graph,
Lexicon lexicon,
java.awt.Graphics g)
Create a VisualGraph for the specified graph. |
static VisualGraph |
createVGraph2(Graph graph,
Lexicon lexicon,
java.awt.Graphics g,
boolean ViewMode)
|
java.util.ArrayList |
getEdges()
Get the VisualEdges that compose the current VisualGraph |
Graph |
getGraph()
Get the graph associated to the current VisualGraph |
boolean |
getIsBrowseView()
|
java.util.ArrayList |
getNodes()
Get the VisualNodes that compose the current VisualGraph |
int |
getScale()
|
int |
getSize()
Get the size of the graph associated to the current VisualGraph |
java.awt.Point |
getSpacing()
|
VisualEdge |
getVisualEdge(Edge edge)
Get, from the current VisualGraph, the VisualEdge that is associated to the specified edge. |
VisualNode |
getVisualNode(Node node)
Get, from the current VisualGraph, the VisualNode that is associated to the specified node. |
boolean |
isEmpty()
Check if the current Visual Graph is empty |
void |
makeEmpty()
Make the current VisualGraph empty. |
void |
moveVNodes(GraphDrawPanel cgDP,
java.awt.Rectangle rct1,
java.awt.Rectangle rct2,
Lexicon lexicon)
Move concepts that were already selected; that were contained in the tracker rectangle and update the related relations. |
void |
newVNode(java.lang.String contenu,
java.awt.Rectangle rect,
Lexicon lexicon)
Add a new VisualNode to the current VisualGraph, with an associated node that is composed by the specified contenu and with the specified rectangle. |
void |
removeEdge(VisualEdge vedge)
Remove the specified VisualEdge from the current VisualGraph |
void |
removeNode(VisualNode vnode)
Remove the specified VisualNode from the current VisualGraph |
void |
removeVNode(VisualNode vnode)
Operate on VNode and VisualGraph only; the correponding node in Graph is not touched |
void |
removeVNodes(java.awt.Rectangle tracker)
Remove from the current VisualGraph the VisualNodes that are contained in the specified tracker. |
void |
setGraph(Graph graph)
Set the specified graph to the current VisualGraph |
void |
setScale(int scale,
java.awt.Graphics g,
Lexicon lexicon)
|
void |
setSpacing(java.awt.Point spacing)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Graph graph
public java.util.ArrayList vnodes
public java.util.ArrayList vedges
public boolean isBrowseView
public static java.awt.Font fontTxtFld
Constructor Detail |
public VisualGraph()
public VisualGraph(Graph graph)
graph
- a GraphMethod Detail |
public void setSpacing(java.awt.Point spacing)
public java.awt.Point getSpacing()
public boolean isEmpty()
public Graph getGraph()
public void setGraph(Graph graph)
graph
- A Graphpublic static VisualGraph copy(Graph graph, java.util.ArrayList lstVNodes, java.util.ArrayList lstVEdges)
graph
- A Graph for the new Visual Graph to create and returnlstVNodes
- ArrayList of VisualNodelstVEdges
- ArrayList of VisualEdge
public int getSize()
public void addEdge(VisualEdge vedge)
vedge
- A VisualEdgepublic void addEdge(Edge vedge, VisualNode Source, VisualNode Target)
vedge
- A VisualEdgepublic void addNode(VisualNode vnode)
vnode
- A VisualNodepublic void setScale(int scale, java.awt.Graphics g, Lexicon lexicon)
public int getScale()
public boolean getIsBrowseView()
public void removeVNode(VisualNode vnode)
public void removeNode(VisualNode vnode)
vnode
- A VisualNodepublic void removeEdge(VisualEdge vedge)
vedge
- A VisualEdgepublic java.util.ArrayList getNodes()
public java.util.ArrayList getEdges()
public VisualNode getVisualNode(Node node)
node
- A Node
public VisualEdge getVisualEdge(Edge edge)
edge
- An Edge
public VisualNode createAddVNode(Node node, Lexicon lexicon, java.awt.Graphics g, boolean ViewMode, int c)
public static VisualGraph createVGraph2(Graph graph, Lexicon lexicon, java.awt.Graphics g)
graph
- A Graphlexicon
- The Lexisong
- Graphics
public static VisualGraph createVGraph2(Graph graph, Lexicon lexicon, java.awt.Graphics g, boolean ViewMode)
public static VisualGraph createVGraph(Graph graph, Lexicon lexicon, java.awt.Graphics g)
graph
- A Graphlexicon
- A Lexicong
- Graphics
public void makeEmpty()
public void clearVGraphOnly()
public void clear()
public void clear(GraphDrawPanel graphDrawPanel)
graphDrawPanel
- A GraphDrawPanelpublic void newVNode(java.lang.String contenu, java.awt.Rectangle rect, Lexicon lexicon) throws java.lang.Exception
contenu
- A String that represents the content of the noderect
- A Rectangle that will enclose the VisualNodelexicon
- A Lexicon
java.lang.Exception
- if a problem occurs during the operationpublic void moveVNodes(GraphDrawPanel cgDP, java.awt.Rectangle rct1, java.awt.Rectangle rct2, Lexicon lexicon)
cgDP
- A GraphDrawPanelrct1
- A Rectanglerct2
- A Rectanglelexicon
- A Lexiconpublic void removeVNodes(java.awt.Rectangle tracker)
tracker
- A Rectanglepublic static VisualGraph createSubVGraph(Graph graph, VisualNode SelectedVnode, VisualGraph lstExistingvNode, Lexicon lexicon, java.awt.Graphics g, boolean rearrange, java.awt.Point verticalspacing)
graph
- A GraphSelectedVnode
- The VisualNode we want to explore (or to expand)lstExistingvNode
- if it's null we don't keep existing VisualNodes in th Browser
else we keep them and we add the newest one's.lexicon
- The Lexisong
- Graphics
public static VisualGraph createSubVGraph(Graph graph, VisualNode SelectedVnode, VisualGraph lstExistingvNode, Lexicon lexicon, java.awt.Graphics g, boolean rearrange, java.awt.Point verticalspacing, boolean ViewMode)
public static VisualGraph createSubVGraph(Graph graph, VisualNode SelectedVnode, VisualGraph lstExistingvNode, Lexicon lexicon, java.awt.Graphics g, boolean rearrange)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |