Revision 34247

View differences:

branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/editionpopupmenu/JOptionsEditionByMousePopupMenu.java
2 2

  
3 3
import java.awt.event.ActionEvent;
4 4
import java.awt.event.ActionListener;
5
import java.beans.PropertyChangeListener;
6
import java.beans.PropertyChangeSupport;
7 5
import java.io.Serializable;
8 6
import java.util.HashMap;
9 7

  
......
97 95
	// Action listener for notify (fire) some events that had happened to this component
98 96
	private ActionListener menuListener = null;
99 97

  
100
	// Listener for property change support
101
	private PropertyChangeSupport changes = new PropertyChangeSupport(this);
102

  
103 98
 	/**
104 99
	 * Default constructor 
105 100
	 */
......
253 248
		        public void actionPerformed(ActionEvent event) {
254 249
		        	// Notifies that the Visibility of this component has changed
255 250
		        	if (event.getActionCommand().equals(JOptionsEditionByMousePopupMenu.VISIBILITYCHANGED))
256
		           		changes.firePropertyChange(JOptionsEditionByMousePopupMenu.VISIBILITYCHANGED, JOptionsEditionByMousePopupMenu.DEFAULT, JOptionsEditionByMousePopupMenu.VISIBILITY);
251
						firePropertyChange(
252
								JOptionsEditionByMousePopupMenu.VISIBILITYCHANGED,
253
								JOptionsEditionByMousePopupMenu.DEFAULT,
254
								JOptionsEditionByMousePopupMenu.VISIBILITY);
257 255
		         	else // Notifies that has been clicked on an item
258
		           		changes.firePropertyChange(JOptionsEditionByMousePopupMenu.SELECTEDOPTION, JOptionsEditionByMousePopupMenu.DEFAULT, map.get(event.getActionCommand()));
256
						firePropertyChange(
257
								JOptionsEditionByMousePopupMenu.SELECTEDOPTION,
258
								JOptionsEditionByMousePopupMenu.DEFAULT,
259
								map.get(event.getActionCommand()));
259 260
		        }
260 261
		    };
261 262
		}
......
412 413
		super.setVisible(b);
413 414
		this.getMenuListener().actionPerformed(new ActionEvent(this, JOptionsEditionByMousePopupMenu.VISIBILITY, JOptionsEditionByMousePopupMenu.VISIBILITYCHANGED));
414 415
	}
415
	   
416
    /**
417
     * Adds a "Property Change Listener"
418
     */
419
    public void addPropertyChangeListener(PropertyChangeListener l) {
420
    	changes.addPropertyChangeListener(l);
421
    }
422

  
423
    /**
424
     * Removes a "Property Change Listener"
425
     */
426
    public void removePropertyChangeListener(PropertyChangeListener l) {
427
    	changes.removePropertyChangeListener(l);
428
    }    
429 416
}
branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/filterPanel/filterButtons/FilterButtonsJPanel.java
10 10
import java.awt.event.ComponentEvent;
11 11
import java.awt.event.MouseAdapter;
12 12
import java.awt.event.MouseEvent;
13
import java.beans.PropertyChangeListener;
14
import java.beans.PropertyChangeSupport;
15 13
import java.io.Serializable;
16 14
import java.text.DateFormat;
17 15
import java.util.Date;
......
103 101

  
104 102
	private JCalendarDateDialog jCalendarDateDialog = null;
105 103
	
106
	// Listener for property change support
107
	private PropertyChangeSupport changes = new PropertyChangeSupport(this);
108
	
109 104
	// Values of the events fired when has been clicked a button
110 105
	public static final int DEFAULT = 0;
111 106
	public static final int EQUAL = 1;
......
545 540
				 */
546 541
				public void actionPerformed(ActionEvent event) {
547 542
				   	// Notifies that has been clicked a button
548
		       		changes.firePropertyChange(FilterButtonsJPanel.BUTTON_CLICKED_ACTION_COMMAND, FilterButtonsJPanel.DEFAULT, map.get( ((javax.swing.JButton)event.getSource()).getText()));
543
					firePropertyChange(
544
							FilterButtonsJPanel.BUTTON_CLICKED_ACTION_COMMAND,
545
							FilterButtonsJPanel.DEFAULT,
546
							map.get(((javax.swing.JButton) event.getSource())
547
									.getText()));
549 548
		        }
550 549
		    };
551 550
		}
......
573 572
		return dateFormat;
574 573
	}
575 574

  
576
    /**
577
     * Adds a "Property Change Listener"
578
     */
579
    public void addPropertyChangeListener(PropertyChangeListener l) {
580
    	changes.addPropertyChangeListener(l);
581
    }
582

  
583
    /**
584
     * Removes a "Property Change Listener"
585
     */
586
    public void removePropertyChangeListener(PropertyChangeListener l) {
587
    	changes.removePropertyChangeListener(l);
588
    }
589

  
590 575
	/**
591 576
	 * JButton with multi line tool tip text.
592 577
	 * 

Also available in: Unified diff