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,
java.lang.String... params)
Ask the user for a boolean property to set.This can be used to configure the Script.
|
java.io.File |
askForFileProperty(java.lang.String desc,
int dialogType,
int fileSelectionMode,
java.io.File currentDirectory)
Ask the user for a File 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.
|
java.io.File |
getExistingDirectory(java.lang.String title)
Shows a dialog and returns the dialog selected directory.
|
java.io.File |
getExistingDirectory(java.lang.String title,
java.io.File currentDirectory)
Shows a dialog and returns the dialog selected directory.
|
java.io.File |
getExistingFile(java.lang.String title,
java.io.File currentDirectory,
java.lang.String ext)
Shows a dialog and returns the dialog selected file, which must already exist.
|
java.io.File |
getExistingFile(java.lang.String title,
java.lang.String ext)
Shows a dialog and returns the dialog selected file, which must already exist.
|
static java.util.Set<java.lang.String> |
getImports()
Return the imports.
|
java.io.File |
getNewDirectory(java.lang.String title)
Shows a dialog and returns the dialog selected directory to create.
|
java.io.File |
getNewDirectory(java.lang.String title,
java.io.File currentDirectory)
Shows a dialog and returns the dialog selected directory to create.
|
java.io.File |
getNewFile(java.lang.String title,
java.io.File currentDirectory,
java.lang.String ext)
Shows a dialog and returns the dialog selected file.The file will be created if it does not already exist.
|
java.io.File |
getNewFile(java.lang.String title,
java.lang.String ext)
Shows a dialog and returns the dialog selected file.The file will be created if it does not already exist.
|
PropertySetter |
getPropertySetter(java.lang.String title)
Return a PropertySetter, which allows to set several values at once.
|
getContextpublic DefaultSwingScriptHelper(C context)
context - the script contextpublic java.io.File getNewFile(java.lang.String title,
java.lang.String ext)
title - the dialog titleext - the file extensionpublic java.io.File getNewFile(java.lang.String title,
java.io.File currentDirectory,
java.lang.String ext)
title - the dialog titlecurrentDirectory - the current directoryext - the file extensionpublic java.io.File getExistingFile(java.lang.String title,
java.lang.String ext)
title - the dialog titleext - the file extensionpublic java.io.File getExistingFile(java.lang.String title,
java.io.File currentDirectory,
java.lang.String ext)
title - the dialog titlecurrentDirectory - the current directoryext - the file extensionpublic java.io.File getNewDirectory(java.lang.String title)
title - the dialog titlepublic java.io.File getNewDirectory(java.lang.String title,
java.io.File currentDirectory)
title - the dialog titlecurrentDirectory - the current directorypublic java.io.File getExistingDirectory(java.lang.String title)
title - the dialog titlepublic java.io.File getExistingDirectory(java.lang.String title,
java.io.File currentDirectory)
title - the dialog titlecurrentDirectory - the current directorypublic 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,
java.lang.String... params)
desc - the prompt to set the propertyparams - the String names for the enumerationpublic java.io.File askForFileProperty(java.lang.String desc,
int dialogType,
int fileSelectionMode,
java.io.File currentDirectory)
desc - the prompt to set the propertydialogType - the dialog typefileSelectionMode - the file selection modecurrentDirectory - the current directorypublic PropertySetter getPropertySetter(java.lang.String title)
title - the associated Dialog titlepublic static java.util.Set<java.lang.String> getImports()
Copyright © 2019-2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence