org.esa.beam.framework.datamodel
Class BitmaskDef

java.lang.Object
  extended by com.bc.ceres.core.ExtensibleObject
      extended by org.esa.beam.framework.datamodel.ProductNode
          extended by org.esa.beam.framework.datamodel.BitmaskDef
All Implemented Interfaces:
com.bc.ceres.core.Extensible

Deprecated. since BEAM 4.7, use Mask with Mask.BandMathType instead.

@Deprecated
public class BitmaskDef
extends ProductNode

Represents a bitmask definition comprising the bitmask properties name, description, flag expression color and transparancy.

Version:
$Revision$ $Date$
Author:
Norman Fomferra

Field Summary
static String PROPERTY_NAME_COLOR
          Deprecated.  
static String PROPERTY_NAME_EXPR
          Deprecated.  
static String PROPERTY_NAME_TRANSPARENCY
          Deprecated.  
 
Fields inherited from class org.esa.beam.framework.datamodel.ProductNode
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
 
Constructor Summary
BitmaskDef(String name, String description, String expr, Color color, float transparency)
          Deprecated.  
 
Method Summary
 void acceptVisitor(ProductVisitor visitor)
          Deprecated. Accepts the given visitor.
static BitmaskDef createBitmaskDef(org.jdom.Element element)
          Deprecated.  
 BitmaskDef createCopy()
          Deprecated. Creates and returns a copy of this object.
 Mask createMask(int width, int height)
          Deprecated.  
 void dispose()
          Deprecated. Releases all of the resources used by this object instance and all of its owned children.
 boolean equals(Object object)
          Deprecated. Returns whether or not this product node equals another object.
 float getAlpha()
          Deprecated. Gets the alpha value of the bitmask, which is 1 - getTransparency().
 Color getColor()
          Deprecated. Returns the color of the bitmask.
 String getExpr()
          Deprecated. Gets the bitmask's boolean expression code.
 long getRawStorageSize(ProductSubsetDef subsetDef)
          Deprecated. Gets the size in bytes of this product node.
 float getTransparency()
          Deprecated. Gets the transparency of the bitmask.
 void setColor(Color color)
          Deprecated. Sets the color of this bitmask definition.
 void setExpr(String expr)
          Deprecated. Sets the boolean flag expression code of this BitmaskDef instance.
 void setTransparency(float transparency)
          Deprecated. Sets the transparency value.
 void updateExpression(String oldExternalName, String newExternalName)
          Deprecated. Replaces in the expression that this class contains all occurences of the oldExternalName with the given newExternalName.
 void writeXML(XmlWriter writer, int indent)
          Deprecated.  
 
Methods inherited from class org.esa.beam.framework.datamodel.ProductNode
fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setModified, setName, setOwner, toString
 
Methods inherited from class com.bc.ceres.core.ExtensibleObject
getExtension
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_NAME_COLOR

public static final String PROPERTY_NAME_COLOR
Deprecated. 
See Also:
Constant Field Values

PROPERTY_NAME_EXPR

public static final String PROPERTY_NAME_EXPR
Deprecated. 
See Also:
Constant Field Values

PROPERTY_NAME_TRANSPARENCY

public static final String PROPERTY_NAME_TRANSPARENCY
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

BitmaskDef

public BitmaskDef(String name,
                  String description,
                  String expr,
                  Color color,
                  float transparency)
Deprecated. 
Method Detail

getExpr

public String getExpr()
Deprecated. 
Gets the bitmask's boolean expression code. To create a Term use createTerm(getExpr()).

Returns:
the bitmask's boolean expression code.

setExpr

public void setExpr(String expr)
Deprecated. 
Sets the boolean flag expression code of this BitmaskDef instance. Also sets the term property if the given string representation of the expression can be compiled.

Parameters:
expr - the string representation of the expression
Throws:
IllegalArgumentException - if the expression is invalid (and not parsable)

updateExpression

public void updateExpression(String oldExternalName,
                             String newExternalName)
Deprecated. 
Replaces in the expression that this class contains all occurences of the oldExternalName with the given newExternalName.

Overrides:
updateExpression in class ProductNode
Parameters:
oldExternalName -
newExternalName -

getColor

public Color getColor()
Deprecated. 
Returns the color of the bitmask.

Returns:
the color

setColor

public void setColor(Color color)
Deprecated. 
Sets the color of this bitmask definition. A bitmask definition must allways have a color. If the given color is null the default color is set to this bitmask definition.

Parameters:
color - the color to be set

getAlpha

public float getAlpha()
Deprecated. 
Gets the alpha value of the bitmask, which is 1 - getTransparency().

Returns:
the alpha value

getTransparency

public float getTransparency()
Deprecated. 
Gets the transparency of the bitmask.

Returns:
the transparency

setTransparency

public void setTransparency(float transparency)
Deprecated. 
Sets the transparency value. The valid value range is 0.0F to 1.0F.

Parameters:
transparency - the transparency value
Throws:
IllegalArgumentException - if the given transparency value is out of range.

acceptVisitor

public void acceptVisitor(ProductVisitor visitor)
Deprecated. 
Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. The visitor pattern allows to define new operations on the product data model without the need to add more code to it. The new operation is implemented by the visitor.

Specified by:
acceptVisitor in class ProductNode
Parameters:
visitor - the visitor

equals

public boolean equals(Object object)
Deprecated. 
Returns whether or not this product node equals another object.

Overrides:
equals in class Object

createCopy

public BitmaskDef createCopy()
Deprecated. 
Creates and returns a copy of this object.

Returns:
a copy of this object

getRawStorageSize

public long getRawStorageSize(ProductSubsetDef subsetDef)
Deprecated. 
Gets the size in bytes of this product node.

Specified by:
getRawStorageSize in class ProductNode
Parameters:
subsetDef - if not null the subset may limit the size returned
Returns:
the size in bytes.

writeXML

public void writeXML(XmlWriter writer,
                     int indent)
Deprecated. 

createBitmaskDef

public static BitmaskDef createBitmaskDef(org.jdom.Element element)
Deprecated. 

dispose

public void dispose()
Deprecated. 
Releases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.

This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to dispose() are undefined.

Overrides of this method should always call super.dispose(); after disposing this instance.

Overrides:
dispose in class ProductNode

createMask

public Mask createMask(int width,
                       int height)
Deprecated. 


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.