Class ActionConcentrator


  • public class ActionConcentrator
    extends java.lang.Object
    This class is used to collect actions to be enabled or disabled by a sinle call.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList actions
      The collection used to store the actions of this concentrator.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionConcentrator()
      DefaultConstructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAction​(javax.swing.Action a)
      Adds the action to this concentrator.
      boolean isEnabled()
      Returns, whether all actions are disabled.
      void removeAction​(javax.swing.Action a)
      Removes the action from this concentrator.
      void setEnabled​(boolean b)
      Defines the state for all actions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • actions

        private final java.util.ArrayList actions
        The collection used to store the actions of this concentrator.
    • Constructor Detail

      • ActionConcentrator

        public ActionConcentrator()
        DefaultConstructor.
    • Method Detail

      • addAction

        public void addAction​(javax.swing.Action a)
        Adds the action to this concentrator.
        Parameters:
        a - the action to be added.
      • removeAction

        public void removeAction​(javax.swing.Action a)
        Removes the action from this concentrator.
        Parameters:
        a - the action to be removed.
      • setEnabled

        public void setEnabled​(boolean b)
        Defines the state for all actions.
        Parameters:
        b - the new state for all actions.
      • isEnabled

        public boolean isEnabled()
        Returns, whether all actions are disabled. If one action is enabled, then this method will return true.
        Returns:
        true, if at least one action is enabled, false otherwise.