Class BeanShellFunctionMenu

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement

public class BeanShellFunctionMenu extends JPopupMenu
See Also:
  • Field Details

    • COMMENT

      public static final String COMMENT
      See Also:
    • NO_HINTS

      protected static final String[] NO_HINTS
    • GENERAL_PME_HINTS

      protected static final String[] GENERAL_PME_HINTS
    • SUM_COUNT_HINTS

      protected static final String[] SUM_COUNT_HINTS
    • SUM_COUNT_MAP_HINTS

      protected static final String[] SUM_COUNT_MAP_HINTS
    • AUDIT_OPTION_HINTS

      protected static final String[] AUDIT_OPTION_HINTS
    • ATTACHMENT_INDEX_HINTS

      protected static final String[] ATTACHMENT_INDEX_HINTS
    • NAME_HINTS

      protected static final String[] NAME_HINTS
    • NAME_PME_HINTS

      protected static final String[] NAME_PME_HINTS
    • maxScrollItems

      protected static int maxScrollItems
    • configurer

      protected BeanShellExpressionConfigurer configurer
    • target

      protected EditablePiece target
  • Constructor Details

  • Method Details

    • addFunction

      protected void addFunction(JMenu menu, String op, String desc, String[] parms, String parmInfo)
    • addFunction

      protected void addFunction(JMenu menu, String op, String desc, String[] parms, String parmInfo, String[] hints)
    • addFunction

      protected void addFunction(JMenu menu, String op, String desc, String[] parms, String parmInfo, String[] hints, BeanShellExpressionConfigurer.Option[] options)
    • addSeparator

      protected void addSeparator(JMenu menu)
    • buildFunction

      protected void buildFunction(String op, String desc, String[] parmDesc, String[] hints, BeanShellExpressionConfigurer.Option[] options)
    • buildInteger

      protected void buildInteger()
    • buildString

      protected void buildString()
    • buildBoolean

      protected void buildBoolean(boolean b)
    • addOperator

      protected void addOperator(JMenu menu, String op, String desc)
    • addProp

      protected void addProp(JMenu menu, String propName, VASSAL.configure.BeanShellFunctionMenu.PropertyType propertyType)
      Add straight property name to a menu
      Parameters:
      menu - parent menu
      propName - property name to add
    • insertMenuItem

      protected void insertMenuItem(JMenu menu, String name, JMenuItem item)
    • getActionName

      protected String getActionName(String propName)
    • getActionName

      protected String getActionName(String propName, boolean zoneCurrentMapOverride)
    • addPieceProps

      protected void addPieceProps(JMenu menu, EditablePiece piece)
      Added the property names from an Editable Piece into their own menu
      Parameters:
      menu - parent menu
      piece - Piece containing property names
    • addGenericPiecePropMenu

      protected void addGenericPiecePropMenu(JMenu menu)
      Create a menu of Generic Piece properties applicable to any piece Include properties for all possible traits. provide placeholder names for variably named properties
      Parameters:
      menu -
    • buildGlobalMenu

      protected void buildGlobalMenu(JMenu parentMenu, AbstractBuildable target, boolean useParentMenu)
    • getMaxScrollItems

      protected int getMaxScrollItems()
    • isPieceContext

      protected boolean isPieceContext()
      Do we include piece-specific functions in the Function Menu? Only if a) An EditablePiece has been supplied as the target OR b) The calling BeanShellExpressionConfigurer is for a Property Match Expression (since PME get executed on Pieces)
      Returns:
      true if we show piece specific functions
    • requiresGenericPiecePropertyMenu

      protected boolean requiresGenericPiecePropertyMenu()
      Does this builder need a Generic piece property menu added to the drop-down. Needed when we are building an expression on a Piece that is not currently being edited - Needed for all PME's - Needed if the context level is PIECE, but we are not currently editing a piece
      Returns:
      true if a generic piece property Menu is required