Class ChangeDetectorCustomizer

  • All Implemented Interfaces:
    PanelMaticComponentCustomizer

    public class ChangeDetectorCustomizer
    extends Object
    implements PanelMaticComponentCustomizer
    Used to detect changes in multiple components. Listeners on this object are notified whenever those changes happen.
    This is very useful for, e.g, enabling a "save" button when any of a form controls changes.
    Author:
    michael
    • Method Detail

      • fireChangeEvent

        public void fireChangeEvent​(Object originalEvent)
      • getActionListener

        public ActionListener getActionListener()
        Returns:
        The action listener used to detect changes on combo boxes and toggle buttons.
      • getDocumentListener

        public DocumentListener getDocumentListener()
        Returns:
        the listener used to detect changes on text components.
      • getChangeListener

        public ChangeListener getChangeListener()
        Returns:
        the listener used to detect changes on JSliders.
      • customize

        public JComponent customize​(String labelText,
                                    JComponent aComp)
        Description copied from interface: PanelMaticComponentCustomizer
        Customize the component. Note that this method also allows for wrapping the component in a new component, or replacing it altogether.
        Specified by:
        customize in interface PanelMaticComponentCustomizer
        Parameters:
        labelText - the string for the label (or null). Useful for meta-data, as in adding a tool-tip according to it.
        aComp - the component to customize
        Returns:
        Normally the passed component; could also be a wrapping component or even a new one.