Revision 34247 branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/filterPanel/filterButtons/FilterButtonsJPanel.java
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