TV-Browser 2.7.5 API

webplugin.aclib.image.ico
Class AbstractBitmap

java.lang.Object
  extended by webplugin.aclib.image.ico.AbstractBitmap
Direct Known Subclasses:
AbstractBitmapIndexed, AbstractBitmapRGB

public abstract class AbstractBitmap
extends Object

Parent class for all icon bitmaps, indexed or RGB.

Why is creation and read() not one thing? Because we might want to create the object, fill it step by step, and then write it.

Author:
© Christian Treber, ct@ctreber.com
See Also:
com.ctreber.aclib.image.ico.AbstractBitmapIndexed, com.ctreber.aclib.image.ico.AbstractBitmapRGB

Field Summary
protected  BitmapDescriptor _descriptor
          Describes the bitmap.
 
Constructor Summary
AbstractBitmap(BitmapDescriptor pDescriptor)
           
 
Method Summary
abstract  BufferedImage createImageRGB()
          Create an RGB image rendition of this bitmap.
protected  int getColorCount()
           
 BitmapDescriptor getDescriptor()
          Get the bitmap descriptor.
protected  int getHeight()
          The (manipulated height - read on).
protected  int getWidth()
          Get the bitmap width.
(package private) abstract  void read(AbstractDecoder pDec)
          Read bitmap from the decoder into class internal data structures.
(package private)  void setDescriptor(BitmapDescriptor pDescriptor)
           
 String toString()
          Simply returns the class name which reflects the bitmap type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_descriptor

protected BitmapDescriptor _descriptor
Describes the bitmap.

Constructor Detail

AbstractBitmap

public AbstractBitmap(BitmapDescriptor pDescriptor)
Parameters:
pDescriptor - The image descriptor.
Method Detail

createImageRGB

public abstract BufferedImage createImageRGB()
Create an RGB image rendition of this bitmap.

Returns:
A BufferedImage rendition (RGB) of this bitmap.

read

abstract void read(AbstractDecoder pDec)
            throws IOException
Read bitmap from the decoder into class internal data structures. Implemented by specific Bitmap classes.

Parameters:
pDec - The decoder.
Throws:
IOException

getHeight

protected int getHeight()
The (manipulated height - read on). I found that a) mostly (but not always) the height reported by the header is double the real size, and b) that the descriptor is usually correct.

Returns:
Returns the height.

getWidth

protected int getWidth()
Get the bitmap width.

Returns:
Returns the width.

getColorCount

protected int getColorCount()

getDescriptor

public BitmapDescriptor getDescriptor()
Get the bitmap descriptor.

Returns:
Returns the descriptor.

setDescriptor

void setDescriptor(BitmapDescriptor pDescriptor)
Parameters:
pDescriptor - The descriptor to set.

toString

public String toString()
Simply returns the class name which reflects the bitmap type.

Overrides:
toString in class Object
See Also:
Object.toString()

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)