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, setRoundedCornersgetBounds, moveHeightBy, moveSizeBy, moveSizeBy, moveWidthBy, setBounds, setBounds, setHeight, setSize, setWidthaddChangeListener, 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, turnDirectionToequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArcHeight, getArcSize, getArcWidth, hasRoundedCorners, setArcHeight, setArcSize, setArcSize, setArcWidth, setRoundedCornersmoveHeightBy, moveSizeBy, moveSizeBy, moveWidthBy, setBounds, setBounds, setHeight, setSize, setWidthaddChangeListener, 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, turnDirectionTopublic int getLength()
getLength in interface SquareModelpublic void setLength(int length)
setLength in interface SquareModellength - the new lengthpublic void setSize(int width,
int height)
width is equal to height.setSize in interface FigureModelExtendedsetSize in class DefaultFigureModelExtendedwidth - the new widthheight - the new heightFigureModelExtended.setSize(Dimension),
FigureModelExtended.setHeight(int),
FigureModelExtended.setWidth(int)