All Packages Class Hierarchy This Package Previous Next Index
Class att.grappa.WedgePeer
java.lang.Object
|
+----att.grappa.DrawObjectPeer
|
+----att.grappa.DrawNodePeer
|
+----att.grappa.WedgePeer
- public class WedgePeer
- extends DrawNodePeer
This class provides the basis for actually drawing wedge elements on a pane.
This shape is not implemented in a very thorough manner because there has
not been much call for it.
- Version:
- 1.1, 30 Sep 1999; Copyright 1996 - 1999 by AT&T Corp.
- Author:
- John Mocenigo, Research @ AT&T Labs
-
WedgePeer(Wedge, DrawPane)
- Create an instance of a
WedgePeer
related to the supplied Wedge
and DrawPane
.
-
draw(Graphics, GraphicContext)
- Draws the wedge using the specified graphics information.
-
getWedge()
- Get the
Wedge
object associated with this peer.
-
inPeer(int, int)
- Checks if the supplied co-ordinates are in the specific shape of
this peer.
WedgePeer
public WedgePeer(Wedge wedge,
DrawPane pane)
- Create an instance of a
WedgePeer
related to the supplied Wedge
and DrawPane
.
- Parameters:
- wedge - the source object for this peer object
- pane - the pane to use when drawing this peer
draw
public void draw(Graphics gr,
GraphicContext context)
- Draws the wedge using the specified graphics information.
- Parameters:
- gr - the AWT graphics context to use for drawing, if the value
is null, then the off-screen canvas
Graphics
is used.
- context - the graphic context to use when drawing.
If the context is null, the object's context is used.
- Overrides:
- draw in class DrawNodePeer
inPeer
public boolean inPeer(int x,
int y)
- Checks if the supplied co-ordinates are in the specific shape of
this peer.
- Parameters:
- x - the x co-ordinate to check
- y - the y co-ordinate to check
- Returns:
- true if the co-ordinates lie inside the peer or on its boundary,
false otherwise.
- Overrides:
- inPeer in class DrawNodePeer
getWedge
public Wedge getWedge()
- Get the
Wedge
object associated with this peer.
- Returns:
- the associated
Wedge
object
All Packages Class Hierarchy This Package Previous Next Index