public class IlvPaletteSymbolParameterValueSet extends IlvPaletteBaseObject
IlvPaletteSymbolParameter.setType(java.lang.String)
)
but only a limited subset of distinct values (like an enum type).
A value set can be shared among multiple parameters.
For convenience, the value set has methods to add float values, double values and integer values. All other types must be represented as Object values.
Constructor and Description |
---|
IlvPaletteSymbolParameterValueSet(String id)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value)
Adds a double to the value set.
|
void |
addValue(float value)
Adds a float to the value set.
|
void |
addValue(int value)
Adds an integer to the value set.
|
void |
addValue(Object value)
Adds an object to the value set.
|
IlvPaletteSymbolParameterValueSet |
copy()
Makes a copy of this symbol parameter value set.
|
protected IlvPaletteBaseObject |
copy(IlvPaletteBaseObject owner)
Makes a copy of this object.
|
protected IlvPaletteBaseObject |
createNew()
Allocates a new object of the same type.
|
double[] |
getDoubleValues()
Returns the value set if it is an double value set.
|
float[] |
getFloatValues()
Returns the value set if it is an float value set.
|
int[] |
getIntValues()
Returns the value set if it is an integer value set.
|
Object[] |
getObjectValues()
Returns the value set if it is an object value set.
|
IlvPalette |
getPalette()
Returns the palette of this object.
|
PropertyEditor |
getPropertyEditor(Locale locale)
Allocates and returns a property editor for this value set.
|
String |
getType()
Returns the class name of the type of the values in the value set.
|
int |
getUsageCount()
Returns how many parameters of symbols of the palette use this
value set.
|
String |
getValueName(int index)
Returns the name of the value with given index for the default locale.
|
String |
getValueName(Locale locale,
int index)
Returns the name of the value with given index for a given locale.
|
boolean |
isSame(IlvPaletteSymbolParameterValueSet vset)
Tests whether this value set is functionally equal to the input value set.
|
void |
removeValue(double value)
Removes a double from the value set.
|
void |
removeValue(float value)
Removes a float from the value set.
|
void |
removeValue(int value)
Removes an integer from the value set.
|
void |
removeValue(Object value)
Removes an object from the value set.
|
void |
setID(String id)
Sets the identifier of this object.
|
void |
setType(String type)
Sets the class name of the value type of the value set.
|
void |
setValueName(int index,
String name)
Sets the name of the value with given index for the default locale.
|
void |
setValueName(Locale locale,
int index,
String name)
Sets the name of the value with given index for a given locale.
|
void |
setValues(double[] values)
Sets the value set as an double value set.
|
void |
setValues(float[] values)
Sets the value set as a float value set.
|
void |
setValues(int[] values)
Sets the value set as an integer value set.
|
void |
setValues(Object[] values)
Sets the value set as an object value set.
|
int |
size()
Returns the number of values of the value set.
|
getBaseObjectOwner, getDefaultLocale, getFullID, getID, getLongDescription, getLongDescription, getName, getName, getOwner, getShortDescription, getShortDescription, setDefaultLocale, setLongDescription, setLongDescription, setName, setName, setOwner, setShortDescription, setShortDescription
public IlvPaletteSymbolParameterValueSet(String id)
public IlvPaletteSymbolParameterValueSet copy()
protected IlvPaletteBaseObject copy(IlvPaletteBaseObject owner)
copy
in class IlvPaletteBaseObject
owner
- The desired owner of the copy.protected IlvPaletteBaseObject createNew()
createNew
in class IlvPaletteBaseObject
public IlvPalette getPalette()
public void setID(String id)
setID
in class IlvPaletteBaseObject
id
- the new identifier.public boolean isSame(IlvPaletteSymbolParameterValueSet vset)
vset
- The other value set.public String getType()
public void setType(String type)
addValue(Object)
or setValues(Object[])
.type
- the fully qualified name of the class.
The usual shortcuts "int", "boolean", etc.
for the primitive types are also allowed.public int[] getIntValues()
null
if it is not an integer value set.public void setValues(int[] values)
public void addValue(int value)
public void removeValue(int value)
public float[] getFloatValues()
null
if it is not an float value set.public void setValues(float[] values)
public void addValue(float value)
public void removeValue(float value)
public double[] getDoubleValues()
null
if it is not an double value set.public void setValues(double[] values)
public void addValue(double value)
public void removeValue(double value)
public Object[] getObjectValues()
null
if it is not an object value set.public void setValues(Object[] values)
public void addValue(Object value)
public void removeValue(Object value)
public int size()
public void setValueName(Locale locale, int index, String name)
locale
- the locale used to store the descriptionindex
- the index of the value in the value setname
- the name.public String getValueName(Locale locale, int index)
locale
- the localeindex
- the index of the value in the value setpublic void setValueName(int index, String name)
IlvPaletteBaseObject.setDefaultLocale(java.util.Locale)
to change the locale under which
the name is stored.index
- the index of the value in the value setname
- the nameIlvPaletteBaseObject.getDefaultLocale()
public String getValueName(int index)
IlvPaletteBaseObject.setDefaultLocale(java.util.Locale)
to change the locale under which
the name is looked up.index
- the index of the value in the value setIlvPaletteBaseObject.getDefaultLocale()
public int getUsageCount()
public PropertyEditor getPropertyEditor(Locale locale)
null
if the value set is empty, since in this case,
a property editor makes no sense.locale
- The locale where this property editor works. Can be
null
.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.