com.pnp.xfeature.figures
Class FeatureNodeFigure

java.lang.Object
  extended by Figure
      extended by com.pnp.xfeature.figures.FeatureNodeFigure

public class FeatureNodeFigure
extends Figure

This class is responsible for drawing the node onto the canvas

Author:
Kamil Ekstein, created on 24.9.2004; updated by Ondrej Rohlik in April 2005

Field Summary
static Color classColor
           
 
Constructor Summary
FeatureNodeFigure(FeatureNodeModel model)
          creates the figure and sets its visual properties as read from he model
 
Method Summary
 void drawRectangle(Graphics g, Rectangle r)
          draws a rectangle aroud feature node, replaces Graphics#drawRectangle
 void finalize()
          disposes all color and font objects, then calls superclass implementation
 void paintFigure(Graphics graphics)
          Paints the figure in three steps.
 void updateToolTip()
          Updates the tooltip text displayed when the mouse is over the figure - the text is read from node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classColor

public static Color classColor
Constructor Detail

FeatureNodeFigure

public FeatureNodeFigure(FeatureNodeModel model)
creates the figure and sets its visual properties as read from he model

Method Detail

finalize

public void finalize()
              throws java.lang.Throwable
disposes all color and font objects, then calls superclass implementation

Throws:
java.lang.Throwable

drawRectangle

public void drawRectangle(Graphics g,
                          Rectangle r)
draws a rectangle aroud feature node, replaces Graphics#drawRectangle


paintFigure

public void paintFigure(Graphics graphics)
Paints the figure in three steps.
  1. sets texts, colors, and fonts
  2. computes where to leave space for cardinality
  3. draws rectangle or oval
  4. fills the shape with the text

See Also:
org.eclipse.draw2d.IFigure#paintFigure(org.eclipse.draw2d.Graphics)

updateToolTip

public void updateToolTip()
Updates the tooltip text displayed when the mouse is over the figure - the text is read from node



Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.