CH.ifa.draw.figures
Class RectangleFigure

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractFigure
      extended by CH.ifa.draw.figures.AttributeFigure
          extended by CH.ifa.draw.figures.RectangleFigure
All Implemented Interfaces:
Figure, Storable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DiamondFigure, TriangleFigure

public class RectangleFigure
extends AttributeFigure

A rectangle figure.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Constructor Summary
RectangleFigure()
           
RectangleFigure(java.awt.Point origin, java.awt.Point corner)
           
 
Method Summary
 void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
          Sets the display box of a figure.
protected  void basicMoveBy(int x, int y)
          Moves the figure.
 java.awt.Rectangle displayBox()
          Gets the display box of a figure.
 void drawBackground(java.awt.Graphics g)
          Draws the background of the figure.
 void drawFrame(java.awt.Graphics g)
          Draws the frame of the figure.
 java.util.Vector handles()
          Returns the handles of a Figure that can be used to manipulate some of its attributes.
 void read(StorableInput dr)
          Reads the Figure from a StorableInput.
 void write(StorableOutput dw)
          Stores the Figure to a StorableOutput.
 
Methods inherited from class CH.ifa.draw.figures.AttributeFigure
draw, getAttribute, getDefaultAttribute, getFillColor, getFrameColor, setAttribute
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, size, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleFigure

public RectangleFigure()

RectangleFigure

public RectangleFigure(java.awt.Point origin,
                       java.awt.Point corner)
Method Detail

basicDisplayBox

public void basicDisplayBox(java.awt.Point origin,
                            java.awt.Point corner)
Description copied from class: AbstractFigure
Sets the display box of a figure. This is the method that subclassers override. Clients usually call displayBox.

Specified by:
basicDisplayBox in interface Figure
Specified by:
basicDisplayBox in class AbstractFigure
Parameters:
origin - the new origin
corner - the new corner
See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)

handles

public java.util.Vector handles()
Description copied from class: AbstractFigure
Returns the handles of a Figure that can be used to manipulate some of its attributes.

Specified by:
handles in interface Figure
Specified by:
handles in class AbstractFigure
Returns:
a Vector of handles
See Also:
Handle

displayBox

public java.awt.Rectangle displayBox()
Description copied from class: AbstractFigure
Gets the display box of a figure.

Specified by:
displayBox in interface Figure
Specified by:
displayBox in class AbstractFigure
See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)

basicMoveBy

protected void basicMoveBy(int x,
                           int y)
Description copied from class: AbstractFigure
Moves the figure. This is the method that subclassers override. Clients usually call displayBox.

Specified by:
basicMoveBy in class AbstractFigure
See Also:
AbstractFigure.moveBy(int, int)

drawBackground

public void drawBackground(java.awt.Graphics g)
Description copied from class: AttributeFigure
Draws the background of the figure.

Overrides:
drawBackground in class AttributeFigure
See Also:
AttributeFigure.draw(java.awt.Graphics)

drawFrame

public void drawFrame(java.awt.Graphics g)
Description copied from class: AttributeFigure
Draws the frame of the figure.

Overrides:
drawFrame in class AttributeFigure
See Also:
AttributeFigure.draw(java.awt.Graphics)

write

public void write(StorableOutput dw)
Description copied from class: AttributeFigure
Stores the Figure to a StorableOutput.

Specified by:
write in interface Storable
Overrides:
write in class AttributeFigure

read

public void read(StorableInput dr)
          throws java.io.IOException
Description copied from class: AttributeFigure
Reads the Figure from a StorableInput.

Specified by:
read in interface Storable
Overrides:
read in class AttributeFigure
Throws:
java.io.IOException