Class AbstractFeature

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Controller controller  
      protected java.lang.String featureID  
      • 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 Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractFeature​(java.lang.String s, java.lang.String featureID, Registry registry)  
      protected AbstractFeature​(java.lang.String s, java.lang.String featureID, java.lang.String largeIconPath, Registry registry)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent actionEvent)  
      protected void addToToolBar()  
      protected void doActionPerformed​(java.awt.event.ActionEvent actionEvent)  
      void doPropertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)  
      Controller getController()  
      java.lang.String getFeatureID()  
      java.lang.String getName()  
      java.lang.String getStringValue​(java.lang.String key)  
      void initialize​(Controller controller)  
      boolean isInitialized()  
      boolean isOn()  
      boolean isTwoState()
      Indicates whether the feature can be either on or off, without any other states.
      void propertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)  
      protected java.lang.Object register​(java.lang.String featureID, Registry registry)  
      protected void setMenuAccellerator​(Controller controller)  
      void turnOn​(boolean tf)  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
    • Field Detail

      • featureID

        protected java.lang.String featureID
    • Constructor Detail

      • AbstractFeature

        protected AbstractFeature​(java.lang.String s,
                                  java.lang.String featureID,
                                  Registry registry)
      • AbstractFeature

        protected AbstractFeature​(java.lang.String s,
                                  java.lang.String featureID,
                                  java.lang.String largeIconPath,
                                  Registry registry)
    • Method Detail

      • register

        protected java.lang.Object register​(java.lang.String featureID,
                                            Registry registry)
      • getController

        public Controller getController()
      • getFeatureID

        public java.lang.String getFeatureID()
        Specified by:
        getFeatureID in interface Feature
      • getStringValue

        public java.lang.String getStringValue​(java.lang.String key)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Feature
      • isOn

        public boolean isOn()
        Specified by:
        isOn in interface Feature
      • isTwoState

        public boolean isTwoState()
        Description copied from interface: Feature
        Indicates whether the feature can be either on or off, without any other states. This is used by the tool bar and menu-bar menus to determine whether the feature's enable/disable button or menu item should be displayed with an indicator that it's either on or off. In the case of a menu the indicator is a check box. In the case of a tool bar button the indicator is a dot above the button.
        Specified by:
        isTwoState in interface Feature
        Returns:
        true if the feature has only two states, otherwise off.
      • turnOn

        public void turnOn​(boolean tf)
        Specified by:
        turnOn in interface Feature
      • addToToolBar

        protected void addToToolBar()
      • setMenuAccellerator

        protected void setMenuAccellerator​(Controller controller)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • doActionPerformed

        protected void doActionPerformed​(java.awt.event.ActionEvent actionEvent)
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • doPropertyChange

        public void doPropertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)