net.clackrouter.router.graph
Class DynamicClackView

java.lang.Object
  extended by VertexView
      extended by net.clackrouter.router.graph.DynamicClackView
All Implemented Interfaces:
ClackPaintable
Direct Known Subclasses:
CounterView, QueueView

public abstract class DynamicClackView
extends VertexView
implements ClackPaintable

Abstract base class that should be extended in order to create a dynamic Clack component.

Subclasses must define a static class extending JGraph's VertexRenderer, that implements the paint(Graphics g) method to draw the component.

See QueueView for an example.


Field Summary
protected  java.awt.Color mBorderColor
           
protected  java.awt.Color mFillColor
           
protected  java.awt.Font mFont
           
protected  int mFontSize
           
protected  java.lang.String mName
           
protected  java.awt.BasicStroke mStroke
           
static CellViewRenderer renderer
           
static int sBORDER
           
 
Constructor Summary
DynamicClackView(java.lang.Object cell, JGraph graph, CellMapper cm, int width, int height)
           
 
Method Summary
 void clackPaint()
           
 ClackView getClackView()
           
 CellViewRenderer getRenderer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderer

public static CellViewRenderer renderer

sBORDER

public static int sBORDER

mBorderColor

protected java.awt.Color mBorderColor

mFillColor

protected java.awt.Color mFillColor

mFont

protected java.awt.Font mFont

mFontSize

protected int mFontSize

mName

protected java.lang.String mName

mStroke

protected java.awt.BasicStroke mStroke
Constructor Detail

DynamicClackView

public DynamicClackView(java.lang.Object cell,
                        JGraph graph,
                        CellMapper cm,
                        int width,
                        int height)
Method Detail

getClackView

public ClackView getClackView()
Specified by:
getClackView in interface ClackPaintable

clackPaint

public void clackPaint()
Specified by:
clackPaint in interface ClackPaintable

getRenderer

public CellViewRenderer getRenderer()