Example usage for java.beans PropertyChangeSupport PropertyChangeSupport

List of usage examples for java.beans PropertyChangeSupport PropertyChangeSupport

Introduction

In this page you can find the example usage for java.beans PropertyChangeSupport PropertyChangeSupport.

Prototype

public PropertyChangeSupport(Object sourceBean) 

Source Link

Document

Constructs a PropertyChangeSupport object.

Usage

From source file:com.dfki.av.sudplan.vis.VisualizationPanel.java

/**
 * Constructs a visualization panel of the defined
 * <code>Dimension</code>.//w  w w. j  ava 2s  . c o  m
 *
 * @param canvasSize size of the
 * <code>WorldWindowGLCanvas</code>.
 */
public VisualizationPanel(Dimension canvasSize) {
    super(new BorderLayout());

    this.wwd = new WorldWindowGLCanvas();
    this.wwd.setPreferredSize(canvasSize);

    // Create the default model as described in the current worldwind properties.
    Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    this.wwd.setModel(m);

    // Setup a select listener for the worldmap click-and-go feature
    this.wwd.addSelectListener(new ClickAndGoSelectListener(this.wwd, WorldMapLayer.class));

    ViewControlsLayer viewControlsLayer = new ViewControlsLayer();
    this.wwd.getModel().getLayers().add(viewControlsLayer);
    this.wwd.addSelectListener(new ViewControlsSelectListener(this.wwd, viewControlsLayer));
    this.add(this.wwd, BorderLayout.CENTER);

    this.progressBar = new JProgressBar(0, 100);
    this.progressBar.setVisible(false);

    this.statusBar = new StatusBar();
    this.statusBar.setEventSource(wwd);
    this.statusBar.add(progressBar);
    this.add(statusBar, BorderLayout.SOUTH);

    this.progressChange = new PropertyChangeSupport(this);

    this.layerPanel = new LayerPanel(this.wwd);
    this.wwd.getModel().addPropertyChangeListener(layerPanel);

    initCustomElevationModels();
}

From source file:com.kenai.redminenb.issue.RedmineIssue.java

public RedmineIssue(RedmineRepository repo) {
    repository = repo;
    support = new PropertyChangeSupport(this);
}

From source file:com.kenai.redminenb.issue.RedmineIssue.java

public RedmineIssue(RedmineRepository repo, String summary, String description) {
    repository = repo;/*from w  w w .j ava2s .co  m*/
    support = new PropertyChangeSupport(this);
    issue.setSubject(summary);
    issue.setDescription(description);
}

From source file:blue.orchestra.blueSynthBuilder.BSBObject.java

public void addPropertyChangeListener(PropertyChangeListener pcl) {
    if (propListeners == null) {
        propListeners = new PropertyChangeSupport(this);
    }/*from w  ww.  ja  v  a  2  s.c  om*/

    propListeners.addPropertyChangeListener(pcl);
}

From source file:BeanVector.java

/**
 * Creates a new instance of BeanVector prepopulating off a
 * collection, limited to only the desired chunk, and includes
 * PropertyChangeEvent support./*from  w  ww .j av  a  2s  .c  om*/
 * @param indexPropertyName the property name of the parent object to fire events for
 * @param changeOwner the object change events should come from
 * @param chunkSize number of objects to return
 * @param currentChunk int value of the chunk to get (zero index)
 * @param source source Collection to read from.
 */
public BeanVector(String indexPropertyName, Object changeOwner, int chunkSize, int currentChunk,
        Collection<T> source) {
    this(chunkSize, currentChunk, source);
    this.indexPropertyName = indexPropertyName;
    this.changes = new PropertyChangeSupport(changeOwner);
}

From source file:BeanArrayList.java

/**
 * Creates a new instance of BeanArrayList prepopulating off a
 * collection, limited to only the desired chunk, and includes
 * PropertyChangeEvent support.//from   www .  java 2s  .  c  o m
 * @param indexPropertyName the property name of the parent object to fire events for
 * @param changeOwner the object change events should come from
 * @param chunkSize number of objects to return
 * @param currentChunk int value of the chunk to get (zero index)
 * @param source source Collection to read from.
 */
public BeanArrayList(String indexPropertyName, Object changeOwner, int chunkSize, int currentChunk,
        Collection<T> source) {
    this(chunkSize, currentChunk, source);
    this.indexPropertyName = indexPropertyName;
    this.changes = new PropertyChangeSupport(changeOwner);
}

From source file:au.org.ala.delta.editor.DeltaEditor.java

public DeltaEditor() {
    _controllers = new ArrayList<DeltaViewController>();
    _saveEnabled = false;//w  w w  .ja  va2s  .  c  o m
    _saveAsEnabled = false;
    _closingAll = false;
    _viewSelected = false;
    _propertyChangeSupport = new PropertyChangeSupport(this);
    setLookAndFeel();
}

From source file:com.haulmont.cuba.gui.components.AbstractAction.java

@Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
    if (changeSupport == null) {
        changeSupport = new PropertyChangeSupport(this);
    }/*from   ww w  . j  av  a  2  s.c o  m*/
    changeSupport.addPropertyChangeListener(listener);
}

From source file:blue.soundObject.jmask.Parameter.java

public void addPropertyChangeListener(PropertyChangeListener pcl) {
    if (propSupport == null) {
        propSupport = new PropertyChangeSupport(this);
    }/*w  ww .j av a 2 s. c  o  m*/

    for (PropertyChangeListener listener : propSupport.getPropertyChangeListeners()) {
        if (listener == pcl) {
            return;
        }
    }
    propSupport.addPropertyChangeListener(pcl);
}

From source file:BeanVector.java

/**
 * This contructs a new BeanVector with PropertyChangeEvent support.
 * @param indexPropertyName the property name of the parent object to fire events for
 * @param changeOwner the object change events should come from
 * @param source Collection to prepopulate from.
 *///from w w w.  jav a 2  s.  c  o m
public BeanVector(String indexPropertyName, Object changeOwner, Collection<T> source) {
    this(source);
    this.indexPropertyName = indexPropertyName;
    this.changes = new PropertyChangeSupport(changeOwner);
}