Class AbstractSystemAction

    • Constructor Detail

      • AbstractSystemAction

        protected AbstractSystemAction​(String name,
                                       KeyStroke acceleratorKey,
                                       String iconResource)
    • Method Detail

      • actionPerformed

        public void actionPerformed​(ActionEvent e)
        Invoked when an action occurs. The method is implemented as follows:
         if (isExecutable()) {
             execute();
         }
         updateState();
         
        Parameters:
        e - The action event.
        See Also:
        isExecutable(), execute(), updateState()
      • isExecutable

        public abstract boolean isExecutable()
      • execute

        public abstract void execute()
      • updateState

        public void updateState()
        Invoked to update this action's state, usually in reponse to some application specific events. The method is implemented as follows:
         boolean executable = isExecutable();
         setEnabled(executable);