/** * This method gets called when a bound property is changed. * * @param e A <code>PropertyChangeEvent</code> object describing the event source and the * property that has changed. Must not be null. * @throws NullPointerException if the parameter is null. * @since 1.5 */ public void propertyChange(PropertyChangeEvent e) { String propertyName = e.getPropertyName(); if (propertyName == "visible") { if (e.getOldValue() == Boolean.FALSE && e.getNewValue() == Boolean.TRUE) { handlePopupIsVisibleEvent(true); } else if (e.getOldValue() == Boolean.TRUE && e.getNewValue() == Boolean.FALSE) { handlePopupIsVisibleEvent(false); } } }
public void propertyChange(PropertyChangeEvent e) { String prop = e.getPropertyName(); if (prop == JFileChooser.SELECTED_FILE_CHANGED_PROPERTY) { if (isShowing()) { loadImage((File) e.getNewValue()); repaint(); } } }
// Called on EDT public void propertyChange(PropertyChangeEvent ev) { String prop = ev.getPropertyName(); if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) { ConnectionState newState = (ConnectionState) ev.getNewValue(); switch (newState) { case DISCONNECTED: synchronized (this) { long time = System.currentTimeMillis(); times.add(time); for (Sequence seq : seqs) { seq.add(Long.MIN_VALUE); } } break; } } }