public class ImageModel extends AbstractDataModel
| Modifier and Type | Field and Description |
|---|---|
private javax.media.jai.PlanarImage |
image
The variable for the image, will not be serialized.
|
private javax.media.jai.remote.SerializableRenderedImage |
serializableImage
Serialized version of the image.
|
private static long |
serialVersionUID
The UID for serialization.
|
modelName, properties| Constructor and Description |
|---|
ImageModel()
Default constructor.
|
ImageModel(javax.media.jai.PlanarImage pi)
Constructor receiving an instance of
PlanarImage. |
ImageModel(javax.media.jai.PlanarImage pi,
Hashtable<String,Object> properties)
|
| Modifier and Type | Method and Description |
|---|---|
ImageModel |
clone() |
protected void |
copyPropertiesToPlanarImage()
Convenient method for copying the hashtable properties to the image
properties.
|
String |
getFileName()
Gets the property
file_name from the ImageModel
instance. |
javax.media.jai.PlanarImage |
getImage() |
protected javax.media.jai.remote.SerializableRenderedImage |
getSerializableImage() |
private void |
readObject(ObjectInputStream ois)
This methods overrides the default
readObject()-Method of
Serializable. |
void |
setFileName(String fileName)
Gets the property
file_name from the ImageModel
instance. |
void |
setImage(javax.media.jai.PlanarImage image) |
void |
setModelName(String name)
Sets the property
image_name of the ImageModel
instance. |
void |
setProperty(String key,
Object value)
This method is a wrapper method, so that every property is written to the
PlanarImage object's property list, too. |
protected void |
setSerializableImage(javax.media.jai.remote.SerializableRenderedImage serializableImage) |
private void |
writeObject(ObjectOutputStream oos)
This methods overrides the default
writeObject()-Method of
Serializable. |
copyProperties, getDataType, getModelName, getProperties, getProperty, setDataType, setPropertiesprivate static final long serialVersionUID
private transient javax.media.jai.PlanarImage image
private javax.media.jai.remote.SerializableRenderedImage serializableImage
public ImageModel()
public ImageModel(javax.media.jai.PlanarImage pi)
PlanarImage.pi - public void setModelName(String name)
image_name of the ImageModel
instance. This model uses the built-in properties from the
PlanarImage class.setModelName in interface IDataModelsetModelName in class AbstractDataModelIDataModel.setModelName(java.lang.String)public String getFileName()
file_name from the ImageModel
instance. This model uses the built-in properties from the
PlanarImage class.public void setFileName(String fileName)
file_name from the ImageModel
instance. This model uses the built-in properties from the
PlanarImage class.fileName - public void setProperty(String key, Object value)
PlanarImage object's property list, too.
Note: If the image is of another type than
PlanarImage this method must be altered!
setProperty in interface IDataModelsetProperty in class AbstractDataModelIDataModel.setProperty(String, Object)public javax.media.jai.PlanarImage getImage()
public void setImage(javax.media.jai.PlanarImage image)
image - the image to setprotected void copyPropertiesToPlanarImage()
protected javax.media.jai.remote.SerializableRenderedImage getSerializableImage()
protected void setSerializableImage(javax.media.jai.remote.SerializableRenderedImage serializableImage)
serializableImage - the serializableImage to setprivate void writeObject(ObjectOutputStream oos) throws IOException
writeObject()-Method of
Serializable.oos - IOExceptionprivate void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
readObject()-Method of
Serializable.ois - ClassNotFoundExceptionIOExceptionpublic ImageModel clone() throws CloneNotSupportedException
clone in class AbstractDataModelCloneNotSupportedExceptionCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.