Package org.eclipse.jface.util

Examples of org.eclipse.jface.util.PropertyChangeEvent


    return (null);
  }

  void firePropertyChange()
  {
    mTab.propertyChange(new PropertyChangeEvent(this, " ", " ", " "));
  }
View Full Code Here


     * @param newValue
     *            The property's new value
     */
    public void firePropertyChangeEvent(final Object source, final String name,
            final Object oldValue, final Object newValue) {
        final PropertyChangeEvent event = new PropertyChangeEvent(source, name, oldValue,
                newValue);
        final Object[] listeners = fListeners.getListeners();
        for (final Object element : listeners) {
            ((IPropertyChangeListener) element).propertyChange(event);
        }
View Full Code Here

      Object newValue) {
    final Object[] finalListeners = getListeners();
    // Do we need to fire an event.
    if (finalListeners.length > 0
        && (oldValue == null || !oldValue.equals(newValue))) {
      final PropertyChangeEvent pe = new PropertyChangeEvent(this, name,
          oldValue, newValue);
      for (int i = 0; i < finalListeners.length; ++i) {
        final IPropertyChangeListener l = (IPropertyChangeListener) finalListeners[i];
        SafeRunnable.run(new SafeRunnable(JFaceResources
            .getString("PreferenceStore.changeError")) { //$NON-NLS-1$
View Full Code Here

    protected void fireValueChanged(String property, Object oldValue,
            Object newValue) {
        if (propertyChangeListener == null) {
      return;
    }
        propertyChangeListener.propertyChange(new PropertyChangeEvent(this,
                property, oldValue, newValue));
    }
View Full Code Here

    if (newColor != null) {
        RGB oldValue = fColorValue;
        fColorValue = newColor;
        final Object[] finalListeners = getListeners();
        if (finalListeners.length > 0) {
            PropertyChangeEvent pEvent = new PropertyChangeEvent(
                    this, PROP_COLORCHANGE, oldValue, newColor);
            for (int i = 0; i < finalListeners.length; ++i) {
                IPropertyChangeListener listener = (IPropertyChangeListener) finalListeners[i];
                listener.propertyChange(pEvent);
            }
View Full Code Here

    Object[] array = propertyChangeListeners.getListeners();
    for (int i = 0; i < array.length; i++) {
      final IPropertyChangeListener l = (IPropertyChangeListener) array[i];
      SafeRunnable.run(new SafeRunnable() {
        public void run() {
          l.propertyChange(new PropertyChangeEvent(this, actionId,
              null, null));
        }
      });
    }
  }
View Full Code Here

              .getCommand(commandId);
          final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(
              command, null);
          if (event.isActiveBindingsChangedFor(parameterizedCommand)) {
            Object value = entry.getValue();
            PropertyChangeEvent propertyChangeEvent = new PropertyChangeEvent(event
                .getManager(), IAction.TEXT, null, null);
            if (value instanceof ListenerList) {
              Object[] listeners= ((ListenerList) value).getListeners();
              for (int i = 0; i < listeners.length; i++) {
                final IPropertyChangeListener listener = (IPropertyChangeListener) listeners[i];
View Full Code Here

   
        if (listeners.length == 0) {
      return;
    }
   
        final PropertyChangeEvent event = new PropertyChangeEvent(this,
                changeId, oldValue, newValue);
    Runnable notifier = new Runnable() {
      public void run() {
        for (int i = 0; i < listeners.length; i++) {
          final IPropertyChangeListener listener = (IPropertyChangeListener) listeners[i];
View Full Code Here

     * @since 3.2
     */
  private void firePropertyChange(IWorkingSet newWorkingSet, IWorkingSet oldWorkingSet) {
    // Update viewer
        if (workingSetUpdater != null) {
            workingSetUpdater.propertyChange(new PropertyChangeEvent(this,
                    WorkingSetFilterActionGroup.CHANGE_WORKING_SET,
                    oldWorkingSet, newWorkingSet));
        }
  }
View Full Code Here

   
    /**
   * @since 3.3
   */
    protected void firePartPropertyChanged(String key, String oldValue, String newValue) {
      final PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
      Object[] l = partChangeListeners.getListeners();
      for (int i = 0; i < l.length; i++) {
      try {
        ((IPropertyChangeListener)l[i]).propertyChange(event);
      } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.util.PropertyChangeEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.