|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectCategoryRecord
public class CategoryRecord
A single row in a CategoryTable. A row contains the minimal and maximal sample values,
together with the transfer function type and coefficients. Those informations can
be inferred from an existing Category, edited, then used for creating a new
Category.
The attributes in a CategoryRecord are interdependent. Invoking any setter method
may have an effect on other attributes. For example if the scale factor is changed, then
the range of values will be recomputed accordingly.
| display/geotk-widgets-swing (download) | View source code for this class |
| Constructor Summary | |
|---|---|
CategoryRecord()
Creates a new row initialized to the [0 … 255] range of sample values, with no transfer function. |
|
CategoryRecord(Category category,
Locale locale)
Creates a new row initialized to the values inferred from the given category. |
|
| Method Summary | |
|---|---|
CategoryRecord |
clone()
Returns a clone of this record. |
Category |
getCategory()
Returns the category represented by this record. |
Double |
getCoefficient(int order)
Returns a coefficient of the transfer function, or null if the category is not
quantitative. |
String |
getName()
Returns the category name. |
String |
getPaletteName()
Returns the colors, as a palette name or as a RGB code. |
NumberRange<Integer> |
getSampleRange()
Returns the range of sample values. |
TransferFunctionType |
getTransferFunctionType()
Returns the transfer function type, or null if the category is not quantitative. |
NumberRange<Double> |
getValueRange()
Returns the range of geophysics value, or null if there is no transfer function. |
boolean |
setCoefficient(int order,
double coeff)
Sets a coefficient of the transfer function. |
boolean |
setName(String name)
Sets the category name. |
boolean |
setPaletteName(String name)
Sets the colors, as a palette name or as a RGB code. |
boolean |
setSampleRange(Integer minimum,
Integer maximum)
Sets the range of sample values. |
boolean |
setTransferFunctionType(TransferFunctionType type)
Sets the transfer function type. |
boolean |
setValueRange(Number minimum,
Number maximum)
Sets the range of geophysics values. |
String |
toString()
Returns a string representation of this record, for debugging purpose. |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CategoryRecord()
public CategoryRecord(Category category,
Locale locale)
category - The category from which to infer the values.locale - The locale to use for the localization of the category name,
or null for an implementation-dependent default locale.| Method Detail |
|---|
public Category getCategory()
public String getName()
null if none.public boolean setName(String name)
name - The new category name.
true if this object changed as a result of this method call.public NumberRange<Integer> getSampleRange()
null).
public boolean setSampleRange(Integer minimum,
Integer maximum)
minimum - The new minimal sample value, or null if unchanged.maximum - The new maximal sample value, or null if unchanged.
true if this object changed as a result of this method call.public NumberRange<Double> getValueRange()
null if there is no transfer function.
If non-null, the returned range is computed from the range of sample values and the
coefficients of the transfer function.
null.
public boolean setValueRange(Number minimum,
Number maximum)
minimum - The new minimal geophysics value, or null if unchanged.maximum - The new maximal geophysics value, or null if unchanged.
true if this object changed as a result of this method call.public TransferFunctionType getTransferFunctionType()
null if the category is not quantitative.
null.public boolean setTransferFunctionType(TransferFunctionType type)
type - The new transfer function type, or null for a qualitative category.
true if this object changed as a result of this method call.
public Double getCoefficient(int order)
throws IllegalArgumentException
null if the category is not
quantitative. The coefficient to fetch is determined by the order argument.
Current implementation accepts only 0 (the offset) or 1 (the scale), but subclasses
can add higher order.
order - 0 for the offset, or 1 for the scale factor.
null.
IllegalArgumentException - If the order argument is out of bounds.
public boolean setCoefficient(int order,
double coeff)
throws IllegalArgumentException
order - 0 for the offset, or 1 for the scale factor.coeff - The new coefficient value.
true if this object changed as a result of this method call.
IllegalArgumentException - If the order argument is out of bounds.public String getPaletteName()
PaletteComboBox.getSelectedItem().
null if none.public boolean setPaletteName(String name)
PaletteComboBox.getSelectedItem().
A list of available palette names is provided by the PaletteFactory javadoc.
name - The palette name or RGB code, or null if none.
true if this object changed as a result of this method call.public CategoryRecord clone()
clone in class ObjectObject.clone()public String toString()
CategoryTable.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||