1 21 24 package org.lobobrowser.util; 25 26 import java.util.EventObject ; 27 import java.beans.*; 28 29 32 public class GenericPropertyChangeListener implements GenericEventListener { 33 private final PropertyChangeListener delegate; 34 35 public GenericPropertyChangeListener(PropertyChangeListener delegate) { 36 this.delegate = delegate; 37 } 38 41 public void processEvent(EventObject event) { 42 this.delegate.propertyChange((PropertyChangeEvent) event); 43 } 44 45 public boolean equals(Object other) { 46 return other instanceof GenericPropertyChangeListener && ((GenericPropertyChangeListener) other).delegate.equals(this.delegate); 47 } 48 49 public int hashCode() { 50 return this.delegate.hashCode(); 51 } 52 } 53 | Popular Tags |