drawables
Class DrawableBitmap

java.lang.Object
  |
  +--drawables.Drawable
        |
        +--drawables.DrawableBitmap
All Implemented Interfaces:
EntryReadable, java.io.Serializable

public class DrawableBitmap
extends Drawable

Drawable class for bitmaps.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class drawables.Drawable
AREALAYER, BITMAPLAYER, container, DEFMAXSCALE, DEFMINSCALE, layer, LINELAYER, maxScale, mbr, minScale, nextOfLayer, obj, POINTLAYER, pres, selected, TEXTLAYER
 
Constructor Summary
protected DrawableBitmap()
          Constructor.
  DrawableBitmap(int x, int y, DrawableBitmap master)
          Constructor.
  DrawableBitmap(int x, int y, int width, int height, java.net.URL url, java.lang.String presName, boolean scalable)
          Constructor.
  DrawableBitmap(int x, int y, int width, int height, java.net.URL url, java.lang.String presName, boolean scalable, int minScale, int maxScale)
          Constructor.
  DrawableBitmap(int x, int y, java.net.URL url)
          Constructor of a non-scalable bitmap.
 
Method Summary
protected  void drawProtected(java.awt.Graphics g, int scale, int mode, int value)
          Draws the bitmap.
static void init(java.awt.image.ImageObserver newObserver)
          Announces the image observer to the class.
 EntryReadable read(EntryInput r)
          Read a bitmap from file.
protected  void writeProtected(EntryWriter out, int type)
          Writes the bitmap; not yet implemented.
 
Methods inherited from class drawables.Drawable
computeDistance, computeDistanceTo, contains, draw, draw, draw, draw, getContainer, getId, getLayer, getMaxScale, getMBR, getMinScale, getNextOfLayer, getObject, getPresentation, getPresentation, getType, interacts, intersects, intersects, intersects, isContainedBy, isVisible, readCoord, readCoord, readDrawable, readDrawable, setContainer, setLayer, setMaxScale, setMBR, setMinScale, setNextOfLayer, setObject, setPresentation, setSelection, toString, write, writeCoord, writeCoord, writeGML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DrawableBitmap

protected DrawableBitmap()
Constructor.


DrawableBitmap

public DrawableBitmap(int x,
                      int y,
                      int width,
                      int height,
                      java.net.URL url,
                      java.lang.String presName,
                      boolean scalable)
Constructor.

Parameters:
x - left x-coordinate
y - upper y-coordinate
width - width
height - height
url - complete URL
presName - name of the presentation
scalable - is the bitmap scalable?

DrawableBitmap

public DrawableBitmap(int x,
                      int y,
                      int width,
                      int height,
                      java.net.URL url,
                      java.lang.String presName,
                      boolean scalable,
                      int minScale,
                      int maxScale)
Constructor.

Parameters:
x - left x-coordinate
y - upper y-coordinate
width - width
height - height
url - complete URL
presName - name of the presentation
scalable - is the bitmap scalable?
minScale - least detailed scale where the drawable is visible
maxScale - most detailed scale where the drawable is visible

DrawableBitmap

public DrawableBitmap(int x,
                      int y,
                      DrawableBitmap master)
Constructor.

Parameters:
x - left x-coordinate
y - upper y-coordinate
master - bitmap which delivers the required properties.

DrawableBitmap

public DrawableBitmap(int x,
                      int y,
                      java.net.URL url)
Constructor of a non-scalable bitmap.

Parameters:
x - left x-coordinate
y - upper y-coordinate
url - complete URL
Method Detail

drawProtected

protected void drawProtected(java.awt.Graphics g,
                             int scale,
                             int mode,
                             int value)
Draws the bitmap.

Specified by:
drawProtected in class Drawable
Parameters:
g - graphical context
scale - actual scale
mode - actual mode (has no influene)
value - presentation value (has no influence)

init

public static void init(java.awt.image.ImageObserver newObserver)
Announces the image observer to the class.

Parameters:
newObserver - the image observer

read

public EntryReadable read(EntryInput r)
Read a bitmap from file. The first entry ist the type.
type == 0: x,y,URL
type == 1: width,height,presName,scale
type == 2: minScale,maxScale

Parameters:
r - entry input
Returns:
the bitmap or null

writeProtected

protected void writeProtected(EntryWriter out,
                              int type)
Writes the bitmap; not yet implemented.

Specified by:
writeProtected in class Drawable
Parameters:
out - entry writer
type - type of the output