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


Variable Index

 o fill
set to true iff this shape is filled
 o height
shape's height
 o width
shape's width

Constructor Index

 o BoundedShape()
Constructs the bounded shape with reset fill flag

Method Index

 o adjust()
Adjusts the shape's position according to drawing direction
 o atPositionAsString()
Returns the shape's position as a pic text
 o center(int[])
Returns the most left and most rigth points for this shape.
 o contains(int, int)
Returns true iff this shape contains the given point
 o getCenter()
Returns the shape center point
 o getDragPoints()
Returns the array of shape's drag points
 o getFill()
Returns true iff this shape is filled
 o getHeight()
Returns the shape's height
 o getHigh()
Returns the shape's high drag points
 o getLeft()
Returns the shape's left drag points
 o getLow()
Returns the shape's low drag points
 o getResizeDirection(int)
Returns the drag direction according to point
 o getResizeText()
Returns the pic text for this shape after resizing
 o getRight()
Returns the shape's right drag points
 o getWidth()
Returns the shape's width
 o inverse()
Inverses the Y coordinate of the shape.
 o isSelected(int, int, int, int)
Returns true if the shape is included into the given rectangular frame
 o moveTo(Point)
Moves the shape to the given point
 o setFill(boolean)
Sets a fill flag to a new value
 o setHeight(int)
Sets new height for this shape (in pixels)
 o setInsertionPoint()
Adjusts the global insertion point.
 o setWidth(int)
Sets new width for this shape (in pixels)
 o showParameters(StatusBar, StatusBar, StatusBar, StatusBar)
Shows the shape's parameters in the given windows

Variables

 o fill
 protected boolean fill
set to true iff this shape is filled

 o height
 protected int height
shape's height

 o width
 protected int width
shape's width

Constructors

 o BoundedShape
 protected BoundedShape()
Constructs the bounded shape with reset fill flag

Methods

 o getHeight
 public int getHeight()
Returns the shape's height

Overrides:
getHeight in class GenericShape
 o getWidth
 public int getWidth()
Returns the shape's width

Overrides:
getWidth in class GenericShape
 o setHeight
 public void setHeight(int newHeight)
Sets new height for this shape (in pixels)

Overrides:
setHeight in class GenericShape
 o setWidth
 public void setWidth(int newWidth)
Sets new width for this shape (in pixels)

Overrides:
setWidth in class GenericShape
 o inverse
 public void inverse()
Inverses the Y coordinate of the shape.

Overrides:
inverse in class GenericShape
 o center
 public int[] center(int borders[])
Returns the most left and most rigth points for this shape.

Overrides:
center in class GenericShape
 o setFill
 public void setFill(boolean value)
Sets a fill flag to a new value

 o getFill
 public boolean getFill()
Returns true iff this shape is filled

 o getResizeText
 public String getResizeText()
Returns the pic text for this shape after resizing

Overrides:
getResizeText in class GenericShape
 o setInsertionPoint
 public void setInsertionPoint()
Adjusts the global insertion point. This method is called after drawing a new shape

Overrides:
setInsertionPoint in class GenericShape
 o 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
 o adjust
 protected void adjust()
Adjusts the shape's position according to drawing direction

 o getDragPoints
 public Point[] getDragPoints()
Returns the array of shape's drag points

Overrides:
getDragPoints in class GenericShape
 o getResizeDirection
 public Point getResizeDirection(int point)
Returns the drag direction according to point

Overrides:
getResizeDirection in class GenericShape
 o atPositionAsString
 public String atPositionAsString()
Returns the shape's position as a pic text

Overrides:
atPositionAsString in class GenericShape
 o contains
 public boolean contains(int x,
                         int y)
Returns true iff this shape contains the given point

Overrides:
contains in class GenericShape
 o 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
 o getCenter
 protected Point getCenter()
Returns the shape center point

Overrides:
getCenter in class GenericShape
 o getLeft
 protected Point getLeft()
Returns the shape's left drag points

Overrides:
getLeft in class GenericShape
 o getRight
 protected Point getRight()
Returns the shape's right drag points

Overrides:
getRight in class GenericShape
 o getLow
 protected Point getLow()
Returns the shape's low drag points

Overrides:
getLow in class GenericShape
 o getHigh
 protected Point getHigh()
Returns the shape's high drag points

Overrides:
getHigh in class GenericShape
 o 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