edu.ksu.cis.bnj.gui.components
Class VariablePainter

java.lang.Object
  extended bysalvo.jesus.graph.visual.drawing.VisualVertexPainterImpl
      extended byedu.ksu.cis.bnj.gui.components.VariablePainter
All Implemented Interfaces:
salvo.jesus.graph.visual.drawing.Painter, java.io.Serializable, salvo.jesus.graph.visual.drawing.VisualVertexPainter
Direct Known Subclasses:
ChanceVariablePainter, DecisionVariablePainter, UtilityVariablePainter

public abstract class VariablePainter
extends salvo.jesus.graph.visual.drawing.VisualVertexPainterImpl

Custom Vertex Painter

Author:
Roby Joehanes
See Also:
Serialized Form

Field Summary
protected  java.awt.Color backgroundColor
           
protected  java.awt.BasicStroke fatStroke
           
protected  java.awt.Font font
           
protected  java.awt.Color fontColor
           
protected  java.awt.Color highlightOutlineColor
           
protected  double leftRightMargin
           
protected  java.awt.Color normalOutlineColor
           
protected  java.awt.BasicStroke origStroke
           
protected  java.awt.Color outlineColor
           
protected  double topBottomMargin
           
 
Constructor Summary
VariablePainter()
          Constructor for VertexPainter.
 
Method Summary
 void paint(salvo.jesus.graph.visual.VisualVertex vVertex, java.awt.Graphics2D g2d, java.awt.Shape shape)
           
 void paintText(salvo.jesus.graph.visual.VisualGraphComponent component, java.awt.Graphics2D g2d)
          Paints the text of the VisualVertex.
 void rescale(salvo.jesus.graph.visual.VisualVertex vv)
          Rescales the VisualVertex.
 void setColorToHighlight()
           
 void setColorToNormal()
           
 void setOutlineColor(java.awt.Color c)
           
 
Methods inherited from class salvo.jesus.graph.visual.drawing.VisualVertexPainterImpl
paint, paintFill, paintOutline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

font

protected java.awt.Font font

backgroundColor

protected java.awt.Color backgroundColor

normalOutlineColor

protected java.awt.Color normalOutlineColor

highlightOutlineColor

protected java.awt.Color highlightOutlineColor

fontColor

protected java.awt.Color fontColor

outlineColor

protected java.awt.Color outlineColor

origStroke

protected transient java.awt.BasicStroke origStroke

fatStroke

protected transient java.awt.BasicStroke fatStroke

topBottomMargin

protected double topBottomMargin

leftRightMargin

protected double leftRightMargin
Constructor Detail

VariablePainter

public VariablePainter()
Constructor for VertexPainter.

Method Detail

paint

public void paint(salvo.jesus.graph.visual.VisualVertex vVertex,
                  java.awt.Graphics2D g2d,
                  java.awt.Shape shape)
See Also:
Painter.paint(salvo.jesus.graph.visual.VisualGraphComponent, java.awt.Graphics2D)

paintText

public void paintText(salvo.jesus.graph.visual.VisualGraphComponent component,
                      java.awt.Graphics2D g2d)
Paints the text of the VisualVertex. This is borrowed from VisualVertexPainterImpl.java. It's because we can't set the margin.


setColorToHighlight

public void setColorToHighlight()

setColorToNormal

public void setColorToNormal()

setOutlineColor

public void setOutlineColor(java.awt.Color c)

rescale

public void rescale(salvo.jesus.graph.visual.VisualVertex vv)
Rescales the VisualVertex. It determines the height of the text to be painted and adjusts the size of the GeneralPath so that the entire text fits in the VisualVertex. This is borrowed from VisualVertexPainterImpl.java. It's because we can't set the margin.