Package de.alpharogroup.behaviors
Class EnableButtonBehavior
- java.lang.Object
-
- de.alpharogroup.behaviors.EnableButtonBehavior
-
- All Implemented Interfaces:
java.util.EventListener,javax.swing.event.DocumentListener
public class EnableButtonBehavior extends java.lang.Object implements javax.swing.event.DocumentListenerThe classEnableButtonBehaviorcan 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 newEnableButtonBehavior.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangedUpdate(javax.swing.event.DocumentEvent e)voidinsertUpdate(javax.swing.event.DocumentEvent e)protected voidonChange()Callback method that can be overwritten to provide specific action on change of document.voidremoveUpdate(javax.swing.event.DocumentEvent e)
-
-
-
Constructor Detail
-
EnableButtonBehavior
public EnableButtonBehavior(javax.swing.ButtonModel buttonModel, javax.swing.text.Document document, boolean enabled)Instantiates a newEnableButtonBehavior.- Parameters:
buttonModel- the button modeldocument- the documentenabled- the enabled
-
-
Method Detail
-
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
changedUpdatein interfacejavax.swing.event.DocumentListener
-
insertUpdate
public void insertUpdate(javax.swing.event.DocumentEvent e)
- Specified by:
insertUpdatein interfacejavax.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:
removeUpdatein interfacejavax.swing.event.DocumentListener
-
-