|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGraphic
The interface that defines the capabilites for an object that is a Graphic
Method Summary | |
---|---|
void |
actualPaint(Graphics2D gs,
Point location,
Dimension dimension)
This method uses the Graphics2D object to paint the actual shape onto the Container. |
void |
addMouseListener(MouseListener ml)
Adds a java.awt.event.MouseListener onto this graphic
TODO: remove mouse listener? |
void |
addMouseMotionListener(MouseMotionListener mml)
Adds a java.awt.event.MouseMotionListener onto this
graphic TODO: remove listener? |
boolean |
contains(Point p)
Checks whether a given point is contained within this graphic |
Rectangle |
getBounds()
Returns the bounding box of this graphic |
IContainer |
getContainer()
Get the Container this graphic is in. |
Collection<MouseListener> |
getMouseListeners()
Returns all the java.awt.event.MouseListener s of this
graphic |
Collection<MouseMotionListener> |
getMouseMotionListeners()
Returns all the java.awt.event.MouseMotionListener s of
this graphic |
IGraphicMovement |
getMovement()
Returns this graphic's movement |
Shape |
getShape()
Should return a java.awt.Shape representation of this graphic. |
boolean |
intersects(IGraphic shape)
Tests to see if two Graphics intersect with each other. |
void |
paint(Graphics2D gs)
This method uses the Graphics2D object to paint itself onto its container |
void |
setContainer(IContainer container)
This sets the container of this graphic |
void |
setMovement(IGraphicMovement movement)
Sets the movement of the Graphic. |
Methods inherited from interface graphics.ISizeable |
---|
getDimension, setDimension |
Methods inherited from interface graphics.CenterLocatable |
---|
getCenterLocation, setCenterLocation |
Methods inherited from interface graphics.ILocatable |
---|
getLocation, move, setLocation |
Methods inherited from interface graphics.IRotatable |
---|
getRotation, rotate, setRotation |
Method Detail |
---|
void setContainer(IContainer container)
container
- the container which will contain this graphicRectangle getBounds()
boolean contains(Point p)
p
- The point to check
p
false if notShape getShape()
void paint(Graphics2D gs)
gs
- The Graphics2D object used to do the paintingvoid actualPaint(Graphics2D gs, Point location, Dimension dimension)
gs
- The Graphics2D object used to do the paintinglocation
- The offset at which to paint this graphicdimension
- The dimension this graphicvoid addMouseListener(MouseListener ml)
java.awt.event.MouseListener
onto this graphic
TODO: remove mouse listener?
ml
- The java.awt.event.MouseListener
to listen on
this graphicCollection<MouseListener> getMouseListeners()
java.awt.event.MouseListener
s of this
graphic
java.awt.event.MouseListener
s of this graphicvoid addMouseMotionListener(MouseMotionListener mml)
java.awt.event.MouseMotionListener
onto this
graphic TODO: remove listener?
mml
- The java.awt.event.MouseMotionListener
to
listen on this graphicCollection<MouseMotionListener> getMouseMotionListeners()
java.awt.event.MouseMotionListener
s of
this graphic
java.awt.event.MouseMotionListener
s of this
graphicboolean intersects(IGraphic shape)
shape
- the graphic to test for intersection
IContainer getContainer()
void setMovement(IGraphicMovement movement)
movement
- IGraphicMovement getMovement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |