Class EnableButtonBehavior

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.DocumentListener

    public class EnableButtonBehavior
    extends java.lang.Object
    implements javax.swing.event.DocumentListener
    The class EnableButtonBehavior can be added to a button and a document.
    • Constructor Summary

      Constructors 
      Constructor Description
      EnableButtonBehavior​(javax.swing.ButtonModel buttonModel, javax.swing.text.Document document, boolean enabled)
      Instantiates a new EnableButtonBehavior.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void changedUpdate​(javax.swing.event.DocumentEvent e)
      void insertUpdate​(javax.swing.event.DocumentEvent e)
      protected void onChange()
      Callback method that can be overwritten to provide specific action on change of document.
      void removeUpdate​(javax.swing.event.DocumentEvent e)
      • Methods inherited from class java.lang.Object

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

      • EnableButtonBehavior

        public EnableButtonBehavior​(javax.swing.ButtonModel buttonModel,
                                    javax.swing.text.Document document,
                                    boolean enabled)
        Instantiates a new EnableButtonBehavior.
        Parameters:
        buttonModel - the button model
        document - the document
        enabled - the enabled
    • Method Detail

      • changedUpdate

        public void changedUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        changedUpdate in interface javax.swing.event.DocumentListener
      • insertUpdate

        public void insertUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        insertUpdate in interface javax.swing.event.DocumentListener
      • onChange

        protected void onChange()
        Callback method that can be overwritten to provide specific action on change of document.
      • removeUpdate

        public void removeUpdate​(javax.swing.event.DocumentEvent e)
        Specified by:
        removeUpdate in interface javax.swing.event.DocumentListener