All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class element.Arc

java.lang.Object
   |
   +----java.awt.Component
           |
           +----element.GenericShape
                   |
                   +----element.NotBoundedShape
                           |
                           +----element.Arc

public class Arc
extends NotBoundedShape
This class implements the arc functionality


Constructor Index

 o Arc()

Method Index

 o contains(int, int)
Returns true iff this shape contains the given point
 o draw(Graphics)
Draws the shape on the screen
 o getArcPoint(Point)
Returns the point on the arc nearest to the given point
 o getDragPoints()
Returns the array of shape's drag points
 o getFromPoint()
Returns the start point of the arc
 o getHeight()
Returns the shape height
 o getRadius()
Returns the arc radius (in pixels)
 o getResizeDirection(int)
Returns the drag direction according to point
 o getResizeText()
Returns the pic text for this shape after resizing
 o getShapeAsInt()
Returns the shape's type
 o getToPoint()
Returns the end point of the arc
 o getWidth()
Returns the shape width
 o moveTo(Point)
Moves the shape to the given point
 o setClockwise(boolean)
Sets the clockwise flag for the arc
 o setFromPoint(Point)
 o setHeight(int)
Sets new height for this shape (in pixels)
 o setRadius(int)
Sets the arc radius (in pixels)
 o setToPoint(Point)
 o setWidth(int)
Sets new width for this shape (in pixels)
 o shapeText()
Returns the pic text assotiated with this shape
 o showParameters(StatusBar, StatusBar, StatusBar, StatusBar)
Shows the shape's parameters in the given windows

Constructors

 o Arc
 public Arc()

Methods

 o setClockwise
 public void setClockwise(boolean clockwise)
Sets the clockwise flag for the arc

 o getFromPoint
 public Point getFromPoint()
Returns the start point of the arc

 o getToPoint
 public Point getToPoint()
Returns the end point of the arc

 o getRadius
 public double getRadius()
Returns the arc radius (in pixels)

 o draw
 public void draw(Graphics graphics)
Draws the shape on the screen

Overrides:
draw 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 NotBoundedShape
 o shapeText
 public String shapeText()
Returns the pic text assotiated with this shape

Overrides:
shapeText in class GenericShape
 o setRadius
 public void setRadius(int radius)
Sets the arc radius (in pixels)

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

Overrides:
getDragPoints in class GenericShape
 o getHeight
 public int getHeight()
Returns the shape height

Overrides:
getHeight in class NotBoundedShape
 o getWidth
 public int getWidth()
Returns the shape width

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

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

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

Overrides:
getResizeDirection in class NotBoundedShape
 o getResizeText
 public String getResizeText()
Returns the pic text for this shape after resizing

Overrides:
getResizeText in class GenericShape
 o getShapeAsInt
 public int getShapeAsInt()
Returns the shape's type

Overrides:
getShapeAsInt in class GenericShape
 o showParameters
 public void showParameters(StatusBar heightField,
                            StatusBar widthField,
                            StatusBar radiusField,
                            StatusBar text)
Shows the shape's parameters in the given windows

Overrides:
showParameters in class GenericShape
 o getArcPoint
 public Point getArcPoint(Point mouse)
Returns the point on the arc nearest to the given point

 o moveTo
 public void moveTo(Point newLocation)
Moves the shape to the given point

Overrides:
moveTo in class GenericShape
 o setFromPoint
 public void setFromPoint(Point point)
 o setToPoint
 public void setToPoint(Point point)

All Packages  Class Hierarchy  This Package  Previous  Next  Index