Class SetTextManager


  • public class SetTextManager
    extends SetValueManager
    Typesafe observable for objects that have a 'setText(String)' method 'setText(String)' is the call back function/event Support for JButton, JMenuItem, JLabel 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 SetTextManagerTest AND 3) run the test successfully Implemented with the non typesafe setvalue class
    Author:
    schuette
    • Constructor Summary

      Constructors 
      Constructor Description
      SetTextManager​(java.lang.String startString)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(javax.swing.AbstractButton menuItemOrButtonOrEtc)  
      void add​(javax.swing.JLabel label)  
      void setText​(java.lang.String newText)
      Added setText(newText) for easy recognition of functionality Using setValue directly is equivalent.
      • Methods inherited from class java.lang.Object

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

      • SetTextManager

        public SetTextManager​(java.lang.String startString)
        Parameters:
        startString - a default String start with. null will be replaced by empty string ""
    • Method Detail

      • add

        public void add​(javax.swing.JLabel label)
        Parameters:
        label - a label for automated setText(...)
      • add

        public void add​(javax.swing.AbstractButton menuItemOrButtonOrEtc)
        Parameters:
        menuItemOrButtonOrEtc - any type of AbstractButton like JMenuItem, JButton, ... for automated setText(...)
      • setText

        public void setText​(java.lang.String newText)
        Added setText(newText) for easy recognition of functionality Using setValue directly is equivalent.
        Parameters:
        newText - all registered clients will be receive a method call to setText(newText)