C
- the script context typepublic class DefaultSwingScriptHelper<C extends ScriptContext> extends DefaultScriptHelper
context
Constructor and Description |
---|
DefaultSwingScriptHelper(C context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
askForBooleanProperty(java.lang.String desc)
Ask the user for a boolean property to set.
|
java.lang.String |
askForEnumProperty(java.lang.String desc)
Ask the user for a boolean property to set.
|
java.lang.Float |
askForFloatProperty(java.lang.String desc,
float minValue,
float maxValue,
float step)
Ask the user for a float property to set.
|
java.lang.Integer |
askForIntProperty(java.lang.String desc,
int minValue,
int maxValue,
int step)
Ask the user for an int property to set.
|
java.lang.String |
askForNotNullProperty(java.lang.String desc)
Ask the user for a property to set, making sure that the result is never null even if the user cancel the dialog.
|
java.lang.String |
askForProperty(java.lang.String desc)
Ask the user for a String property to set.
|
static java.util.Set<java.lang.String> |
getImports()
Return the imports.
|
PropertySetter |
getPropertySetter(java.lang.String title)
Return a PropertySetter, which allows to set several values at once.
|
getContext
public DefaultSwingScriptHelper(C context)
context
- the script contextpublic java.lang.String askForNotNullProperty(java.lang.String desc)
desc
- the prompt to set the propertypublic java.lang.String askForProperty(java.lang.String desc)
desc
- the prompt to set the propertypublic java.lang.Integer askForIntProperty(java.lang.String desc, int minValue, int maxValue, int step)
desc
- the prompt to set the propertyminValue
- the minimum valuemaxValue
- the maximum valuestep
- the steppublic java.lang.Float askForFloatProperty(java.lang.String desc, float minValue, float maxValue, float step)
desc
- the prompt to set the propertyminValue
- the minimum valuemaxValue
- the maximum valuestep
- the steppublic java.lang.Boolean askForBooleanProperty(java.lang.String desc)
desc
- the prompt to set the propertypublic java.lang.String askForEnumProperty(java.lang.String desc)
desc
- the prompt to set the propertypublic PropertySetter getPropertySetter(java.lang.String title)
title
- the associated Dialog titlepublic static java.util.Set<java.lang.String> getImports()
Copyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence