Class wb.GraphOval
All Packages Class Hierarchy This Package Previous Next Index
Class wb.GraphOval
java.lang.Object
|
+----wb.GraphUnit
|
+----wb.GraphOval
- public class GraphOval
- extends GraphUnit
Oval/Ellipse in its native form
Mapping (xmin, ymin) --> (top left) of the rectangle that encloses the oval
(xmax, ymax) --> (width, height) of the enclosing rectangle
-
GraphOval(int, int, Color)
- Creates an Instance of Partial Oval with its starting point
the top left set along with the Color and type
-
GraphOval(int, int, int, int, Color)
- Creates a Oval that is complete in all aspects of its definition
although the enclosing rectangle arguments are start and end points of the
user interaction, it appropriately identifies the left top and width
and height
-
GraphOval(DataInputStream)
- Creates an instance of the GraphOval by reading the data from the
Input Stream.
-
addnext(int, int)
- Add next assumes that the input is referred to as the final point of
user's description of the enclosing rectangle's diagonal.
-
erase(Graphics, Color)
- renders the Oval to the graphics using the background color (this)
in XOR mode.
-
isInside(int, int)
- method to verify if the passed point is enclosed in the handles
of this Object.
-
paint(Graphics)
- renders the Oval to the graphics using the current color (this)
GraphOval
public GraphOval(int x1,
int y1,
Color arg)
- Creates an Instance of Partial Oval with its starting point
the top left set along with the Color and type
- Parameters:
- x1 - the x coordinate of the starting point
- y1 - the y coordinate of the starting point
- arg - the color of this rectangle.
- See Also:
- addnext, GTypes
GraphOval
public GraphOval(int x1,
int y1,
int x2,
int y2,
Color arg)
- Creates a Oval that is complete in all aspects of its definition
although the enclosing rectangle arguments are start and end points of the
user interaction, it appropriately identifies the left top and width
and height
- Parameters:
- x1 - the x coordinate of the starting point
- y1 - the y coordinate of the starting point
- x2 - the x coordinate of the end point
- y2 - the y coordinate of the end point
- arg - the color of this oval.
GraphOval
public GraphOval(DataInputStream din) throws IOException
- Creates an instance of the GraphOval by reading the data from the
Input Stream. It then fills up the member variables of the class
- Parameters:
- din - DataInputStream the stream from which the data is read
- Throws: IOException
- if an I/O error occurs
- See Also:
- ByteUnPackInputStream, packetize
addnext
public void addnext(int x,
int y)
- Add next assumes that the input is referred to as the final point of
user's description of the enclosing rectangle's diagonal. Hence, it
corrects the data in xmin, ymin such that they map to top left
and xmax, ymax to width and height respectively.
- Parameters:
- x - int x-coordinate
- y - int y-coordinate
- Overrides:
- addnext in class GraphUnit
paint
public void paint(Graphics g)
- renders the Oval to the graphics using the current color (this)
- Parameters:
- g - Graphics to which it is rendered.
- Overrides:
- paint in class GraphUnit
erase
public void erase(Graphics g,
Color arg)
- renders the Oval to the graphics using the background color (this)
in XOR mode.
- Parameters:
- g - Graphics to which it is rendered.
- arg - COlor of the background
- Overrides:
- erase in class GraphUnit
isInside
public boolean isInside(int x,
int y)
- method to verify if the passed point is enclosed in the handles
of this Object.
- Parameters:
- x - x-coordinate of the point
- y - y-coordinate of the point
- Returns:
- boolean true iff the point is enclosed in the handles
- Overrides:
- isInside in class GraphUnit
All Packages Class Hierarchy This Package Previous Next Index