All Packages Class Hierarchy This Package Previous Next Index
Class element.BoundedShape
java.lang.Object
|
+----java.awt.Component
|
+----element.GenericShape
|
+----element.BoundedShape
- public abstract class BoundedShape
- extends GenericShape
This class implements the functionality of bounded shapes that is
boxes, circles, ellipses and text
-
fill
- set to true iff this shape is filled
-
height
- shape's height
-
width
- shape's width
-
BoundedShape()
- Constructs the bounded shape with reset fill flag
-
adjust()
- Adjusts the shape's position according to drawing direction
-
atPositionAsString()
- Returns the shape's position as a pic text
-
center(int[])
- Returns the most left and most rigth points for this shape.
-
contains(int, int)
- Returns true iff this shape contains the given point
-
getCenter()
- Returns the shape center point
-
getDragPoints()
- Returns the array of shape's drag points
-
getFill()
- Returns true iff this shape is filled
-
getHeight()
- Returns the shape's height
-
getHigh()
- Returns the shape's high drag points
-
getLeft()
- Returns the shape's left drag points
-
getLow()
- Returns the shape's low drag points
-
getResizeDirection(int)
- Returns the drag direction according to point
-
getResizeText()
- Returns the pic text for this shape after resizing
-
getRight()
- Returns the shape's right drag points
-
getWidth()
- Returns the shape's width
-
inverse()
- Inverses the Y coordinate of the shape.
-
isSelected(int, int, int, int)
- Returns true if the shape is included into the given rectangular frame
-
moveTo(Point)
- Moves the shape to the given point
-
setFill(boolean)
- Sets a fill flag to a new value
-
setHeight(int)
- Sets new height for this shape (in pixels)
-
setInsertionPoint()
- Adjusts the global insertion point.
-
setWidth(int)
- Sets new width for this shape (in pixels)
-
showParameters(StatusBar, StatusBar, StatusBar, StatusBar)
- Shows the shape's parameters in the given windows
fill
protected boolean fill
- set to true iff this shape is filled
height
protected int height
- shape's height
width
protected int width
- shape's width
BoundedShape
protected BoundedShape()
- Constructs the bounded shape with reset fill flag
getHeight
public int getHeight()
- Returns the shape's height
- Overrides:
- getHeight in class GenericShape
getWidth
public int getWidth()
- Returns the shape's width
- Overrides:
- getWidth in class GenericShape
setHeight
public void setHeight(int newHeight)
- Sets new height for this shape (in pixels)
- Overrides:
- setHeight in class GenericShape
setWidth
public void setWidth(int newWidth)
- Sets new width for this shape (in pixels)
- Overrides:
- setWidth in class GenericShape
inverse
public void inverse()
- Inverses the Y coordinate of the shape.
- Overrides:
- inverse in class GenericShape
center
public int[] center(int borders[])
- Returns the most left and most rigth points for this shape.
- Overrides:
- center in class GenericShape
setFill
public void setFill(boolean value)
- Sets a fill flag to a new value
getFill
public boolean getFill()
- Returns true iff this shape is filled
getResizeText
public String getResizeText()
- Returns the pic text for this shape after resizing
- Overrides:
- getResizeText in class GenericShape
setInsertionPoint
public void setInsertionPoint()
- Adjusts the global insertion point.
This method is called after drawing a new shape
- Overrides:
- setInsertionPoint in class GenericShape
showParameters
public void showParameters(StatusBar heightField,
StatusBar widthField,
StatusBar radius,
StatusBar text)
- Shows the shape's parameters in the given windows
- Overrides:
- showParameters in class GenericShape
adjust
protected void adjust()
- Adjusts the shape's position according to drawing direction
getDragPoints
public Point[] getDragPoints()
- Returns the array of shape's drag points
- Overrides:
- getDragPoints in class GenericShape
getResizeDirection
public Point getResizeDirection(int point)
- Returns the drag direction according to point
- Overrides:
- getResizeDirection in class GenericShape
atPositionAsString
public String atPositionAsString()
- Returns the shape's position as a pic text
- Overrides:
- atPositionAsString in class GenericShape
contains
public boolean contains(int x,
int y)
- Returns true iff this shape contains the given point
- Overrides:
- contains in class GenericShape
isSelected
public boolean isSelected(int x,
int y,
int _width,
int _height)
- Returns true if the shape is included into the given rectangular frame
- Overrides:
- isSelected in class GenericShape
getCenter
protected Point getCenter()
- Returns the shape center point
- Overrides:
- getCenter in class GenericShape
getLeft
protected Point getLeft()
- Returns the shape's left drag points
- Overrides:
- getLeft in class GenericShape
getRight
protected Point getRight()
- Returns the shape's right drag points
- Overrides:
- getRight in class GenericShape
getLow
protected Point getLow()
- Returns the shape's low drag points
- Overrides:
- getLow in class GenericShape
getHigh
protected Point getHigh()
- Returns the shape's high drag points
- Overrides:
- getHigh in class GenericShape
moveTo
public void moveTo(Point newLocation)
- Moves the shape to the given point
- Overrides:
- moveTo in class GenericShape
All Packages Class Hierarchy This Package Previous Next Index