Class BeanShellExpressionConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.configure.StringConfigurer
VASSAL.configure.BeanShellExpressionConfigurer
A Configurer for Java Expressions
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
enum describing any special processing that needs to be done for particular expression types NONE = No special handling PME = Property Match Expression handling.Nested classes/interfaces inherited from class VASSAL.configure.Configurer
Configurer.ContextLevel
-
Field Summary
Modifier and TypeFieldDescriptionprotected FunctionBuilder
protected JPanel
protected boolean
protected Icon
protected StringConfigurer
protected JPanel
protected JButton
protected JLabel
protected JTextArea
protected BeanShellExpressionConfigurer.Option
protected String
protected EditablePiece
protected Icon
protected VASSAL.configure.BeanShellExpressionConfigurer.Validator
protected JLabel
Fields inherited from class VASSAL.configure.StringConfigurer
DEFAULT_LENGHTH, DEFAULT_LENGTH, length, p, updateInProgress
Fields inherited from class VASSAL.configure.Configurer
changeSupport, context, contextLevel, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
ConstructorDescriptionBeanShellExpressionConfigurer
(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 TypeMethodDescriptionvoid
addFocusListener
(FocusListener listener) Add a FocusListener to the Swing Components that make up this Configurer.protected String
protected void
doPopup()
GUI interface for setting the option in an editing windowprotected Component
protected void
insertName
(String name) protected void
insertPropertyName
(String name) Insert a property name into the expressionboolean
void
removeFocusListener
(FocusListener listener) Remove a FocusListener from the Swing Components that make up this Configurer.void
Move the cursor to the first input field of this Configurerprotected void
protected void
void
setDisplayOnly
(boolean displayOnly) void
setHighlighted
(boolean highlighted) Set the highlighted status of this configurer.void
void
setSelectedText
(String selectedText) void
Set the Object value from a Stringprotected void
strip()
protected void
If we are the child of a FunctionBuilder, notify it we have changed.void
validate()
Methods inherited from class VASSAL.configure.StringConfigurer
buildTextField, getGrowthConstraint, setEnabled, setLabelVisible, updateHint
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getContext, getContextLevel, getHint, getKey, getName, getScreenSize, getValue, initCustomControls, isFrozen, isHighlighted, isPieceContext, removePropertyChangeListener, repack, repack, setContext, setContext, setContext, setContextLevel, setFrozen, setHint, setHintKey, setLabelVisibile, 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
-
nameField
-
-
Constructor Details
-
BeanShellExpressionConfigurer
-
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
-
setOption
-
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
-
requestFocus
public void requestFocus()Description copied from class:Configurer
Move the cursor to the first input field of this Configurer- Overrides:
requestFocus
in classStringConfigurer
-
setHighlighted
public void setHighlighted(boolean highlighted) Description copied from class:Configurer
Set the highlighted status of this configurer. It is up to individual Configurers to override this method and implement a suitable visual highlighting scheme Note: Cannot make this abstract as it will break custom code.- Overrides:
setHighlighted
in classStringConfigurer
- Parameters:
highlighted
- New Highlighted status
-
addFocusListener
Description copied from class:Configurer
Add a FocusListener to the Swing Components that make up this Configurer.- Overrides:
addFocusListener
in classStringConfigurer
- Parameters:
listener
- Focus Listener
-
removeFocusListener
Description copied from class:Configurer
Remove a FocusListener from the Swing Components that make up this Configurer.- Overrides:
removeFocusListener
in classStringConfigurer
- Parameters:
listener
- Focus Listener
-
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() -
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)
-