|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object graphics.AbstractGraphic graphics.CompoundGraphic
public class CompoundGraphic
A Graphical object that acts as a container for other Graphical objects. Add many Graphics to this and then moving, rotating, etc. this graphic will perform the desired action on all the Graphics this contains
Field Summary |
---|
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CompoundGraphic()
Creates a new instance of an empty CompoundGraphic with a dimension of (1,1) at point (0,0) |
Method Summary | |
---|---|
void |
actualPaint(java.awt.Graphics2D gs,
java.awt.Point location,
java.awt.Dimension dimension)
Uses the Graphics2D object to Paint the CompoundGraphic at a specified location and with a specified dimension |
void |
add(IGraphic g)
Adds a graphic to the compound |
java.awt.Shape |
getShape()
Returns a java.awt.Shape that represents the total sum of the areas of all the Graphics in this Compound's Bounding box. |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
|
void |
remove(IGraphic g)
Removes a Graphic from the Compound |
void |
repaint()
Forces a repaint of all the Graphics in the same container as the Compound |
void |
repaint(java.awt.Rectangle bounds)
Forces a repaint of all the things that are on this Container in the given bounds |
void |
setDimension(java.awt.Dimension newDimension)
Sets the dimension of this compound, thus causing all the Graphics in the compound to be altered. |
Methods inherited from class graphics.AbstractGraphic |
---|
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getMovement, getRotation, intersects, move, paint, rotate, setCenterLocation, setContainer, setLocation, setMovement, setRotation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface graphics.IContainer |
---|
getDimension |
Constructor Detail |
---|
public CompoundGraphic()
Method Detail |
---|
public void add(IGraphic g)
add
in interface IContainer
g
- The Graphic to addIContainer.add(graphics.IGraphic)
public void remove(IGraphic g)
remove
in interface IContainer
g
- The Graphic to removeIContainer.remove(graphics.IGraphic)
public void actualPaint(java.awt.Graphics2D gs, java.awt.Point location, java.awt.Dimension dimension)
actualPaint
in interface IGraphic
gs
- The Graphics2D object that will do the paintinglocation
- The Location at which to paint the Compounddimension
- The Dimension of the CompoundIGraphic.actualPaint(java.awt.Graphics2D,
java.awt.Point, java.awt.Dimension)
public void repaint()
repaint
in interface IContainer
IContainer.repaint()
public void repaint(java.awt.Rectangle bounds)
IContainer
repaint
in interface IContainer
bounds
- the bounds of which to repaintIContainer.repaint(java.awt.Rectangle)
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
img
- infoflags
- x
- y
- width
- height
-
Component.imageUpdate(java.awt.Image, int, int, int, int, int)
public void setDimension(java.awt.Dimension newDimension)
setDimension
in interface ISizeable
setDimension
in class AbstractGraphic
newDimension
- The Dimension to set this CompoundGraphic to beISizeable.setDimension(java.awt.Dimension)
public java.awt.Shape getShape()
getShape
in interface IGraphic
IGraphic.getShape()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |