public class IlvColorAttributeFilter extends Object implements IlvMapAttributeFilter
IlvColorAttributeFilter
is an IlvMapAttributeFilter
used to add color depending on a numerical attribute value.DEFAULT_VALUE
Constructor and Description |
---|
IlvColorAttributeFilter(IlvInputStream stream)
Reads a
ColorAttributeFilter object from an
IlvInputStream . |
IlvColorAttributeFilter(String attributeName,
IlvColorEncoder encoder)
Constructs a new
IlvColorAttributeFilter object from a given
attribute name and an IntervalColorModel instance. |
Modifier and Type | Method and Description |
---|---|
Object |
get(IlvGraphic g,
String styleAttributeName)
This method is is invoked when the
IlvMapStyle instance this
object is attached to attempts to retrieve an attribute value. |
String |
getAttributeName()
Returns the attribute name given at construction time.
|
static IlvAttributeProperty |
getAttributeProperty(IlvGraphic g)
Returns a
IlvAttributeProperty instance for an
IlvGraphic object. |
IlvColorEncoder |
getEncoder()
Returns the
IlvColorEncoder object given at construction
time. |
void |
write(IlvOutputStream stream)
Writes a
ColorAttributeFilter object to an
IlvOutputStream . |
public IlvColorAttributeFilter(String attributeName, IlvColorEncoder encoder)
IlvColorAttributeFilter
object from a given
attribute name and an IntervalColorModel
instance.attributeName
- The name of the attribute to filter on.encoder
- The encoder used to colorize the graphics.public IlvColorAttributeFilter(IlvInputStream stream) throws IlvReadFileException
ColorAttributeFilter
object from an
IlvInputStream
.stream
- The stream to read from.IlvReadFileException
- if there is a problem reading from
stream
.public void write(IlvOutputStream stream) throws IOException
ColorAttributeFilter
object to an
IlvOutputStream
.write
in interface IlvPersistentObject
stream
- The stream to write to.IOException
- if there is a problem writing to stream
.public String getAttributeName()
public IlvColorEncoder getEncoder()
IlvColorEncoder
object given at construction
time.IlvColorEncoder
object given at construction
time.public static IlvAttributeProperty getAttributeProperty(IlvGraphic g)
IlvAttributeProperty
instance for an
IlvGraphic
object.g
- The graphic object to retrieve the property from.null
if no associated
property exists.public Object get(IlvGraphic g, String styleAttributeName)
IlvMapStyle
instance this
object is attached to attempts to retrieve an attribute value.
This method can return a value different from the one that is stored in the
style. The value returned depends on the metadata found in the
IlvAttributeProperty
instance stored in g
.
get
in interface IlvMapAttributeFilter
g
- The current IlvGraphic
.styleAttributeName
- The name of the attribute to be retrieved.this.DEFAULT_VALUE
if no change
is calculated.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.