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 classBeanShellExpressionConfigurer.Optionenum 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 FunctionBuilderbuilderprotected JPaneldetailPanelprotected booleandisplayOnlyprotected Icondownprotected StringConfigurererrorMessageprotected JPanelexpressionPanelprotected JButtonextraDetailsprotected JLabelmethodsprotected BeanShellExpressionConfigurer.Optionoptionprotected StringselectedTextprotected EditablePiecetargetprotected Iconupprotected VASSAL.configure.BeanShellExpressionConfigurer.Validatorvalidatorprotected JLabelvariablesFields inherited from class VASSAL.configure.StringConfigurer
DEFAULT_LENGHTH, length, nameField, pFields 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 StringcleanName(String name)protected voiddoPopup()ComponentgetControls()GUI interface for setting the option in an editing windowBeanShellExpressionConfigurer.OptiongetOption()StringgetSelectedText()protected ComponentgetTopLevelAncestor()StringgetValueString()protected voidinsertName(String name)protected voidinsertPropertyName(String name)Insert a property name into the expressionbooleanisDisplayOnly()protected voidrepack()protected voidsetDetails()protected voidsetDetails(String error, List<String> v, List<String> m)voidsetDisplayOnly(boolean displayOnly)voidsetSelectedText(String selectedText)voidsetValue(String s)Set the Object value from a Stringprotected voidstrip()protected voidupdateParentBuilder()If we are the child of a FunctionBuilder, notify it we have changed.voidvalidate()Methods inherited from class VASSAL.configure.StringConfigurer
buildTextFieldMethods 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:
getValueStringin classStringConfigurer- Returns:
- a String representation of the Object value
-
setValue
Description copied from class:ConfigurerSet the Object value from a String- Overrides:
setValuein classStringConfigurer
-
getTopLevelAncestor
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Overrides:
getControlsin 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)
-