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
-
Arc()
-
-
contains(int, int)
- Returns true iff this shape contains the given point
-
draw(Graphics)
- Draws the shape on the screen
-
getArcPoint(Point)
- Returns the point on the arc nearest to the given point
-
getDragPoints()
- Returns the array of shape's drag points
-
getFromPoint()
- Returns the start point of the arc
-
getHeight()
- Returns the shape height
-
getRadius()
- Returns the arc radius (in pixels)
-
getResizeDirection(int)
- Returns the drag direction according to point
-
getResizeText()
- Returns the pic text for this shape after resizing
-
getShapeAsInt()
- Returns the shape's type
-
getToPoint()
- Returns the end point of the arc
-
getWidth()
- Returns the shape width
-
moveTo(Point)
- Moves the shape to the given point
-
setClockwise(boolean)
- Sets the clockwise flag for the arc
-
setFromPoint(Point)
-
-
setHeight(int)
- Sets new height for this shape (in pixels)
-
setRadius(int)
- Sets the arc radius (in pixels)
-
setToPoint(Point)
-
-
setWidth(int)
- Sets new width for this shape (in pixels)
-
shapeText()
- Returns the pic text assotiated with this shape
-
showParameters(StatusBar, StatusBar, StatusBar, StatusBar)
- Shows the shape's parameters in the given windows
Arc
public Arc()
setClockwise
public void setClockwise(boolean clockwise)
- Sets the clockwise flag for the arc
getFromPoint
public Point getFromPoint()
- Returns the start point of the arc
getToPoint
public Point getToPoint()
- Returns the end point of the arc
getRadius
public double getRadius()
- Returns the arc radius (in pixels)
draw
public void draw(Graphics graphics)
- Draws the shape on the screen
- Overrides:
- draw in class GenericShape
contains
public boolean contains(int x,
int y)
- Returns true iff this shape contains the given point
- Overrides:
- contains in class NotBoundedShape
shapeText
public String shapeText()
- Returns the pic text assotiated with this shape
- Overrides:
- shapeText in class GenericShape
setRadius
public void setRadius(int radius)
- Sets the arc radius (in pixels)
getDragPoints
public Point[] getDragPoints()
- Returns the array of shape's drag points
- Overrides:
- getDragPoints in class GenericShape
getHeight
public int getHeight()
- Returns the shape height
- Overrides:
- getHeight in class NotBoundedShape
getWidth
public int getWidth()
- Returns the shape width
- Overrides:
- getWidth in class NotBoundedShape
setHeight
public void setHeight(int newHeight)
- Sets new height for this shape (in pixels)
- Overrides:
- setHeight in class NotBoundedShape
setWidth
public void setWidth(int newWidth)
- Sets new width for this shape (in pixels)
- Overrides:
- setWidth in class NotBoundedShape
getResizeDirection
public Point getResizeDirection(int point)
- Returns the drag direction according to point
- Overrides:
- getResizeDirection in class NotBoundedShape
getResizeText
public String getResizeText()
- Returns the pic text for this shape after resizing
- Overrides:
- getResizeText in class GenericShape
getShapeAsInt
public int getShapeAsInt()
- Returns the shape's type
- Overrides:
- getShapeAsInt in class GenericShape
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
getArcPoint
public Point getArcPoint(Point mouse)
- Returns the point on the arc nearest to the given point
moveTo
public void moveTo(Point newLocation)
- Moves the shape to the given point
- Overrides:
- moveTo in class GenericShape
setFromPoint
public void setFromPoint(Point point)
setToPoint
public void setToPoint(Point point)
All Packages Class Hierarchy This Package Previous Next Index