Example usage for javax.swing JComponent addPropertyChangeListener

List of usage examples for javax.swing JComponent addPropertyChangeListener

Introduction

In this page you can find the example usage for javax.swing JComponent addPropertyChangeListener.

Prototype

public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) 

Source Link

Document

Adds a PropertyChangeListener to the listener list for a specific property.

Usage

From source file:de.unentscheidbar.validation.swing.trigger.DocumentChangeTrigger.java

@Override
public void registerSelf(JComponent component) {

    Objects.requireNonNull(component, "component");
    component.addPropertyChangeListener(DOCUMENT_PROPERTY, this);
    observeDocument(component);/*from w w w .j  av  a 2s .  c  om*/
}

From source file:org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewerControl.java

/**
 * Adds listeners to UI components.// w w w  .  j av  a 2  s  .  c  o  m
 *
 * @param component The component to attach a listener to.
 */
void attachUIListeners(JComponent component) {
    //Register listener
    if (component instanceof JTabbedPane) {
        ((JTabbedPane) component).addChangeListener(getTabbedListener());
    } else if (component instanceof JXTaskPaneContainer) {
        component.addPropertyChangeListener(JXTaskPaneContainerSingle.SELECTED_TASKPANE_PROPERTY, this);
    }
}