Examples of PropertyChangeEvent


Examples of java.beans.PropertyChangeEvent

                    setDeviceNumber(null);
                    setDevicePath(null);
                } catch (NoSuchMethodException e) {
                    deviceFile = null;
                    throw new PropertyVetoExceptionThatNetBeansLikes(frameGrabber.getSimpleName() + " does not accept a deviceFile.",
                            new PropertyChangeEvent(this, "deviceFile", this.deviceFile, this.deviceFile = null));
                }
            }
            String oldDescription = getDescription();
            firePropertyChange("deviceFile", this.deviceFile, this.deviceFile = deviceFile);
            firePropertyChange("description", oldDescription, getDescription());
View Full Code Here

Examples of java.beans.PropertyChangeEvent

                    setDeviceNumber(null);
                    setDeviceFile(null);
                } catch (NoSuchMethodException e) {
                    devicePath = "";
                    throw new PropertyVetoExceptionThatNetBeansLikes(frameGrabber.getSimpleName() + " does not accept a devicePath.",
                            new PropertyChangeEvent(this, "devicePath", this.devicePath, this.devicePath = null));
                }
            }
            String oldDescription = getDescription();
            firePropertyChange("devicePath", this.devicePath, this.devicePath = devicePath);
            firePropertyChange("description", oldDescription, getDescription());
View Full Code Here

Examples of java.beans.PropertyChangeEvent

    }

    protected void firePropertyChange(String propertyName,
            double oldValue,
            double newValue) {
        PropertyChangeEvent changeEvent = new PropertyChangeEvent(this,
                propertyName,
                oldValue,
                newValue);
        for (PropertyChangeListener listener : listeners) {
            listener.propertyChange(changeEvent);
View Full Code Here

Examples of java.beans.PropertyChangeEvent

   */
  public Dictionary invoke(Dictionary args) throws Exception {
    Long newValue = (Long) args.get(NEW_TIME_VALUE);
        Long oldValue = (Long) ((TimeStateVariable) time).getCurrentValue();
    ((TimeStateVariable) time).setCurrentTime(newValue.longValue());
        ClockDevice.notifier.propertyChange(new PropertyChangeEvent(time,"Time",oldValue,newValue));       
    args.remove(NEW_TIME_VALUE);
    args.put(NEW_RESULT_VALUE,((TimeStateVariable) time).getCurrentTime());
    return args;
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

  public void update() {
    Clock clock = Clock.getInstance();
    Calendar cal = clock.getCalendar();
        Date date = cal.getTime();
        UPnPStateVariable variable =  timerService.getStateVariable("Time");
    notifier.propertyChange(new PropertyChangeEvent(variable,"Time",null,date));
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

    m_listenerList.remove(PropertyChangeListener.class, l);
  }

  public void firePropertyChangedEvent(String name, Object oldValue, Object newValue) {
    //System.out.println("[Gui Activator] fire PCE("+name+","+oldValue+","+newValue+")");
    PropertyChangeEvent event = null;
    // Guaranteed to return a non-null array
    Object[] listeners = m_listenerList.getListenerList();

    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
      if (listeners[i] == PropertyChangeListener.class) {
        // Lazily create the event:
        if (event == null) {
          event = new PropertyChangeEvent(this, name, oldValue, newValue);
        }
        ((PropertyChangeListener) listeners[i + 1]).propertyChange(event);
      }
    }
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

      currFile.delete();
      fileChooser.rescanCurrentDirectory();
      fileChooser.setSelectedFile(null);
      fileChooser.rescanCurrentDirectory();
      File selFile = fileChooser.getSelectedFile();
      propertyChange(new PropertyChangeEvent(this, JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, currFile, selFile));
    }
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

      currFile.delete();
      fileChooser.rescanCurrentDirectory();
      fileChooser.setSelectedFile(null);
      fileChooser.rescanCurrentDirectory();
      File selFile = fileChooser.getSelectedFile();
      propertyChange(new PropertyChangeEvent(this, JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, currFile, selFile));
    }
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

      currFile.delete();
      fileChooser.rescanCurrentDirectory();
      fileChooser.setSelectedFile(null);
      fileChooser.rescanCurrentDirectory();
      File selFile = fileChooser.getSelectedFile();
      propertyChange(new PropertyChangeEvent(this, JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, currFile, selFile));
    }
  }
View Full Code Here

Examples of java.beans.PropertyChangeEvent

        m_listenerList.remove(PropertyChangeListener.class, l);
    }

    protected void firePropertyChangedEvent(String name, Object oldValue, Object newValue)
    {
        PropertyChangeEvent event = null;

        // Guaranteed to return a non-null array
        Object[] listeners = m_listenerList.getListenerList();

        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2)
        {
            if (listeners[i] == PropertyChangeListener.class)
            {
                // Lazily create the event:
                if (event == null)
                {
                    event = new PropertyChangeEvent(this, name, oldValue, newValue);
                }
                ((PropertyChangeListener) listeners[i + 1]).propertyChange(event);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.