Package VASSAL.configure
Class BeanShellExpressionConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringConfigurer
VASSAL.configure.BeanShellExpressionConfigurer
A Configurer for Java Expressions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classenum describing any special processing that needs to be done for particular expression types NONE = No special handling PME = Property Match Expression handling. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FunctionBuilderprotected JPanelprotected booleanprotected Iconprotected StringConfigurerprotected JPanelprotected JButtonprotected JLabelprotected BeanShellExpressionConfigurer.Optionprotected Stringprotected EditablePieceprotected Iconprotected VASSAL.configure.BeanShellExpressionConfigurer.Validatorprotected JLabelFields inherited from class VASSAL.configure.StringConfigurer
DEFAULT_LENGHTH, length, nameField, pFields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, name, NAME_PROPERTY, noUpdate, value -
Constructor Summary
ConstructorsConstructorDescriptionBeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece)Create a labeled BeanShellConfigurer with an initial value and target pieceBeanShellExpressionConfigurer(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)BeanShellExpressionConfigurer(String val, GamePiece piece)Create an unlabeled BeanShellConfigurer with an initial value and target piece -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected voiddoPopup()GUI interface for setting the option in an editing windowprotected Componentprotected voidinsertName(String name)protected voidinsertPropertyName(String name)Insert a property name into the expressionbooleanprotected voidprotected voidvoidsetDisplayOnly(boolean displayOnly)voidsetSelectedText(String selectedText)voidSet the Object value from a Stringprotected voidstrip()protected voidIf we are the child of a FunctionBuilder, notify it we have changed.voidvalidate()Methods inherited from class VASSAL.configure.StringConfigurer
addFocusListener, buildTextField, getGrowthConstraint, removeFocusListener, requestFocus, setHighlighted, setLabelVisibile, updateHintMethods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getHint, getKey, getName, getScreenSize, getValue, isFrozen, isHighlighted, removePropertyChangeListener, repack, repack, setFrozen, setHint, setHintKey, 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
Create an unlabeled BeanShellConfigurer with an initial value and target piece- Parameters:
val- Initial expressionpiece- Target Piece
-
BeanShellExpressionConfigurer
Create a labeled BeanShellConfigurer with an initial value and target piece- Parameters:
key- Configurer Keyname- Labelval- Initial expressionpiece- Target Piece
-
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() -
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)
-