Package VASSAL.configure
Class BeanShellExpressionConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringConfigurer
VASSAL.configure.BeanShellExpressionConfigurer
public class BeanShellExpressionConfigurer extends StringConfigurer
A Configurer for Java Expressions
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BeanShellExpressionConfigurer.Option
enum describing any special processing that needs to be done for particular expression types NONE = No special handling PME = Property Match Expression handling. -
Field Summary
Fields Modifier and Type Field Description protected FunctionBuilder
builder
protected JPanel
detailPanel
protected boolean
displayOnly
protected Icon
down
protected StringConfigurer
errorMessage
protected JPanel
expressionPanel
protected JButton
extraDetails
protected JLabel
methods
protected BeanShellExpressionConfigurer.Option
option
protected String
selectedText
protected EditablePiece
target
protected Icon
up
protected VASSAL.configure.BeanShellExpressionConfigurer.Validator
validator
protected JLabel
variables
Fields inherited from class VASSAL.configure.StringConfigurer
DEFAULT_LENGHTH, length, nameField, p
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
Constructors Constructor Description BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece)
BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option)
BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, boolean displayOnly)
BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, FunctionBuilder builder)
-
Method Summary
Modifier and Type Method Description protected String
cleanName(String name)
protected void
doPopup()
Component
getControls()
GUI interface for setting the option in an editing windowBeanShellExpressionConfigurer.Option
getOption()
String
getSelectedText()
protected Component
getTopLevelAncestor()
String
getValueString()
protected void
insertName(String name)
protected void
insertPropertyName(String name)
Insert a property name into the expressionboolean
isDisplayOnly()
protected void
repack()
protected void
setDetails()
protected void
setDetails(String error, List<String> v, List<String> m)
void
setDisplayOnly(boolean displayOnly)
void
setSelectedText(String selectedText)
void
setValue(String s)
Set the Object value from a Stringprotected void
strip()
protected void
updateParentBuilder()
If we are the child of a FunctionBuilder, notify it we have changed.void
validate()
Methods inherited from class VASSAL.configure.StringConfigurer
buildTextField
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, setName, setValue
-
Field Details
-
expressionPanel
-
detailPanel
-
validator
protected VASSAL.configure.BeanShellExpressionConfigurer.Validator validator -
extraDetails
-
up
-
down
-
errorMessage
-
variables
-
methods
-
target
-
option
-
selectedText
-
displayOnly
protected boolean displayOnly -
builder
-
-
Constructor Details
-
BeanShellExpressionConfigurer
-
BeanShellExpressionConfigurer
public BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option) -
BeanShellExpressionConfigurer
public BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, FunctionBuilder builder) -
BeanShellExpressionConfigurer
public BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece, BeanShellExpressionConfigurer.Option option, boolean displayOnly)
-
-
Method Details
-
strip
protected void strip() -
getOption
-
getValueString
- Overrides:
getValueString
in classStringConfigurer
- Returns:
- a String representation of the Object value
-
setValue
Description copied from class:Configurer
Set the Object value from a String- Overrides:
setValue
in classStringConfigurer
-
getTopLevelAncestor
-
getControls
Description copied from class:Configurer
GUI interface for setting the option in an editing window- Overrides:
getControls
in classStringConfigurer
-
validate
public void validate() -
updateParentBuilder
protected void updateParentBuilder()If we are the child of a FunctionBuilder, notify it we have changed. -
doPopup
protected void doPopup() -
repack
protected void repack() -
insertPropertyName
Insert a property name into the expression- Parameters:
name
- property name
-
insertName
-
cleanName
-
setDetails
-
setDetails
protected void setDetails() -
getSelectedText
-
setSelectedText
-
isDisplayOnly
public boolean isDisplayOnly() -
setDisplayOnly
public void setDisplayOnly(boolean displayOnly)
-