uchicago.src.sim.gui
Class RectItem

java.lang.Object
  extended by uchicago.src.sim.gui.DrawableItem
      extended by uchicago.src.sim.gui.RectItem
All Implemented Interfaces:
NonGridDrawable
Direct Known Subclasses:
RectNetworkItem, RectNode

public abstract class RectItem
extends DrawableItem

A rectangular shaped DrawableItem.

Version:
$Revision: 1.8 $ $Date: 2004/11/03 19:50:59 $
Author:
Nick Collier
See Also:
DrawableItem

Field Summary
protected  boolean recalcBorder
           
 
Fields inherited from class uchicago.src.sim.gui.DrawableItem
allowResizing, borderColor, borderWidth, color, font, height, hollow, label, labelColor, recalc, stroke, width
 
Constructor Summary
RectItem()
           
 
Method Summary
 void calcSize(SimGraphics g)
          Calculates the true size of this object including the border width.
 boolean contains(java.awt.Point p)
          Does this RectItem contain Point p?
 void draw(SimGraphics g)
          Draws this item using the specified context.
 
Methods inherited from class uchicago.src.sim.gui.DrawableItem
allowResizing, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getWidth, isHollow, setBorderColor, setBorderWidth, setColor, setFont, setHeight, setHollow, setLabel, setLabelColor, setSize, setSize, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uchicago.src.sim.gui.NonGridDrawable
getX, getY
 

Field Detail

recalcBorder

protected boolean recalcBorder
Constructor Detail

RectItem

public RectItem()
Method Detail

calcSize

public void calcSize(SimGraphics g)
Calculates the true size of this object including the border width.

Overrides:
calcSize in class DrawableItem

draw

public void draw(SimGraphics g)
Draws this item using the specified context.


contains

public boolean contains(java.awt.Point p)
Does this RectItem contain Point p?

Parameters:
p - the point to test for
Returns:
true if this does contain p, false otherwise