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
-
Field Summary
Fields Modifier and Type Field Description protected JPaneldetailPanelprotected Icondownprotected StringConfigurererrorMessageprotected JPanelexpressionPanelprotected JButtonextraDetailsprotected static intMAX_SCROLL_ITEMSprotected static intmaxScrollItemsprotected JLabelmethodsprotected EditablePiecetargetprotected Iconupprotected VASSAL.configure.BeanShellExpressionConfigurer.Validatorvalidatorprotected JLabelvariablesFields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value -
Constructor Summary
Constructors Constructor Description BeanShellExpressionConfigurer(String key, String name)BeanShellExpressionConfigurer(String key, String name, String val)BeanShellExpressionConfigurer(String key, String name, String val, GamePiece piece) -
Method Summary
Modifier and Type Method Description protected voidaddFunction(JMenu menu, String op, String desc, String[] parms)protected voidaddOperator(JMenu menu, String op, String desc)protected voidaddPieceProps(JMenu menu, EditablePiece piece)Added the property names from an Editable Piece into their own menuprotected voidaddProp(JMenu menu, String propName)Add straight property name to a menuprotected voidaddProp(JMenu menu, String propName, boolean sort)protected voidbuildFunction(String op, String desc, String[] parmDesc)protected voidbuildGlobalMenu(JMenu parentMenu, AbstractBuildable target, boolean useParentMenu)Create a menu of Global Properties recorded in this module, based on the module build structureprotected voidbuildInteger()protected voidbuildString()protected StringcleanName(String name)protected JPopupMenucreatePopup()Build a popup menuprotected voiddoPopup()ComponentgetControls()GUI interface for setting the option in an editing windowprotected intgetMaxScrollItems()StringgetValueString()protected voidinsertName(String name)protected voidinsertPropertyName(String name)Insert a property name into the expressionprotected voidrepack()protected voidsetDetails()protected voidsetDetails(String error, List<String> v, List<String> m)voidsetValue(String s)Set the Object value from a Stringprotected voidstrip()protected voidtoggleDetails()Toggle the display of additional detailsMethods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, setName, setValue
-
Field Details
-
maxScrollItems
protected static int maxScrollItems -
MAX_SCROLL_ITEMS
protected static final int MAX_SCROLL_ITEMS- See Also:
- Constant Field Values
-
expressionPanel
-
detailPanel
-
validator
protected VASSAL.configure.BeanShellExpressionConfigurer.Validator validator -
extraDetails
-
up
-
down
-
errorMessage
-
variables
-
methods
-
target
-
-
Constructor Details
-
Method Details
-
strip
protected void strip() -
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
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Overrides:
getControlsin classStringConfigurer
-
doPopup
protected void doPopup() -
toggleDetails
protected void toggleDetails()Toggle the display of additional details -
repack
protected void repack() -
createPopup
Build a popup menu- Returns:
-
addFunction
-
buildFunction
-
buildInteger
protected void buildInteger() -
buildString
protected void buildString() -
addOperator
-
addProp
Add straight property name to a menu- Parameters:
menu- parent menupropName- property name to add
-
addProp
-
addPieceProps
Added the property names from an Editable Piece into their own menu- Parameters:
menu- parent menupiece- Piece containing property names
-
buildGlobalMenu
Create a menu of Global Properties recorded in this module, based on the module build structure -
getMaxScrollItems
protected int getMaxScrollItems() -
insertPropertyName
Insert a property name into the expression- Parameters:
name- property name
-
insertName
-
cleanName
-
setDetails
-
setDetails
protected void setDetails()
-