|
||||||||||
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(java.awt.Graphics2D gs,
java.awt.Point location,
java.awt.Dimension dimension)
This method uses the Graphics2D object to paint the actual shape onto the Container. |
void |
addMouseListener(java.awt.event.MouseListener ml)
Adds a java.awt.event.MouseListener onto this graphic
TODO: remove mouse listener? |
void |
addMouseMotionListener(java.awt.event.MouseMotionListener mml)
Adds a java.awt.event.MouseMotionListener onto this
graphic TODO: remove listener? |
boolean |
contains(java.awt.Point p)
Checks whether a given point is contained within this graphic |
java.awt.Rectangle |
getBounds()
Returns the bounding box of this graphic |
IContainer |
getContainer()
Get the Container this graphic is in. |
java.util.Collection<java.awt.event.MouseListener> |
getMouseListeners()
Returns all the java.awt.event.MouseListener s of this
graphic |
java.util.Collection<java.awt.event.MouseMotionListener> |
getMouseMotionListeners()
Returns all the java.awt.event.MouseMotionListener s of
this graphic |
IGraphicMovement |
getMovement()
Returns this graphic's movement |
java.awt.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(java.awt.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 graphicjava.awt.Rectangle getBounds()
boolean contains(java.awt.Point p)
p
- The point to check
p
false if notjava.awt.Shape getShape()
void paint(java.awt.Graphics2D gs)
gs
- The Graphics2D object used to do the paintingvoid actualPaint(java.awt.Graphics2D gs, java.awt.Point location, java.awt.Dimension dimension)
gs
- The Graphics2D object used to do the paintinglocation
- The offset at which to paint this graphicdimension
- The dimension this graphicvoid addMouseListener(java.awt.event.MouseListener ml)
java.awt.event.MouseListener
onto this graphic
TODO: remove mouse listener?
ml
- The java.awt.event.MouseListener
to listen on
this graphicjava.util.Collection<java.awt.event.MouseListener> getMouseListeners()
java.awt.event.MouseListener
s of this
graphic
java.awt.event.MouseListener
s of this graphicvoid addMouseMotionListener(java.awt.event.MouseMotionListener mml)
java.awt.event.MouseMotionListener
onto this
graphic TODO: remove listener?
mml
- The java.awt.event.MouseMotionListener
to
listen on this graphicjava.util.Collection<java.awt.event.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 |