Пример #1
0
 protected void fireChangeListeners() {
   if (changeListeners == null) return;
   for (int a = 0; a < changeListeners.size(); a++) {
     ChangeListener l = (ChangeListener) changeListeners.get(a);
     try {
       l.stateChanged(new ChangeEvent(this));
     } catch (RuntimeException e) {
       e.printStackTrace();
     }
   }
 }
Пример #2
0
 /**
  * Remove a <code>ChangeListener</code> so it is no longer notified when the selected color
  * changes.
  */
 public void removeChangeListener(ChangeListener l) {
   if (changeListeners == null) return;
   changeListeners.remove(l);
 }
Пример #3
0
 /**
  * This listener will be notified when the current HSB or RGB values change, depending on what
  * mode the user is in.
  */
 public void addChangeListener(ChangeListener l) {
   if (changeListeners == null) changeListeners = new Vector();
   if (changeListeners.contains(l)) return;
   changeListeners.add(l);
 }