Class JmriAbstractAction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) JmriPanel cache  
      protected java.lang.Object context  
      protected WindowInterface.Hint hint  
      protected WindowInterface wi  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Detail

      • JmriAbstractAction

        public JmriAbstractAction​(java.lang.String name,
                                  WindowInterface wi)
        Enhanced constructor for placing the pane in various GUIs.
        Parameters:
        name - the name for the action; a value of null is ignored
        wi - the window interface controlling how this action is displayed
      • JmriAbstractAction

        public JmriAbstractAction​(java.lang.String name)
        Original constructor for compatibility with older menus. Assumes SDI GUI.
        Parameters:
        name - the name for the action; a value of null is ignored
    • Method Detail

      • setContext

        public void setContext​(java.lang.Object context)
        Set the context for this action. The context can be any object that an overriding class may need to complete an action. It is defined here to provide a common API for passing these objects in.
        Parameters:
        context - the context object
        Since:
        2.9.4
      • setName

        public void setName​(java.lang.String name)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
      • setParameter

        public void setParameter​(java.lang.String parameter,
                                 java.lang.String value)
      • setParameter

        public void setParameter​(java.lang.String parameter,
                                 java.lang.Object value)