public class IlvPaletteSymbolParameter extends IlvPaletteBaseObject
IlvPaletteSymbol
).Constructor and Description |
---|
IlvPaletteSymbolParameter()
Default constructor.
|
IlvPaletteSymbolParameter(String id,
Object value,
String type,
String editor)
Creates a symbol parameter and initialize it with specified values.
|
Modifier and Type | Method and Description |
---|---|
IlvPaletteSymbolParameter |
copy()
Makes a copy of this symbol parameter.
|
protected IlvPaletteBaseObject |
copy(IlvPaletteBaseObject owner)
Makes a copy of this object.
|
protected IlvPaletteBaseObject |
createNew()
Allocates a new object of the same type.
|
String |
getEditorClassName()
Returns the class name of the editor that may be used to edit the value.
|
IlvPalette |
getPalette()
Returns the palette of the symbol the parameter belongs to.
|
PropertyEditor |
getPropertyEditor()
Allocates and returns the property editor for the parameter.
|
IlvPaletteSymbol |
getSymbol()
Returns the symbol the parameter belongs to.
|
String |
getType()
Returns the class name of the type of the value.
|
Object |
getValue()
Returns the value of the parameters.
|
IlvPaletteSymbolParameterValueSet |
getValueSet()
Returns the value set allowed for this symbol parameter.
|
boolean |
isReadOnly()
Returns
true if this symbol parameter is considered a read
only parameter. |
boolean |
isVisible()
Returns
true if this symbol parameter is considered visible. |
void |
setEditorClassName(String editorClassName)
Sets the class name of the editor used to edit parameter's value.
|
void |
setID(String id)
Sets the ID of this parameter.
|
void |
setReadOnly(boolean enable)
Sets whether this symbol parameter is considered a read only parameter.
|
void |
setShortDescription(Locale locale,
String description)
Sets the short description of the object for a given locale.
|
void |
setType(String type)
Sets the class name of the value type
|
void |
setValue(Object value)
Sets the value of this parameter.
|
void |
setValueSet(IlvPaletteSymbolParameterValueSet vset)
Returns the value set allowed for this symbol parameter.
|
void |
setVisible(boolean visible)
Sets whether this symbol parameter is considered visible.
|
void |
startEditingValueSet()
Starts an editing session of the value set.
|
void |
stopEditingValueSet()
Stops an editing session of the value set.
|
getBaseObjectOwner, getDefaultLocale, getFullID, getID, getLongDescription, getLongDescription, getName, getName, getOwner, getShortDescription, getShortDescription, setDefaultLocale, setLongDescription, setLongDescription, setName, setName, setOwner, setShortDescription
public IlvPaletteSymbolParameter()
public IlvPaletteSymbolParameter(String id, Object value, String type, String editor)
id
- The id of the parameter.value
- The value.type
- The fully qualified name of the class of the value.editor
- The fully qualified name of the class of the editor used to edit
the value.public IlvPaletteSymbolParameter 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 IlvPaletteSymbol getSymbol()
public IlvPalette getPalette()
public void setID(String id)
setID
in class IlvPaletteBaseObject
id
- the new idpublic void setShortDescription(Locale locale, String description)
setShortDescription
in class IlvPaletteBaseObject
locale
- the locale used to store the descriptiondescription
- the new descriptionpublic String getType()
getValue()
public void setType(String type)
type
- the fully qualified name of the class. The usual shortcuts "int",
"boolean", etc. for the primitive types are also allowed.setValue(Object)
public Object getValue()
getType()
methodgetType()
public void setValue(Object value)
setType(String type)
method.value
- The new value.setType(String)
public boolean isReadOnly()
true
if this symbol parameter is considered a read
only parameter. Functionally, all parameters are writable. If the read only
flag is set, it only means that the parameter appears non-editable in
customizers and property sheets that control the symbol. But you will still
be able to change the parameter by code.public void setReadOnly(boolean enable)
public boolean isVisible()
true
if this symbol parameter is considered visible.
If the visible flag is set to false
, it only means that the
parameter does not appear in customizers and property sheets that control
the symbol.public void setVisible(boolean visible)
false
,
it only means that the parameter does not appear in customizers and
property sheets that control the symbol.public String getEditorClassName()
null
.public void setEditorClassName(String editorClassName)
editorClassName
- The fully qualified name of the desired classpublic PropertyEditor getPropertyEditor()
If the parameter has an editor class name, a new instance of this editor
class is allocated. If the parameter has a value set, a tagged property
editor for the value set is returned. Otherwise, null
is
returned.
public void setValueSet(IlvPaletteSymbolParameterValueSet vset)
getType()
,
null
is returned.
For instance, if the parameter allows all integer values, then
getType()
returns "int" and getValueSet()
returns
null
. However, if the parameter allows only the integer values
3, 7, 19, then getType()
returns "int" and getValueSet()
returns a value set containing the values 3, 7, 19.
public IlvPaletteSymbolParameterValueSet getValueSet()
getType()
,
null
is returned.
For instance, if the parameter allows all integer values, then
getType()
returns "int" and getValueSet()
returns
null
. However, if the parameter allows only the integer values
3, 7, 19, then getType()
returns "int" and getValueSet()
returns a value set containing 3, 7, 19.
public void startEditingValueSet()
param.startEditingValueSet(); try { ... changes on the value set, such as: param.getValueSet().addValue(...); ... } finally { param.stopEditingValueSet(); }Inside the
try ... finally ...
block, you should not save the
palette to file, because the data structures are not in a saveable state.
After param.stopEditingValueSet()
, you can save the palette.
stopEditingValueSet()
public void stopEditingValueSet()
startEditingValueSet()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.