JHotDraw 6.0b1

org.jhotdraw.figures
Class RoundRectangleFigure

java.lang.Object
  extended by org.jhotdraw.standard.AbstractFigure
      extended by org.jhotdraw.figures.AttributeFigure
          extended by org.jhotdraw.figures.RoundRectangleFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Figure, Storable
Direct Known Subclasses:
RoundRectangleGeometricAdapter

public class RoundRectangleFigure
extends AttributeFigure

A round rectangle figure.

See Also:
RadiusHandle, Serialized Form

Constructor Summary
RoundRectangleFigure()
           
RoundRectangleFigure(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.Insets connectionInsets()
          Returns the connection inset.
 Connector connectorAt(int x, int y)
          Returns the Figures connector for the specified location.
 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.awt.Point getArc()
          Gets the arc's width and height.
 HandleEnumeration 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 setArc(int width, int height)
          Sets the arc's witdh and height.
 void write(StorableOutput dw)
          Stores the Figure to a StorableOutput.
 
Methods inherited from class org.jhotdraw.figures.AttributeFigure
draw, getAttribute, getAttribute, getDefaultAttribute, getDefaultAttribute, getFillColor, getFrameColor, initDefaultAttribute, setAttribute, setAttribute, setDefaultAttribute
 
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addDependendFigure, addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, includes, invalidate, invalidateRectangle, isEmpty, listener, moveBy, release, removeDependendFigure, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRectangleFigure

public RoundRectangleFigure()

RoundRectangleFigure

public RoundRectangleFigure(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)

setArc

public void setArc(int width,
                   int height)
Sets the arc's witdh and height.


getArc

public java.awt.Point getArc()
Gets the arc's width and height.


handles

public HandleEnumeration 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 type-safe iterator 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)

connectionInsets

public java.awt.Insets connectionInsets()
Description copied from class: AbstractFigure
Returns the connection inset. The connection inset defines the area where the display box of a figure can't be connected. By default the entire display box can be connected.

Specified by:
connectionInsets in interface Figure
Overrides:
connectionInsets in class AbstractFigure

connectorAt

public Connector connectorAt(int x,
                             int y)
Description copied from class: AbstractFigure
Returns the Figures connector for the specified location. By default a ChopBoxConnector is returned.

Specified by:
connectorAt in interface Figure
Overrides:
connectorAt in class AbstractFigure
See Also:
ChopBoxConnector

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

JHotDraw 6.0b1