| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpedviz.view.GraphView
public class GraphView
This class is the super class for components that visualize a graph. A single Graph can be viewed in multiple ways whitout a lot of changes.
| Constructor Summary | |
|---|---|
GraphView()
Creates a new empty Graphview.  | 
|
GraphView(LayoutedGraph graph)
Creates a new Graphview for the given LayoutedGraph object.  | 
|
| Method Summary | |
|---|---|
 boolean | 
addNodeListener(NodeListener nodeListener)
Registers the NodeListener object.  | 
 void | 
addRule(Rule filter)
Adds a new Rule.  | 
 void | 
centerGraph()
Centers the graph and fits the size on.  | 
 void | 
deselect()
Deselects all nodes that are currently selected.  | 
 void | 
deselect(Node node)
Deselects the given node if it's selected.  | 
 void | 
exportJPEG(java.lang.String filename,
           float scale,
           boolean grayscale)
Exports the GraphView as a jpeg-file.  | 
 void | 
fireNodeEvent(NodeEvent event)
Fires a NodeEvent to all listeners.  | 
 float | 
getAlpha()
Returns the alpha value of hidden nodes.  | 
 java.awt.Color | 
getBackgroundColor()
Returns the background color of this component.  | 
 java.awt.Component | 
getComponent()
Returns the SWING/AWT component used by this instance.  | 
 Effect | 
getEffect()
Returns the Effect object used by this instance.  | 
 LayoutedGraph | 
getGraph()
Returns the LayoutedGraph of which this is a view.  | 
 java.util.Vector<Rule> | 
getRules()
Returns a vector of all rules.  | 
 double | 
getScale()
Returns the current scale factor.  | 
 java.util.ArrayList<Node> | 
getSelection()
Returns all nodes that are currently selected.  | 
 int | 
getSelectionCount()
Returns the number of nodes that are currently selected.  | 
 double | 
getTranslateX()
Returns the current x-translation.  | 
 double | 
getTranslateY()
Returns the current y-translation.  | 
 void | 
hide(Node node)
Hides the given node if it's shown.  | 
 void | 
hideAll()
Hides all nodes that are currently shown.  | 
 void | 
highlight(java.util.Collection<Node> nodes)
Highlights a collection of nodes.  | 
 void | 
highlight(Node node)
Highlights the given node.  | 
 boolean | 
isEdgeVisible()
Returns true if edges are visible.  | 
 boolean | 
isMovingEnabled()
Returns true if moving is enabled.  | 
 boolean | 
isMultiselection()
Returns true if multiselection is enabled.  | 
 boolean | 
isSelected(Node node)
Returns true if the given node is selected.  | 
 boolean | 
isSelectionEnabled()
Returns true if selection is enabled.  | 
 boolean | 
isZoomEnabled()
Returns true if zooming is enabled.  | 
 boolean | 
removeNodeListener(NodeListener nodeListener)
Removes the NodeListener object.  | 
 void | 
removeRule(Rule filter)
Remove the given rule.  | 
 void | 
select(java.util.ArrayList<Node> Nodes)
Selects a collection of nodes.  | 
 void | 
select(Node node)
Selects a single node.  | 
 void | 
setAlpha(float alpha)
To down grade nodes of less interest their alpha value can be lowered.  | 
 void | 
setBackgroundColor(java.awt.Color backgroundColor)
Sets the background color of this component.  | 
 void | 
setCursor(int cursor)
Sets the cursor of the component.  | 
 void | 
setEdgeVisible(boolean flag)
Displays or hides the edges.  | 
 void | 
setEffect(Effect effect)
Sets the given effect.  | 
 void | 
setGraph(LayoutedGraph graph)
Sets the LayoutedGraph for this view..  | 
 void | 
setMovingEnabled(boolean movingEnabled)
Enables or disables moving.  | 
 void | 
setMultiselection(boolean multiSelection)
Enables or disables multiselection.  | 
 void | 
