java.lang.Objectobjectdraw.ObjectDrawObject
objectdraw.ObjectDrawShape
objectdraw.ObjectDrawRectangularShape
objectdraw.VisibleImage
fluids.Background
public class Background
The Background
class draws the background for a fluid mechanics simulation. All
other components of the simulation need to be added to this background in order to be drawn.
Constructor Summary | |
---|---|
Background(String modelName,
DrawingCanvas canvas)
Create a new Background . |
Method Summary | |
---|---|
Tank |
getTank()
Get the tank that represents the background. |
Methods inherited from class objectdraw.VisibleImage |
---|
addToCanvas, contains, createBufferedCopy, draw, getCanvas, getColor, getDoubleHeight, getDoubleWidth, getDoubleX, getDoubleY, getHeight, getImage, getImageHeight, getImageWidth, getLocation, getWidth, getX, getY, hide, isHidden, makeShape, move, moveTo, moveTo, overlaps, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, setHeight, setImage, setSize, setWidth, show, toString |
Methods inherited from class objectdraw.ObjectDrawRectangularShape |
---|
getBounds |
Methods inherited from class objectdraw.ObjectDrawShape |
---|
clearCanvas, draw, getDrawables, getShape, removeCanvas, setMyShape, update |
Methods inherited from class objectdraw.ObjectDrawObject |
---|
deferUpdates, depend, runUpdates, undepend |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface objectdraw.DrawableInterface |
---|
getShape |
Constructor Detail |
---|
public Background(String modelName, DrawingCanvas canvas)
Background
.
modelName
- Name of the model. This should be the name of the directory in which
the images for this simulation are. There must be a file background.png
in that directory.canvas
- DrawingCanvas
to add this Background
toMethod Detail |
---|
public Tank getTank()
null
, if there was no "backgroundWater.png" in
the directory for this model.
Tank
into which other tanks overflow, or null
if there is no
such tank.