public class IqmDataBox extends Object implements Serializable, IThumbnailSupport, Cloneable
Changes
| Modifier and Type | Field and Description |
|---|---|
private CustomDataModel |
customDataModel
The variable for the custom content.
|
DataType |
dataType
The
DataType of this object. |
private Object |
emptyContent
The variable for the empty content, which is always
null. |
private UUID |
id
The unique ID of this object.
|
private ImageModel |
imageModel
The variable for the image.
|
private static org.apache.log4j.Logger |
logger
Class specific logger.
|
protected Thumbnail |
managerThumbnail
A cached fixed sized (40x40) manager thumb nail of the item's content.
|
private PlotModel |
plotModel
The variable for the plot model.
|
protected HashMap<String,Object> |
properties
A container for custom properties of the
IqmDataBox. |
private static long |
serialVersionUID
The UID for object serialization.
|
private TableModel |
tableModel
The variable for the table model.
|
protected Thumbnail |
tankThumbnail
A cached custom sized (40x40) tank thumb nail of the item's content.
|
protected Thumbnail |
thumbnail
A cached custom sized thumb nail of the item's content.
|
| Constructor and Description |
|---|
IqmDataBox()
This method creates an instance of
IqmDataBox containing an empty
object. |
IqmDataBox(CustomDataModel customContent)
This method creates an instance of
IqmDataBox containing a
specified custom content. |
IqmDataBox(ImageModel im)
This method creates an instance of
IqmDataBox containing a
specified ImageModel. |
IqmDataBox(JTable tableModel)
Deprecated.
The use of this method is discouraged, better use
setTableModel(TableModel) |
IqmDataBox(javax.media.jai.PlanarImage pi)
This method creates an instance of
IqmDataBox containing a
specified PlanarImage. |
IqmDataBox(PlotModel plotModel)
This method creates an instance of
IqmDataBox containing a
specified PlotModel. |
IqmDataBox(TableModel tableModel)
This method creates an instance of
IqmDataBox containing a
specified table model. |
| Modifier and Type | Method and Description |
|---|---|
IqmDataBox |
clone() |
Thumbnail |
createManagerThumbnail()
|
Thumbnail |
createTankThumbnail()
|
Image |
createThumbnail(int width,
int height,
boolean keepAspectRatio)
Creates a
Thumbnail. |
void |
createThumbnails()
Creates all three thumb nails for the containing data model.
|
CustomDataModel |
getCustomContent()
Get the custom content.
|
IDataModel |
getDataModel()
Gets the data model according to the current content.
|
DataType |
getDataType() |
String |
getDataTypeAsString()
Get the data type of the object as string.
|
UUID |
getID()
Returns the unique identifier of this
IqmDataBox object. |
javax.media.jai.PlanarImage |
getImage()
Get the
PlanarImage from the image model. |
ImageModel |
getImageModel() |
Thumbnail |
getManagerThumbnail()
|
PlotModel |
getPlotModel() |
HashMap<String,Object> |
getProperties()
Get all custom properties for this
IqmDataBox. |
Object |
getProperty(String key)
Gets the value for the requested property.
|
TableModel |
getTableModel() |
Thumbnail |
getTankThumbnail()
|
Thumbnail |
getThumbnail()
Gets the thumbnail.
|
void |
setCustomContent(CustomDataModel customContent)
The data type is automatically set to
DataType.CUSTOM. |
void |
setDataType(DataType dataType) |
void |
setEmptyContent(Object emptyContent)
This method is just used for the annotation of the empty content.
|
void |
setImage(javax.media.jai.PlanarImage planarImage)
The data type is automatically set to
DataType.IMAGE. |
void |
setImageModel(ImageModel imageModel)
The data type is automatically set to
DataType.IMAGE. |
void |
setManagerThumbnail(Thumbnail managerThumbnail)
|
void |
setPlotModel(PlotModel plotModel)
The data type is automatically set to
DataType.PLOT. |
void |
setProperties(HashMap<String,Object> properties)
Set the property object for this
IqmDataBox. |
void |
setProperty(String key,
Object value)
Sets a key-value pair to the properties of this object.
|
void |
setTableModel(JTable table)
Deprecated.
Use
setTableModel(TableModel) instead. |
void |
setTableModel(TableModel tableModel)
The data type is automatically set to
DataType.TABLE. |
void |
setTankThumbnail(Thumbnail tankThumbnail)
|
void |
setThumbnail(Thumbnail thumbnail)
Set the thumbnail.
|
static javax.media.jai.PlanarImage |
toPlanarImage(IqmDataBox iqmDataBox)
This method creates a
PlanarImage from the content of an
IqmDataBox. |
private static final long serialVersionUID
private static final transient org.apache.log4j.Logger logger
private UUID id
protected HashMap<String,Object> properties
IqmDataBox.protected transient Thumbnail thumbnail
protected transient Thumbnail managerThumbnail
protected transient Thumbnail tankThumbnail
private ImageModel imageModel
private PlotModel plotModel
private TableModel tableModel
private CustomDataModel customDataModel
private Object emptyContent
null.public IqmDataBox(ImageModel im)
IqmDataBox containing a
specified ImageModel. The data type is automatically set to
DataType.IMAGE.im - public IqmDataBox(javax.media.jai.PlanarImage pi)
IqmDataBox containing a
specified PlanarImage. The data type is automatically set to
DataType.IMAGE.pi - @Deprecated public IqmDataBox(JTable tableModel)
setTableModel(TableModel)IqmDataBox containing a
specified table model. The data type is automatically set to
DataType.TABLE.tableModel - a JTablepublic IqmDataBox(TableModel tableModel)
IqmDataBox containing a
specified table model. The data type is automatically set to
DataType.TABLE.tableModel - public IqmDataBox(PlotModel plotModel)
IqmDataBox containing a
specified PlotModel. The data type is automatically set to
DataType.PLOT.plotModel - public IqmDataBox(CustomDataModel customContent)
IqmDataBox containing a
specified custom content. The data type is automatically set to
DataType.CUSTOM.customContent - public IqmDataBox()
IqmDataBox containing an empty
object. The data type is automatically set to DataType.EMPTY.public javax.media.jai.PlanarImage getImage()
PlanarImage from the image model.public void setImage(javax.media.jai.PlanarImage planarImage)
DataType.IMAGE.planarImage - the planarImage to setpublic ImageModel getImageModel()
public void setImageModel(ImageModel imageModel)
DataType.IMAGE.imageModel - the planarImage to setpublic TableModel getTableModel()
TableModelpublic void setTableModel(JTable table) throws ClassCastException
setTableModel(TableModel) instead.DataType.TABLE.
This method is just for downward compatibility and its use is
discouraged, since data is stored in a TableModel.
table - the JTable to setClassCastExceptionpublic void setTableModel(TableModel tableModel)
DataType.TABLE.tableModel - the TableModel to setpublic PlotModel getPlotModel()
public void setPlotModel(PlotModel plotModel)
DataType.PLOT.plotModel - the PlotModel to setpublic CustomDataModel getCustomContent()
public void setCustomContent(CustomDataModel customContent)
DataType.CUSTOM.customContent - public void setEmptyContent(Object emptyContent)
DataType.EMPTY.emptyContent - will always be set to nullpublic DataType getDataType()
public void setDataType(DataType dataType)
dataType - the dataType to setpublic Object getProperty(String key)
key - the key for the valuenull if nothing is associated with the
given keypublic void setProperty(String key, Object value)
key - value - public HashMap<String,Object> getProperties()
IqmDataBox.public void setProperties(HashMap<String,Object> properties)
IqmDataBox.properties - public Image createThumbnail(int width, int height, boolean keepAspectRatio)
Thumbnail.createThumbnail in interface IThumbnailSupportwidth - height - keepAspectRatio - public Thumbnail createManagerThumbnail()
createManagerThumbnail in interface IThumbnailSupportpublic Thumbnail createTankThumbnail()
createTankThumbnail in interface IThumbnailSupportpublic Thumbnail getThumbnail()
getThumbnail in interface IThumbnailSupportpublic void setThumbnail(Thumbnail thumbnail)
setThumbnail in interface IThumbnailSupportthumbnail - public Thumbnail getManagerThumbnail()
getManagerThumbnail in interface IThumbnailSupportpublic void setManagerThumbnail(Thumbnail managerThumbnail)
setManagerThumbnail in interface IThumbnailSupportmanagerThumbnail - public Thumbnail getTankThumbnail()
getTankThumbnail in interface IThumbnailSupportpublic void setTankThumbnail(Thumbnail tankThumbnail)
setTankThumbnail in interface IThumbnailSupporttankThumbnail - public void createThumbnails()
public String getDataTypeAsString()
DataTypepublic UUID getID()
IqmDataBox object.public static javax.media.jai.PlanarImage toPlanarImage(IqmDataBox iqmDataBox)
PlanarImage from the content of an
IqmDataBox.
This is a convenient method for creating images from the content before e.g. scaling the image down for a thumb nail or any other further processing.
iqmDataBox - the box, of whose content the image should be createdPlanarImage or nullIllegalArgumentException - if the parameter is nullpublic IqmDataBox clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic IDataModel getDataModel()
ImageModel, if DataType.IMAGE
PlotModel, if DataType.PLOT
TableModel, if DataType.TABLE
CustomDataModel, if DataType.CUSTOM
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.