Class BeanShellFunctionMenu

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

public class BeanShellFunctionMenu extends JPopupMenu
See Also:
  • Field Details Link icon

    • COMMENT Link icon

      public static final String COMMENT
      See Also:
    • NO_HINTS Link icon

      protected static final String[] NO_HINTS
    • GENERAL_PME_HINTS Link icon

      protected static final String[] GENERAL_PME_HINTS
    • SUM_COUNT_HINTS Link icon

      protected static final String[] SUM_COUNT_HINTS
    • SUM_COUNT_MAP_HINTS Link icon

      protected static final String[] SUM_COUNT_MAP_HINTS
    • AUDIT_OPTION_HINTS Link icon

      protected static final String[] AUDIT_OPTION_HINTS
    • ATTACHMENT_INDEX_HINTS Link icon

      protected static final String[] ATTACHMENT_INDEX_HINTS
    • NAME_HINTS Link icon

      protected static final String[] NAME_HINTS
    • NAME_PME_HINTS Link icon

      protected static final String[] NAME_PME_HINTS
    • maxScrollItems Link icon

      protected static int maxScrollItems
    • configurer Link icon

      protected BeanShellExpressionConfigurer configurer
    • target Link icon

      protected EditablePiece target
  • Constructor Details Link icon

  • Method Details Link icon

    • addFunction Link icon

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

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

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

      protected void addSeparator(JMenu menu)
    • buildFunction Link icon

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

      protected void buildInteger()
    • buildString Link icon

      protected void buildString()
    • buildBoolean Link icon

      protected void buildBoolean(boolean b)
    • addOperator Link icon

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

      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 Link icon

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

      protected String getActionName(String propName)
    • getActionName Link icon

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

      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 Link icon

      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 Link icon

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

      protected int getMaxScrollItems()
    • isPieceContext Link icon

      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 Link icon

      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