geofasc.swing.model
public class DefaultSquareModel extends DefaultRectangleModel implements SquareModel
DefaultSquareModel
is the default implementation of
SquareModel
. This class is inherited from
DefaultRectangleModel
.Constructor and Description |
---|
DefaultSquareModel() |
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.
|
void |
setSize(int width,
int height)
Sets the size (width and height) of this model's figure.
|
getArcHeight, getArcSize, getArcWidth, hasRoundedCorners, setArcHeight, setArcSize, setArcSize, setArcWidth, setRoundedCorners
getBounds, moveHeightBy, moveSizeBy, moveSizeBy, moveWidthBy, setBounds, setBounds, setHeight, setSize, setWidth
addChangeListener, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArcHeight, getArcSize, getArcWidth, hasRoundedCorners, setArcHeight, setArcSize, setArcSize, setArcWidth, setRoundedCorners
moveHeightBy, moveSizeBy, moveSizeBy, moveWidthBy, setBounds, setBounds, setHeight, 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
public int getLength()
getLength
in interface SquareModel
public void setLength(int length)
setLength
in interface SquareModel
length
- the new lengthpublic void setSize(int width, int height)
width
is equal to height
.setSize
in interface FigureModelExtended
setSize
in class DefaultFigureModelExtended
width
- the new widthheight
- the new heightFigureModelExtended.setSize(Dimension)
,
FigureModelExtended.setHeight(int)
,
FigureModelExtended.setWidth(int)