Package samer.tools
Class ImageSourceBase
- java.lang.Object
-
- samer.tools.ImageSourceBase
-
- All Implemented Interfaces:
- java.awt.image.ImageProducer
- Direct Known Subclasses:
- ArrayImageSource, ArrayVImageSource, IteratorImageSource, MatrixImageSource, MatrixImageSourceF, MatrixTImageSource, MatrixTImageSourceF
public abstract class ImageSourceBase extends java.lang.Object implements java.awt.image.ImageProducer
Base class for image producers. Derived classes must do the following:
- set width and height before any
consumers are added
- implement getHints()
- implement sendPixels(ImageConsumer)
-
-
Field Summary
Fields Modifier and Type Field and Description static java.awt.image.IndexColorModel
GREEN
static java.awt.image.IndexColorModel
GREY
protected int
height
protected IMap
map
protected java.awt.image.IndexColorModel
model
protected int
width
-
Constructor Summary
Constructors Constructor and Description ImageSourceBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description void
addConsumer(java.awt.image.ImageConsumer ic)
int
getHeight()
protected abstract int
getHints()
IMap
getMap()
int
getWidth()
boolean
isConsumer(java.awt.image.ImageConsumer ic)
void
removeConsumer(java.awt.image.ImageConsumer ic)
void
requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
void
sendPixels()
protected abstract void
sendPixels(java.awt.image.ImageConsumer ic)
void
setColorModel(java.awt.image.IndexColorModel cm)
void
setMap(IMap m)
void
startProduction(java.awt.image.ImageConsumer ic)
-
-
-
Field Detail
-
GREEN
public static java.awt.image.IndexColorModel GREEN
-
GREY
public static java.awt.image.IndexColorModel GREY
-
height
protected int height
-
map
protected IMap map
-
model
protected java.awt.image.IndexColorModel model
-
width
protected int width
-
-
Method Detail
-
getHints
protected abstract int getHints()
-
sendPixels
protected abstract void sendPixels(java.awt.image.ImageConsumer ic)
-
getMap
public IMap getMap()
-
setMap
public void setMap(IMap m)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
setColorModel
public void setColorModel(java.awt.image.IndexColorModel cm)
-
startProduction
public void startProduction(java.awt.image.ImageConsumer ic)
- Specified by:
startProduction
in interfacejava.awt.image.ImageProducer
-
requestTopDownLeftRightResend
public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
- Specified by:
requestTopDownLeftRightResend
in interfacejava.awt.image.ImageProducer
-
isConsumer
public boolean isConsumer(java.awt.image.ImageConsumer ic)
- Specified by:
isConsumer
in interfacejava.awt.image.ImageProducer
-
removeConsumer
public void removeConsumer(java.awt.image.ImageConsumer ic)
- Specified by:
removeConsumer
in interfacejava.awt.image.ImageProducer
-
addConsumer
public void addConsumer(java.awt.image.ImageConsumer ic)
- Specified by:
addConsumer
in interfacejava.awt.image.ImageProducer
-
sendPixels
public void sendPixels()
-
-