public interface PixelMatrix
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add the specified property change listener.
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add the specified property change listener for the specified property.
|
int |
getHeight()
Return the height of this pixel matrix.
|
java.awt.Image |
getImage()
Return an image for this pixel matrix, scaled to dimensions
getWidth() x getHeight() if necessary. |
java.awt.Color |
getPixel(int x,
int y)
Return the color of the pixel at the specified (x, y) coordinates.
|
int |
getWidth()
Return the width of this pixel matrix.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified property change listener.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove the specified property change listener for the specified property.
|
void |
setPixel(int x,
int y,
java.awt.Color color)
Set the pixel at the specified (x, y) coordinates to the RGB and alpha
values in the specified color (optional operation).
|
java.awt.Image |
view(ReceptiveField receptiveField)
View this pixel matrix, returning an image for the specified receptive
field.
|
int getHeight()
int getWidth()
java.awt.Image getImage()
getWidth() x getHeight()
if necessary. The image will not be
null.java.awt.Color getPixel(int x, int y)
x
- x coordinate of the pixely
- y coordinate of the pixeljava.lang.ArrayIndexOutOfBoundsException
- if either of the specified
coordinates are outside the bounds of this pixel matrixvoid setPixel(int x, int y, java.awt.Color color)
x
- x coordinate of the pixel to sety
- y coordinate of the pixel to setcolor
- color value, must not be nulljava.lang.UnsupportedOperationException
- if the setPixel
operation is not supported by this pixel matrixjava.lang.ArrayIndexOutOfBoundsException
- if either of the specified
coordinates are outside the bounds of this pixel matrixjava.awt.Image view(ReceptiveField receptiveField)
receptiveField
- receptive field through which to view this pixel
matrix, must not be nullvoid addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listener to addvoid addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- property namelistener
- listener to addvoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listener to removevoid removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- property namelistener
- listener to remove