setRules(java.util.Vector<Rule> rules)
Sets a collection of rules.  | 
 void | 
setScale(double scale)
Sets the scale factor.  | 
 void | 
setSelectionEnabled(boolean enabled)
Enables or disables selection.  | 
 void | 
setTranslate(double translateX,
             double translateY)
Sets the x-translation and the y-translation.  | 
 void | 
setTranslateX(double translateX)
Sets the x-translation.  | 
 void | 
setTranslateY(double translateY)
Sets the y-translation.  | 
 void | 
setZoomEnabled(boolean zoomEnabled)
Enables or disables zooming.  | 
 void | 
show(Node node)
Shows the given node if it's hidden.  | 
 void | 
showAll()
Shows all nodes that are currently hidden.  | 
 void | 
unHighlightAll()
Clears accentuation for all nodes.  | 
 void | 
updateGraphModel()
After you change the LayoutedGraph object manually run this method.  | 
 void | 
updateGraphView()
Fires an update of the GraphView manually.  | 
 void | 
updateNodes(java.util.Set<Node> nodes)
Redraws the given nodes.  | 
 void | 
updateRules()
Reapplies all rules.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GraphView()
public GraphView(LayoutedGraph graph)
| Method Detail | 
|---|
public void setGraph(LayoutedGraph graph)
graph - Graph objectpublic LayoutedGraph getGraph()
public void deselect(Node node)
node - nodepublic void select(Node node)
node - nodepublic void select(java.util.ArrayList<Node> Nodes)
Nodes - public boolean isSelected(Node node)
node - 
public void deselect()
public java.util.ArrayList<Node> getSelection()
public int getSelectionCount()
public void setSelectionEnabled(boolean enabled)
enabled - public boolean isMultiselection()
public void setMultiselection(boolean multiSelection)
multiSelection - public boolean isSelectionEnabled()
public void show(Node node)
node - nodepublic void showAll()
public void hideAll()
public void hide(Node node)
node - nodepublic void unHighlightAll()
public void highlight(Node node)
node - nodepublic void highlight(java.util.Collection<Node> nodes)
nodes - list of nodespublic void centerGraph()
public void updateGraphView()
public void updateGraphModel()
public boolean isEdgeVisible()
public void setEdgeVisible(boolean flag)
flag - 
public void exportJPEG(java.lang.String filename,
                       float scale,
                       boolean grayscale)
filename - filenamescale - scale factorpublic java.awt.Component getComponent()
public void addRule(Rule filter)
filter - public void removeRule(Rule filter)
filter - public java.util.Vector<Rule> getRules()
public void setBackgroundColor(java.awt.Color backgroundColor)
background - color of this component backgound colorpublic java.awt.Color getBackgroundColor()
public void setScale(double scale)
scale - scale factorpublic double getScale()
public void setTranslateX(double translateX)
translateX - x-translationpublic void setTranslateY(double translateY)
translateY - y-translation
public void setTranslate(double translateX,
                         double translateY)
translateX - x-translationtranslateY - y-translationpublic double getTranslateX()
public double getTranslateY()
public float getAlpha()
public void setAlpha(float alpha)
alpha - alpha value.public Effect getEffect()
public void setEffect(Effect effect)
effect - public boolean isMovingEnabled()
public void setMovingEnabled(boolean movingEnabled)
movingEnabled - public boolean isZoomEnabled()
public void setZoomEnabled(boolean zoomEnabled)
zoomEnabled - public void setRules(java.util.Vector<Rule> rules)
rules - a collection of rules.public void updateRules()
public void updateNodes(java.util.Set<Node> nodes)
nodes - nodes that should be repainted.public void setCursor(int cursor)
cursor - the cursor of the component.public boolean removeNodeListener(NodeListener nodeListener)
public boolean addNodeListener(NodeListener nodeListener)
nodeListener - the NodeListener object.public void fireNodeEvent(NodeEvent event)
event - 
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||