org.gwoptics.graphics.graph2D.traces
Class Blank2DTrace

java.lang.Object
  extended by org.gwoptics.graphics.graph2D.traces.Blank2DTrace
All Implemented Interfaces:
IGraph2DTrace, IRenderable

public abstract class Blank2DTrace
extends java.lang.Object
implements IGraph2DTrace


Constructor Summary
Blank2DTrace()
           
 
Method Summary
 void draw()
           
 void generate()
          This is called everytime the equation callback object is changed.
 void onAddTrace(java.lang.Object[] traces)
           Before the trace is added to the graph control this method is called.
 void onRemoveTrace()
           Before the trace is officially removed from the trace list of a Graph2D object, the onRemove method is called.
 void setGraph(IGraph2D grp)
          Sets an internal variable to store a reference to the graph object the trace is being plotted on
 void setParent(processing.core.PApplet parent)
           
 void setPosition(int x, int y)
          alters the initial position of the trace on the graph
abstract  void TraceDraw(processing.core.PGraphics backBuffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Blank2DTrace

public Blank2DTrace()
Method Detail

generate

public void generate()
Description copied from interface: IGraph2DTrace
This is called everytime the equation callback object is changed.

Specified by:
generate in interface IGraph2DTrace

onAddTrace

public void onAddTrace(java.lang.Object[] traces)
Description copied from interface: IGraph2DTrace

Before the trace is added to the graph control this method is called. It allows a trace to check the settings of other traces that have previously been added for in Compatibilities. Leave method empty in implementation if no checks are necessary.

w onAddTrace is called from with a synchronised lock so the traces object won't be modified whilst reading it. Therefore it is not necessary to provide custom thread locks.

Specified by:
onAddTrace in interface IGraph2DTrace

onRemoveTrace

public void onRemoveTrace()
Description copied from interface: IGraph2DTrace

Before the trace is officially removed from the trace list of a Graph2D object, the onRemove method is called. This allows the trace object to provide any cleanup needed, if at all needed. Leave blank if nothing is needed.

Specified by:
onRemoveTrace in interface IGraph2DTrace

setPosition

public void setPosition(int x,
                        int y)
Description copied from interface: IGraph2DTrace
alters the initial position of the trace on the graph

Specified by:
setPosition in interface IGraph2DTrace

setParent

public void setParent(processing.core.PApplet parent)
Specified by:
setParent in interface IRenderable

setGraph

public void setGraph(IGraph2D grp)
Description copied from interface: IGraph2DTrace
Sets an internal variable to store a reference to the graph object the trace is being plotted on

Specified by:
setGraph in interface IGraph2DTrace

draw

public void draw()
Specified by:
draw in interface IRenderable

TraceDraw

public abstract void TraceDraw(processing.core.PGraphics backBuffer)


processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards