jdraw.graphicalobjects
Class SizedGraphicalObject

java.lang.Object
  |
  +--jdraw.graphicalobjects.GraphicalObject
        |
        +--jdraw.graphicalobjects.SizedGraphicalObject
Direct Known Subclasses:
Ellipse, Rectangle, Segment

public abstract class SizedGraphicalObject
extends GraphicalObject

A graphical object with width and height.


Field Summary
private  int iHeight
          The height of this graphical object.
private  int iWidth
          The width of this graphical object.
 
Fields inherited from class jdraw.graphicalobjects.GraphicalObject
bDragInProgress, colColor, iX, iY, lstPropertyChangeListeners, ptDragAndDropStartPosition, ptInitialObjectPosition, rectInitialBoundingBox
 
Constructor Summary
SizedGraphicalObject(int iX, int iY, Color colColor, int iWidth, int iHeight)
          Creates a new SizedGraphicalObject with specified position, color, width and height.
 
Method Summary
 Rectangle getBoundingBox()
          Returns the bounding box of this graphical object.
 int getHeight()
          Returns the height of this sized graphical object.
 GraphicalObjectProperties getPropertyDialog(Frame frmOwner)
          Returns a dialog box used to set the properties of this graphical object.
 int getWidth()
          Returns the width of this sized graphical object.
 void setHeight(int iNewHeight)
          Sets the height of this sized graphical object.
 void setWidth(int iNewWidth)
          Sets the width of this sized graphical object.
 
Methods inherited from class jdraw.graphicalobjects.GraphicalObject
addPropertyChangeListener, commitDragAndDrop, drag, fireBoudingBoxChange, getColor, getCursor, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getFriendlyName, getX, getY, isDragInProgress, moveTo_silent, moveTo, openPropertyDialog, paint, prepareBoudingBoxEvent, removePropertyChangeListener, rollbackDragAndDrop, setColor_silent, setColor, setX_silent, setX, setY_silent, setY, startDragAndDrop, suspendDragAndDrop, updateCachedData
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

iWidth

private int iWidth
The width of this graphical object.

iHeight

private int iHeight
The height of this graphical object.
Constructor Detail

SizedGraphicalObject

public SizedGraphicalObject(int iX,
                            int iY,
                            Color colColor,
                            int iWidth,
                            int iHeight)
Creates a new SizedGraphicalObject with specified position, color, width and height.
Method Detail

getBoundingBox

public Rectangle getBoundingBox()
Returns the bounding box of this graphical object.
Overrides:
getBoundingBox in class GraphicalObject

getPropertyDialog

public GraphicalObjectProperties getPropertyDialog(Frame frmOwner)
Returns a dialog box used to set the properties of this graphical object. This dialog box is packed and ready to be set visible.
Overrides:
getPropertyDialog in class GraphicalObject

getWidth

public int getWidth()
Returns the width of this sized graphical object.

setWidth

public void setWidth(int iNewWidth)
Sets the width of this sized graphical object.

getHeight

public int getHeight()
Returns the height of this sized graphical object.

setHeight

public void setHeight(int iNewHeight)
Sets the height of this sized graphical object.