public class TrianaPixelMap extends TrianaType
Modifier and Type | Field and Description |
---|---|
PixelMap |
pixelMap
Obsolete parameter kept for compatibility with older version of this class.
|
NOT_CONNECTED, NOT_READY, OUT_OF_RANGE
Constructor and Description |
---|
TrianaPixelMap()
Default constructor.
|
TrianaPixelMap(java.awt.Image image)
Constuctor using an Image
|
TrianaPixelMap(PixelMap pixelMap)
Constuctor using a PixelMap
|
TrianaPixelMap(TrianaImage trianaImage)
Constuctor using a TrianaImage
|
TrianaPixelMap(TrianaPixelMap trianaPixelMap)
Constuctor using a TrianaPixelMap
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyData(TrianaType source)
Implement the abstract copyData method of TrianaType.
|
TrianaType |
copyMe()
This is one of the most important methods of Triana data.
|
protected void |
copyParameters(TrianaType source)
Over-ride the copyParameters method to copy the parameter valid.
|
PixelMap |
getPixelMap() |
TrianaImage |
getTrianaImage() |
boolean |
isValid()
This function is used by the Op class to check if the data contained within the particular Triana Type is valid
or not.
|
void |
setPixelMap(PixelMap px)
Sets the given PixelMap into the current Object
|
protected void |
updateObsoletePointers() |
containerSize, dataExists, deleteFromContainer, getDataContainer, getFromContainer, getSequenceNumber, insertIntoContainer, inspectDataContainer, setDataContainer, setSequenceNumber
public PixelMap pixelMap
public TrianaPixelMap()
public TrianaPixelMap(PixelMap pixelMap)
pixelMap
- The input PixelMappublic TrianaPixelMap(TrianaPixelMap trianaPixelMap)
trianaPixelMap
- The input TrianaPixelMappublic TrianaPixelMap(java.awt.Image image)
image
- The input Imagepublic TrianaPixelMap(TrianaImage trianaImage)
trianaImage
- The input TrianaImagepublic boolean isValid()
public TrianaType copyMe()
To override, the programmer should not invoke the super.copyMe method. Instead, create an object of the current type and call methods copyData and copyParameters. If these have been written correctly, then they will do the copying. The code should createTool, for type YourType:
YourType y = null; try { y = (YourType)getClass().newInstance(); y.copyData( this ); y.copyParameters( this ); y.setLegend( this.getLegend() ); } catch (IllegalAccessException ee) { System.out.println("Illegal Access: " + ee.getMessage()); } catch (InstantiationException ee) { System.out.println("Couldn't be instantiated: " + ee.getMessage()); } return y;
The copied object's data should be identical to the original. The method here modifies only one item: a String indicating that the object was created as a copy is added to the description StringVector.
copyMe
in class TrianaType
protected void copyData(TrianaType source)
copyData
in class TrianaType
source
- The TrianaImage whose image is being copiedprotected void copyParameters(TrianaType source)
copyParameters
in class TrianaType
source
- The object from which the copy will be madepublic PixelMap getPixelMap()
public TrianaImage getTrianaImage()
TrianaImage
public void setPixelMap(PixelMap px)
px
- the object to be insertedprotected void updateObsoletePointers()
updateObsoletePointers
in class TrianaType