anl.aida.viz
Class NetworkDisplay

java.lang.Object
  extended by anl.aida.viz.NetworkDisplay
All Implemented Interfaces:
GraphSwapable, AIDA2DLayer

public class NetworkDisplay
extends java.lang.Object
implements AIDA2DLayer, GraphSwapable

Date: Feb 11, 2009 11:43:03 AM


Nested Class Summary
private  class NetworkDisplay.BoundsNodeEdgeFilter
           
 
Field Summary
protected  Canvas2D canvas
           
private  edu.umd.cs.piccolo.PLayer edgeLayer
           
static java.lang.String EDGES
           
protected  ItemSelectionHandler edgeSelectionHandler
           
private  EdgeStyler edgeStyler
           
private  ConceptGraph<TermNode> graph
           
private  java.util.List<edu.umd.cs.piccolo.nodes.PPath> hiddenNodes
           
private  boolean hideEmptyNodes
           
private  boolean labelsVisible
           
private  Layout2D<TermNode> layout
           
private  edu.umd.cs.piccolo.PLayer nodeLayer
           
private  java.awt.Paint nodePaint
           
static java.lang.String NODES
           
protected  ItemSelectionHandler nodeSelectionHandler
           
private static java.lang.String OBJ
           
protected  SelectionManager<DocumentContainer> selection
           
private  NodeStyler styler
           
 
Constructor Summary
NetworkDisplay(ConceptGraph<TermNode> graph, Layout2D<TermNode> layout)
           
 
Method Summary
private  void addSelectionsToCanvas()
           
 void addToCanvas(Canvas2D canvas)
           
private  void create()
           
private  void doLabelsVisible(boolean visible)
           
static java.lang.Object getObject(edu.umd.cs.piccolo.PNode node)
           
private  void hideEmptyNodes(boolean hide)
           
 void initialize()
           
 void initToolBar(javax.swing.JToolBar bar, javax.swing.ButtonGroup grp)
           
 boolean isLabelsVisible()
           
 void lensOver(edu.umd.cs.piccolo.util.PBounds bounds, double radius, Canvas2D canvas)
           
 void marqueeOver(edu.umd.cs.piccolo.util.PBounds bounds, boolean ctrlDown)
           
 void nodeSelected(edu.umd.cs.piccolo.PNode node, boolean ctrlDown)
          Called when an individual node has been selected.
 void reset()
           
 void resized(java.awt.Dimension size)
           
 void selectionEnabled(boolean enabled)
          Called when selection mode is enabled or disabled.
 void setLabelsVisible(boolean visible)
           
 void swapGraph(ConceptGraph<TermNode> graph, anl.aida.util.DateRange range)
          Swaps the current graph for the specified graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJ

private static final java.lang.String OBJ
See Also:
Constant Field Values

EDGES

public static final java.lang.String EDGES
See Also:
Constant Field Values

NODES

public static final java.lang.String NODES
See Also:
Constant Field Values

layout

private Layout2D<TermNode> layout

graph

private ConceptGraph<TermNode> graph

nodeLayer

private edu.umd.cs.piccolo.PLayer nodeLayer

edgeLayer

private edu.umd.cs.piccolo.PLayer edgeLayer

nodePaint

private java.awt.Paint nodePaint

hideEmptyNodes

private boolean hideEmptyNodes

selection

protected SelectionManager<DocumentContainer> selection

nodeSelectionHandler

protected ItemSelectionHandler nodeSelectionHandler

edgeSelectionHandler

protected ItemSelectionHandler edgeSelectionHandler

canvas

protected Canvas2D canvas

styler

private NodeStyler styler

edgeStyler

private EdgeStyler edgeStyler

hiddenNodes

private java.util.List<edu.umd.cs.piccolo.nodes.PPath> hiddenNodes

labelsVisible

private boolean labelsVisible
Constructor Detail

NetworkDisplay

public NetworkDisplay(ConceptGraph<TermNode> graph,
                      Layout2D<TermNode> layout)
Method Detail

getObject

public static java.lang.Object getObject(edu.umd.cs.piccolo.PNode node)

initialize

public void initialize()

create

private void create()

reset

public void reset()

swapGraph

public void swapGraph(ConceptGraph<TermNode> graph,
                      anl.aida.util.DateRange range)
Description copied from interface: GraphSwapable
Swaps the current graph for the specified graph.

Specified by:
swapGraph in interface GraphSwapable
Parameters:
graph - the new graph
range - the date range the graph represents

doLabelsVisible

private void doLabelsVisible(boolean visible)

setLabelsVisible

public void setLabelsVisible(boolean visible)

isLabelsVisible

public boolean isLabelsVisible()

lensOver

public void lensOver(edu.umd.cs.piccolo.util.PBounds bounds,
                     double radius,
                     Canvas2D canvas)
Specified by:
lensOver in interface AIDA2DLayer

selectionEnabled

public void selectionEnabled(boolean enabled)
Called when selection mode is enabled or disabled.

Specified by:
selectionEnabled in interface AIDA2DLayer
Parameters:
enabled - state of selection mode.

nodeSelected

public void nodeSelected(edu.umd.cs.piccolo.PNode node,
                         boolean ctrlDown)
Called when an individual node has been selected.

Specified by:
nodeSelected in interface AIDA2DLayer
Parameters:
node - the selected node
ctrlDown - whether or not the the ctrl key was down when the node was selected

marqueeOver

public void marqueeOver(edu.umd.cs.piccolo.util.PBounds bounds,
                        boolean ctrlDown)
Specified by:
marqueeOver in interface AIDA2DLayer

addSelectionsToCanvas

private void addSelectionsToCanvas()

addToCanvas

public void addToCanvas(Canvas2D canvas)
Specified by:
addToCanvas in interface AIDA2DLayer

initToolBar

public void initToolBar(javax.swing.JToolBar bar,
                        javax.swing.ButtonGroup grp)
Specified by:
initToolBar in interface AIDA2DLayer

hideEmptyNodes

private void hideEmptyNodes(boolean hide)

resized

public void resized(java.awt.Dimension size)
Specified by:
resized in interface AIDA2DLayer