public class PropertySetter extends java.lang.Object implements PropertyTypes
| Modifier and Type | Class and Description |
|---|---|
static class |
PropertySetter.Property
A property definition.
|
TYPE_BOOLEAN, TYPE_ENUM, TYPE_FILE, TYPE_FLOAT, TYPE_INT, TYPE_STRING| Constructor and Description |
|---|
PropertySetter(java.lang.String dialogTitle,
ScriptContext context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEnumProperty(java.lang.String key,
java.lang.String desc,
java.lang.String... params)
Add a property to Edit, with an additional String parameter array.
|
void |
addFileProperty(java.lang.String key,
java.lang.String desc,
int dialogType,
int fileSelectionMode,
java.io.File currentDirectory)
Add a file property to Edit.
|
void |
addNumberProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.Number minValue,
java.lang.Number maxValue,
java.lang.Number step)
Add a number property to Edit.
|
void |
addProperty(java.lang.String key,
java.lang.String desc,
short type)
Add a property to Edit.
|
void |
addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.util.List<java.lang.String> params)
Add a property to Edit, with an additional String parameter list.
|
void |
addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.String... params)
Add a property to Edit, with an additional String parameter array.
|
void |
addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.String param)
Add a property to Edit, with an additional String parameter.
|
void |
askForProperties()
Show the dialog with the values editors.
|
boolean |
getBooleanProperty(java.lang.String name)
Return the boolean property with a specified name.
|
java.io.File |
getFileProperty(java.lang.String name)
Return the File property with a specified name.
|
float |
getFloatProperty(java.lang.String name,
float defaultValue)
Return the float property with a specified name.
|
int |
getIntProperty(java.lang.String name,
int defaultValue)
Return the int property with a specified name.
|
java.lang.String |
getNotNullStringProperty(java.lang.String name)
Return the String property with a specified name.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Return the map of all property values after the edition.
|
java.lang.String |
getStringProperty(java.lang.String name)
Return the String property with a specified name.
|
public PropertySetter(java.lang.String dialogTitle,
ScriptContext context)
dialogTitle - the dialog titlecontext - the ScriptContextpublic void askForProperties()
public void addProperty(java.lang.String key,
java.lang.String desc,
short type)
key - the property keydesc - the field descriptiontype - the property typepublic void addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.String param)
key - the property keydesc - the field descriptiontype - the property typeparam - the property additional parameterpublic void addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.util.List<java.lang.String> params)
key - the property keydesc - the field descriptiontype - the property typeparams - the property additional parameterspublic void addEnumProperty(java.lang.String key,
java.lang.String desc,
java.lang.String... params)
key - the property keydesc - the field descriptionparams - the property additional parameterspublic void addProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.String... params)
key - the property keydesc - the field descriptiontype - the property typeparams - the property additional parameterspublic void addNumberProperty(java.lang.String key,
java.lang.String desc,
short type,
java.lang.Number minValue,
java.lang.Number maxValue,
java.lang.Number step)
key - the property keydesc - the field descriptiontype - the property typeminValue - the property minimum valuemaxValue - the property maximum valuestep - the property steppublic void addFileProperty(java.lang.String key,
java.lang.String desc,
int dialogType,
int fileSelectionMode,
java.io.File currentDirectory)
key - the property keydesc - the field descriptiondialogType - the dialog typefileSelectionMode - the file selection modecurrentDirectory - the current directorypublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.io.File getFileProperty(java.lang.String name)
name - the name of the propertypublic boolean getBooleanProperty(java.lang.String name)
name - the name of the propertypublic java.lang.String getNotNullStringProperty(java.lang.String name)
name - the name of the propertypublic java.lang.String getStringProperty(java.lang.String name)
name - the name of the propertypublic int getIntProperty(java.lang.String name,
int defaultValue)
name - the name of the propertydefaultValue - the default valuepublic float getFloatProperty(java.lang.String name,
float defaultValue)
name - the name of the propertydefaultValue - the default valueCopyright © 2019-2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence