anl.aida.bubble
Class BubblePlot

java.lang.Object
  extended by anl.aida.bubble.BubblePlot

public class BubblePlot
extends java.lang.Object


Nested Class Summary
private static interface BubblePlot.Updater
           
 
Field Summary
private  BubblePlot.Updater animateUpdate
           
private  DefaultBubbleRenderer bubbles
           
private  edu.umd.cs.piccolo.PCanvas canvas
           
private  int[] catIndices
           
private  BubbleDataset data
           
private  edu.umd.cs.piccolo.nodes.PText dateNode
           
private  AbstractDomainAxis dAxis
           
private  boolean ignoreMouseOver
           
private  boolean initialized
           
private  java.util.List<BubbleSelectionListener> listeners
           
private  BubblePlot.Updater offsetUpdate
           
private  edu.umd.cs.piccolo.PNode plot
           
private  RangeAxis rAxis
           
private  int timestep
           
private  NumericRange zRange
           
 
Constructor Summary
BubblePlot(edu.umd.cs.piccolo.PCanvas canvas, BubbleDataset dataset)
           
 
Method Summary
 void addSelectionListener(BubbleSelectionListener listener)
          Adds the specified listener to listen for bubble selection events.
(package private)  edu.umd.cs.piccolo.PCanvas getCanvas()
           
 AbstractDomainAxis getDomainAxis()
          Gets the domain axis.
(package private)  edu.umd.cs.piccolo.PNode getPlot()
           
 RangeAxis getRangeAxis()
           
private  void init()
           
 boolean isIgnoreMouseOver()
          Gets whether or not mouse over events on bubbles should be ignored.
private  void layout()
           
private  void removeChild(edu.umd.cs.piccolo.PNode node)
           
 void resetBounds()
          Reset the bounds of the plot to its original extent.
 void selectBubble(int categoryIndex, boolean selected)
          Selects or unselects the bubble with the specified category index.
 void setDomainAxis(AbstractDomainAxis axis)
          Sets the domain axis.
 void setIgnoreMouseOver(boolean ignoreMouseOver)
          Sets whether or not mouse over events on bubbles should be ignored.
 void setRangeAxis(RangeAxis axis)
           
private  void updateBubbles(BubblePlot.Updater updater)
           
private  void updateDateNode(java.lang.String text)
           
 void updateTimeStep(int timestep, boolean animate)
           
 void zoom(java.awt.geom.Rectangle2D bounds)
          Zoom to the specified bounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canvas

private edu.umd.cs.piccolo.PCanvas canvas

rAxis

private RangeAxis rAxis

dAxis

private AbstractDomainAxis dAxis

plot

private edu.umd.cs.piccolo.PNode plot

bubbles

private DefaultBubbleRenderer bubbles

data

private BubbleDataset data

timestep

private int timestep

catIndices

private int[] catIndices

zRange

private NumericRange zRange

dateNode

private edu.umd.cs.piccolo.nodes.PText dateNode

ignoreMouseOver

private boolean ignoreMouseOver

initialized

private boolean initialized

listeners

private java.util.List<BubbleSelectionListener> listeners

animateUpdate

private BubblePlot.Updater animateUpdate

offsetUpdate

private BubblePlot.Updater offsetUpdate
Constructor Detail

BubblePlot

public BubblePlot(edu.umd.cs.piccolo.PCanvas canvas,
                  BubbleDataset dataset)
Method Detail

init

private void init()

getCanvas

edu.umd.cs.piccolo.PCanvas getCanvas()

getPlot

edu.umd.cs.piccolo.PNode getPlot()

isIgnoreMouseOver

public boolean isIgnoreMouseOver()
Gets whether or not mouse over events on bubbles should be ignored.

Returns:
whether or not mouse over events on bubbles should be ignored.

setIgnoreMouseOver

public void setIgnoreMouseOver(boolean ignoreMouseOver)
Sets whether or not mouse over events on bubbles should be ignored.

Parameters:
ignoreMouseOver - the new value

addSelectionListener

public void addSelectionListener(BubbleSelectionListener listener)
Adds the specified listener to listen for bubble selection events.

Parameters:
listener - the listener to add

selectBubble

public void selectBubble(int categoryIndex,
                         boolean selected)
Selects or unselects the bubble with the specified category index.

Parameters:
categoryIndex - in the index of the bubble
selected - whether or not the bubble is selected or unselected.

updateTimeStep

public void updateTimeStep(int timestep,
                           boolean animate)

updateDateNode

private void updateDateNode(java.lang.String text)

updateBubbles

private void updateBubbles(BubblePlot.Updater updater)

getRangeAxis

public RangeAxis getRangeAxis()
Returns:
the rAxis

setRangeAxis

public void setRangeAxis(RangeAxis axis)
Parameters:
axis - the rAxis to set

getDomainAxis

public AbstractDomainAxis getDomainAxis()
Gets the domain axis.

Returns:
the dAxis

setDomainAxis

public void setDomainAxis(AbstractDomainAxis axis)
Sets the domain axis.

Parameters:
axis - the dAxis to set

removeChild

private void removeChild(edu.umd.cs.piccolo.PNode node)

zoom

public void zoom(java.awt.geom.Rectangle2D bounds)
Zoom to the specified bounds. The bounds are in camera coordinates.

Parameters:
bounds - the bounds to zoom to

resetBounds

public void resetBounds()
Reset the bounds of the plot to its original extent.


layout

private void layout()