Class SetSelectedManager

  • Direct Known Subclasses:
    GuiSetSelectedManager

    public class SetSelectedManager
    extends SetValueManager
    Typesafe observable for objects that have a 'setSelected(boolean)' method 'setSelected(String)' is the call back function/event Support for any component like Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent is already implemented. If you need more kinds of objects i.e. classes 1) provide a SPECIFIC (not for any Object) method add(NewClass newClass), 2) provide a testcase in SetSelectedManagerTest AND 3) run the test successfully Implemented with the non typesafe setvalue class
    Version:
    1.0.0
    Author:
    ws
    • Constructor Detail

      • SetSelectedManager

        public SetSelectedManager​(boolean startValue)
        Parameters:
        startValue - a default boolean start with. null will be replaced by empty string ""
    • Method Detail

      • setSelected

        public void setSelected​(boolean startValue)
        Parameters:
        startValue - all registered clients will be receive a method call to setSelected(startValue)
      • add

        public void add​(javax.swing.AbstractButton item)
        Parameters:
        item - a component for automated setSelected(boolean) like
      • JButton
      • JMenuItem (inclusive: JCheckBoxMenuItem, JMenu, JRadioButtonMenuItem)
      • JToggleButton