geofasc.swing.model
public interface SquareModel extends RectangleModel
SquareModel
is the interface for the data model of a square
figure. This interface is inherited from RectangleModel
.
A square is defined by its side length (which holds for all four sides of
it). Implementations of this interface should override
FigureModelExtended.setSize(int, int)
and/ or FigureModelExtended.setSize(java.awt.Dimension)
to
permit size setting only if the width and height are equal.RectangleModel
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Gets the length of this model's square sides.
|
void |
setLength(int length)
Sets the length of this model's square sides.
|
getArcHeight, getArcSize, getArcWidth, hasRoundedCorners, setArcHeight, setArcSize, setArcSize, setArcWidth, setRoundedCorners
moveHeightBy, moveSizeBy, moveSizeBy, moveWidthBy, setBounds, setBounds, setHeight, setSize, setSize, setWidth
addChangeListener, getBounds, getBounds, getDirection, getFillColor, getHeight, getLineColor, getLocation, getLocationX, getLocationY, getSize, getWidth, isFilled, moveLocationBy, moveLocationBy, moveLocationBy, moveLocationXBy, moveLocationYBy, removeChangeListener, setDirection, setFillColor, setFilled, setLineColor, setLocation, setLocation, setLocationX, setLocationY, turnDirectionBy, turnDirectionTo