latest quantum sources 2.3.2
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / wizards / PropertyChangeWizardPage.java
diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/PropertyChangeWizardPage.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/PropertyChangeWizardPage.java
new file mode 100644 (file)
index 0000000..3bdbac2
--- /dev/null
@@ -0,0 +1,58 @@
+package com.quantum.wizards;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.jface.wizard.WizardPage;
+
+
+/**
+ * @author BC
+ */
+public abstract class PropertyChangeWizardPage extends WizardPage {
+
+       protected PropertyChangeWizardPage(String pageName) {
+               super(pageName);
+       }
+
+       private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+       /**
+        * @param listener
+        */
+       public void addPropertyChangeListener(PropertyChangeListener listener) {
+               this.propertyChangeSupport.addPropertyChangeListener(listener);
+       }
+
+       /**
+        * @param listener
+        */
+       public void removePropertyChangeListener(PropertyChangeListener listener) {
+               this.propertyChangeSupport.removePropertyChangeListener(listener);
+       }
+
+       /**
+        * @param propertyName
+        * @param oldValue
+        * @param newValue
+        */
+       protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
+               this.propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
+       }
+       /**
+        * @param propertyName
+        * @param oldValue
+        * @param newValue
+        */
+       protected void firePropertyChange(String propertyName, int oldValue, int newValue) {
+               this.propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
+       }
+       /**
+        * @param propertyName
+        * @param oldValue
+        * @param newValue
+        */
+       protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
+               this.propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
+       }
+}