163 |
Icon pressed_icon; |
Icon pressed_icon; |
164 |
|
|
165 |
/** The icon displayed when the button is disabled. */ |
/** The icon displayed when the button is disabled. */ |
166 |
Icon disabled_icon; |
Icon disabeldIcon; |
167 |
|
|
168 |
/** The icon displayed when the button is selected. */ |
/** The icon displayed when the button is selected. */ |
169 |
Icon selected_icon; |
Icon selectedIcon; |
170 |
|
|
171 |
/** The icon displayed when the button is selected but disabled. */ |
/** The icon displayed when the button is selected but disabled. */ |
172 |
Icon disabled_selected_icon; |
Icon disabledSelectedIcon; |
173 |
|
|
174 |
/** The icon displayed when the button is rolled over. */ |
/** The icon displayed when the button is rolled over. */ |
175 |
Icon rollover_icon; |
Icon rolloverIcon; |
176 |
|
|
177 |
/** The icon displayed when the button is selected and rolled over. */ |
/** The icon displayed when the button is selected and rolled over. */ |
178 |
Icon rollover_selected_icon; |
Icon rolloverSelectedIcon; |
179 |
|
|
180 |
/** The icon currently displayed. */ |
/** The icon currently displayed. */ |
181 |
Icon current_icon; |
Icon current_icon; |
183 |
/** The text displayed in the button. */ |
/** The text displayed in the button. */ |
184 |
String text; |
String text; |
185 |
|
|
186 |
|
/** The gap between icon and text, if both icon and text are non-<code>null</code>. */ |
187 |
|
int iconTextGap; |
188 |
|
|
189 |
/** The vertical alignment of the button's text and icon. */ |
/** The vertical alignment of the button's text and icon. */ |
190 |
int vert_align; |
int verticalAlignment; |
191 |
|
|
192 |
/** The horizontal alignment of the button's text and icon. */ |
/** The horizontal alignment of the button's text and icon. */ |
193 |
int hori_align; |
int horizontalAlignment; |
194 |
|
|
195 |
/** The horizontal position of the button's text relative to its icon. */ |
/** The horizontal position of the button's text relative to its icon. */ |
196 |
int hori_text_pos; |
int horizontalTextPosition; |
197 |
|
|
198 |
/** The vertical position of the button's text relative to its icon. */ |
/** The vertical position of the button's text relative to its icon. */ |
199 |
int vert_text_pos; |
int verticalTextPosition; |
200 |
|
|
201 |
/** Whether or not the button paints its border. */ |
/** Whether or not the button paints its border. */ |
202 |
boolean paint_border; |
boolean borderPainted; |
203 |
|
|
204 |
/** Whether or not the button paints its focus state. */ |
/** Whether or not the button paints its focus state. */ |
205 |
boolean paint_focus; |
boolean focusPainted; |
206 |
|
|
207 |
/** Whether or not the button fills its content area. */ |
/** Whether or not the button fills its content area. */ |
208 |
boolean content_area_filled; |
boolean contentAreaFilled; |
209 |
|
|
210 |
|
/** Whether rollover is enabled. */ |
211 |
|
boolean rollOverEnabled; |
212 |
|
|
213 |
/** The action taken when the button is clicked. */ |
/** The action taken when the button is clicked. */ |
214 |
Action action; |
Action action; |
236 |
Action. */ |
Action. */ |
237 |
PropertyChangeListener actionPropertyChangeListener; |
PropertyChangeListener actionPropertyChangeListener; |
238 |
|
|
239 |
|
/** ChangeEvent that is fired to button's ChangeEventListeners */ |
240 |
|
private ChangeEvent changeEvent = new ChangeEvent(this); |
241 |
|
|
242 |
/** Fired in a PropertyChangeEvent when the "borderPainted" property changes. */ |
/** Fired in a PropertyChangeEvent when the "borderPainted" property changes. */ |
243 |
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted"; |
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted"; |
244 |
|
|
542 |
model.addChangeListener(changeListener); |
model.addChangeListener(changeListener); |
543 |
model.addItemListener(itemListener); |
model.addItemListener(itemListener); |
544 |
|
|
545 |
hori_align = CENTER; |
horizontalAlignment = CENTER; |
546 |
hori_text_pos = TRAILING; |
horizontalTextPosition = TRAILING; |
547 |
vert_align = CENTER; |
verticalAlignment = CENTER; |
548 |
vert_text_pos = CENTER; |
verticalTextPosition = CENTER; |
549 |
paint_border = true; |
borderPainted = true; |
550 |
content_area_filled = true; |
contentAreaFilled = true; |
551 |
|
|
552 |
|
iconTextGap = 4; |
553 |
|
|
554 |
setAlignmentX(LEFT_ALIGNMENT); |
setAlignmentX(LEFT_ALIGNMENT); |
555 |
setAlignmentY(CENTER_ALIGNMENT); |
setAlignmentY(CENTER_ALIGNMENT); |
556 |
|
|
557 |
addFocusListener(new ButtonFocusListener()); |
addFocusListener(new ButtonFocusListener()); |
558 |
|
setDisplayedMnemonicIndex(-1); |
559 |
} |
} |
560 |
|
|
561 |
/** |
/** |
654 |
*/ |
*/ |
655 |
public void fireItemStateChanged(ItemEvent e) |
public void fireItemStateChanged(ItemEvent e) |
656 |
{ |
{ |
657 |
|
e.setSource(this); |
658 |
EventListener[] ll = listenerList.getListeners(ItemListener.class); |
EventListener[] ll = listenerList.getListeners(ItemListener.class); |
659 |
for (int i = 0; i < ll.length; i++) |
for (int i = 0; i < ll.length; i++) |
660 |
((ItemListener)ll[i]).itemStateChanged(e); |
((ItemListener)ll[i]).itemStateChanged(e); |
668 |
*/ |
*/ |
669 |
public void fireActionPerformed(ActionEvent e) |
public void fireActionPerformed(ActionEvent e) |
670 |
{ |
{ |
671 |
|
e.setSource(this); |
672 |
EventListener[] ll = listenerList.getListeners(ActionListener.class); |
EventListener[] ll = listenerList.getListeners(ActionListener.class); |
673 |
for (int i = 0; i < ll.length; i++) |
for (int i = 0; i < ll.length; i++) |
674 |
((ActionListener)ll[i]).actionPerformed(e); |
((ActionListener)ll[i]).actionPerformed(e); |
685 |
{ |
{ |
686 |
EventListener[] ll = listenerList.getListeners(ChangeListener.class); |
EventListener[] ll = listenerList.getListeners(ChangeListener.class); |
687 |
for (int i = 0; i < ll.length; i++) |
for (int i = 0; i < ll.length; i++) |
688 |
((ChangeListener)ll[i]).stateChanged(e); |
((ChangeListener)ll[i]).stateChanged(changeEvent); |
689 |
} |
} |
690 |
|
|
691 |
/** |
/** |
713 |
*/ |
*/ |
714 |
public void setMnemonic(char mne) |
public void setMnemonic(char mne) |
715 |
{ |
{ |
716 |
int old = getModel().getMnemonic(); |
setMnemonic((int) mne); |
|
getModel().setMnemonic(mne); |
|
|
if (old != getModel().getMnemonic()) |
|
|
{ |
|
|
firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, (int) mne); |
|
|
revalidate(); |
|
|
repaint(); |
|
|
} |
|
717 |
} |
} |
718 |
|
|
719 |
/** |
/** |
727 |
*/ |
*/ |
728 |
public void setMnemonic(int mne) |
public void setMnemonic(int mne) |
729 |
{ |
{ |
730 |
int old = mne; |
int old = getModel().getMnemonic(); |
731 |
|
|
732 |
|
if (old != mne) |
733 |
|
{ |
734 |
getModel().setMnemonic(mne); |
getModel().setMnemonic(mne); |
735 |
if (old != getModel().getMnemonic()) |
|
736 |
|
if (text != null && ! text.equals("")) |
737 |
{ |
{ |
738 |
|
// Since lower case char = upper case char for |
739 |
|
// mnemonic, we will convert both text and mnemonic |
740 |
|
// to upper case before checking if mnemonic character occurs |
741 |
|
// in the menu item text. |
742 |
|
int upperCaseMne = Character.toUpperCase((char) mne); |
743 |
|
String upperCaseText = text.toUpperCase(); |
744 |
|
setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne)); |
745 |
|
} |
746 |
|
|
747 |
firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); |
firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne); |
748 |
revalidate(); |
revalidate(); |
749 |
repaint(); |
repaint(); |
768 |
|
|
769 |
public void setDisplayedMnemonicIndex(int index) |
public void setDisplayedMnemonicIndex(int index) |
770 |
{ |
{ |
771 |
if (index < -1 || index >= text.length()) |
if (index < -1 || (text != null && index >= text.length())) |
772 |
throw new IllegalArgumentException(); |
throw new IllegalArgumentException(); |
773 |
else |
else |
774 |
mnemonicIndex = index; |
mnemonicIndex = index; |
781 |
* |
* |
782 |
* @return An index into the button's "text" property |
* @return An index into the button's "text" property |
783 |
*/ |
*/ |
784 |
public int getDisplayedMnemonicIndex(int index) |
public int getDisplayedMnemonicIndex() |
785 |
{ |
{ |
786 |
return mnemonicIndex; |
return mnemonicIndex; |
787 |
} |
} |
790 |
/** |
/** |
791 |
* Set the "rolloverEnabled" property. When rollover is enabled, and the |
* Set the "rolloverEnabled" property. When rollover is enabled, and the |
792 |
* look and feel supports it, the button will change its icon to |
* look and feel supports it, the button will change its icon to |
793 |
* rollover_icon, when the mouse passes over it. |
* rolloverIcon, when the mouse passes over it. |
794 |
* |
* |
795 |
* @param r Whether or not to enable rollover icon changes |
* @param r Whether or not to enable rollover icon changes |
796 |
*/ |
*/ |
797 |
public void setRolloverEnabled(boolean r) |
public void setRolloverEnabled(boolean r) |
798 |
{ |
{ |
799 |
boolean old = getModel().isRollover(); |
if (rollOverEnabled != r) |
|
getModel().setRollover(r); |
|
|
if (old != getModel().isRollover()) |
|
800 |
{ |
{ |
801 |
firePropertyChange(ROLLOVER_ENABLED_CHANGED_PROPERTY, old, r); |
rollOverEnabled = r; |
802 |
|
firePropertyChange(ROLLOVER_ENABLED_CHANGED_PROPERTY, !r, r); |
803 |
revalidate(); |
revalidate(); |
804 |
repaint(); |
repaint(); |
805 |
} |
} |
813 |
*/ |
*/ |
814 |
public boolean isRolloverEnabled() |
public boolean isRolloverEnabled() |
815 |
{ |
{ |
816 |
return getModel().isRollover(); |
return rollOverEnabled; |
817 |
} |
} |
818 |
|
|
819 |
/** |
/** |
861 |
*/ |
*/ |
862 |
public int getHorizontalAlignment() |
public int getHorizontalAlignment() |
863 |
{ |
{ |
864 |
return hori_align; |
return horizontalAlignment; |
865 |
} |
} |
866 |
|
|
867 |
/** |
/** |
877 |
*/ |
*/ |
878 |
public void setHorizontalAlignment(int a) |
public void setHorizontalAlignment(int a) |
879 |
{ |
{ |
880 |
int old = hori_align; |
int old = horizontalAlignment; |
881 |
hori_align = a; |
horizontalAlignment = a; |
882 |
if (old != a) |
if (old != a) |
883 |
{ |
{ |
884 |
firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a); |
firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a); |
898 |
*/ |
*/ |
899 |
public int getHorizontalTextPosition() |
public int getHorizontalTextPosition() |
900 |
{ |
{ |
901 |
return hori_text_pos; |
return horizontalTextPosition; |
902 |
} |
} |
903 |
|
|
904 |
/** |
/** |
914 |
*/ |
*/ |
915 |
public void setHorizontalTextPosition(int t) |
public void setHorizontalTextPosition(int t) |
916 |
{ |
{ |
917 |
int old = hori_text_pos; |
int old = horizontalTextPosition; |
918 |
hori_text_pos = t; |
horizontalTextPosition = t; |
919 |
if (old != t) |
if (old != t) |
920 |
{ |
{ |
921 |
firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); |
firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); |
934 |
*/ |
*/ |
935 |
public int getVerticalAlignment() |
public int getVerticalAlignment() |
936 |
{ |
{ |
937 |
return vert_align; |
return verticalAlignment; |
938 |
} |
} |
939 |
|
|
940 |
/** |
/** |
949 |
*/ |
*/ |
950 |
public void setVerticalAlignment(int a) |
public void setVerticalAlignment(int a) |
951 |
{ |
{ |
952 |
int old = vert_align; |
int old = verticalAlignment; |
953 |
vert_align = a; |
verticalAlignment = a; |
954 |
if (old != a) |
if (old != a) |
955 |
{ |
{ |
956 |
firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); |
firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, old, a); |
970 |
*/ |
*/ |
971 |
public int getVerticalTextPosition() |
public int getVerticalTextPosition() |
972 |
{ |
{ |
973 |
return vert_text_pos; |
return verticalTextPosition; |
974 |
} |
} |
975 |
|
|
976 |
/** |
/** |
986 |
*/ |
*/ |
987 |
public void setVerticalTextPosition(int t) |
public void setVerticalTextPosition(int t) |
988 |
{ |
{ |
989 |
int old = vert_text_pos; |
int old = verticalTextPosition; |
990 |
vert_text_pos = t; |
verticalTextPosition = t; |
991 |
if (old != t) |
if (old != t) |
992 |
{ |
{ |
993 |
firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); |
firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t); |
1005 |
*/ |
*/ |
1006 |
public boolean isBorderPainted() |
public boolean isBorderPainted() |
1007 |
{ |
{ |
1008 |
return paint_border; |
return borderPainted; |
1009 |
} |
} |
1010 |
|
|
1011 |
/** |
/** |
1017 |
*/ |
*/ |
1018 |
public void setBorderPainted(boolean b) |
public void setBorderPainted(boolean b) |
1019 |
{ |
{ |
1020 |
boolean old = paint_border; |
boolean old = borderPainted; |
1021 |
paint_border = b; |
borderPainted = b; |
1022 |
if (b != old) |
if (b != old) |
1023 |
{ |
{ |
1024 |
firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b); |
firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b); |
1159 |
} |
} |
1160 |
|
|
1161 |
/** |
/** |
1162 |
|
* Set the value of the {@link #iconTextGap} property. |
1163 |
|
* |
1164 |
|
* @param i The new value of the property |
1165 |
|
*/ |
1166 |
|
public void setIconTextGap(int i) |
1167 |
|
{ |
1168 |
|
int old = iconTextGap; |
1169 |
|
iconTextGap = i; |
1170 |
|
if (old != i) |
1171 |
|
{ |
1172 |
|
fireStateChanged(new ChangeEvent(this)); |
1173 |
|
revalidate(); |
1174 |
|
repaint(); |
1175 |
|
} |
1176 |
|
} |
1177 |
|
|
1178 |
|
/** |
1179 |
|
* Get the value of the {@link #iconTextGap} property. |
1180 |
|
* |
1181 |
|
* @return The current value of the property |
1182 |
|
*/ |
1183 |
|
public int getIconTextGap() |
1184 |
|
{ |
1185 |
|
return iconTextGap; |
1186 |
|
} |
1187 |
|
|
1188 |
|
/** |
1189 |
* Return the button's "margin" property, which is an {@link Insets} object |
* Return the button's "margin" property, which is an {@link Insets} object |
1190 |
* describing the distance between the button's border and its text and |
* describing the distance between the button's border and its text and |
1191 |
* icon. |
* icon. |
1260 |
*/ |
*/ |
1261 |
public Icon getDisabledIcon() |
public Icon getDisabledIcon() |
1262 |
{ |
{ |
1263 |
if (disabled_icon == null |
if (disabeldIcon == null |
1264 |
&& default_icon instanceof ImageIcon) |
&& default_icon instanceof ImageIcon) |
1265 |
disabled_icon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage())); |
disabeldIcon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage())); |
1266 |
|
|
1267 |
return disabled_icon; |
return disabeldIcon; |
1268 |
} |
} |
1269 |
|
|
1270 |
/** |
/** |
1276 |
* |
* |
1277 |
* @param disabledIcon The new "disabledIcon" property |
* @param disabledIcon The new "disabledIcon" property |
1278 |
*/ |
*/ |
1279 |
public void setDisabledIcon(Icon disabledIcon) |
public void setDisabledIcon(Icon d) |
1280 |
{ |
{ |
1281 |
disabled_icon = disabledIcon; |
disabeldIcon = d; |
1282 |
revalidate(); |
revalidate(); |
1283 |
repaint(); |
repaint(); |
1284 |
} |
} |
1294 |
*/ |
*/ |
1295 |
public boolean isFocusPainted() |
public boolean isFocusPainted() |
1296 |
{ |
{ |
1297 |
return paint_focus; |
return focusPainted; |
1298 |
} |
} |
1299 |
|
|
1300 |
/** |
/** |
1306 |
* |
* |
1307 |
* @param b The new "paintFocus" property |
* @param b The new "paintFocus" property |
1308 |
*/ |
*/ |
1309 |
public void setFocusPainted(boolean b) |
public void setFocusPainted(boolean p) |
1310 |
{ |
{ |
1311 |
boolean old = paint_focus; |
boolean old = focusPainted; |
1312 |
paint_focus = b; |
focusPainted = p; |
1313 |
|
|
1314 |
if (old != b) |
if (old != focusPainted) |
1315 |
{ |
{ |
1316 |
firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, b); |
firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, p); |
1317 |
revalidate(); |
revalidate(); |
1318 |
repaint(); |
repaint(); |
1319 |
} |
} |
1437 |
setToolTipText((String)(a.getValue(Action.SHORT_DESCRIPTION))); |
setToolTipText((String)(a.getValue(Action.SHORT_DESCRIPTION))); |
1438 |
if (a.getValue(Action.MNEMONIC_KEY) != null) |
if (a.getValue(Action.MNEMONIC_KEY) != null) |
1439 |
setMnemonic(((Integer)(a.getValue(Action.MNEMONIC_KEY))).intValue()); |
setMnemonic(((Integer)(a.getValue(Action.MNEMONIC_KEY))).intValue()); |
1440 |
|
String actionCommand = (String)(a.getValue(Action.ACTION_COMMAND_KEY)); |
1441 |
|
|
1442 |
|
// Set actionCommand to button's text by default if it is not specified |
1443 |
|
if (actionCommand != null) |
1444 |
setActionCommand((String)(a.getValue(Action.ACTION_COMMAND_KEY))); |
setActionCommand((String)(a.getValue(Action.ACTION_COMMAND_KEY))); |
1445 |
|
else |
1446 |
|
setActionCommand(getText()); |
1447 |
} |
} |
1448 |
} |
} |
1449 |
|
|
1468 |
{ |
{ |
1469 |
public void actionPerformed(ActionEvent e) |
public void actionPerformed(ActionEvent e) |
1470 |
{ |
{ |
|
e.setSource(AbstractButton.this); |
|
1471 |
AbstractButton.this.fireActionPerformed(e); |
AbstractButton.this.fireActionPerformed(e); |
1472 |
} |
} |
1473 |
}; |
}; |
1540 |
public void stateChanged(ChangeEvent e) |
public void stateChanged(ChangeEvent e) |
1541 |
{ |
{ |
1542 |
AbstractButton.this.fireStateChanged(e); |
AbstractButton.this.fireStateChanged(e); |
|
AbstractButton.this.revalidate(); |
|
1543 |
AbstractButton.this.repaint(); |
AbstractButton.this.repaint(); |
1544 |
} |
} |
1545 |
}; |
}; |
1619 |
*/ |
*/ |
1620 |
public Icon getDisabledSelectedIcon() |
public Icon getDisabledSelectedIcon() |
1621 |
{ |
{ |
1622 |
return disabled_selected_icon; |
return disabledSelectedIcon; |
1623 |
} |
} |
1624 |
|
|
1625 |
/** |
/** |
1633 |
*/ |
*/ |
1634 |
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) |
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) |
1635 |
{ |
{ |
1636 |
Icon old = disabled_selected_icon; |
Icon old = disabledSelectedIcon; |
1637 |
disabled_selected_icon = disabledSelectedIcon; |
disabledSelectedIcon = disabledSelectedIcon; |
1638 |
if (old != disabledSelectedIcon) |
if (old != disabledSelectedIcon) |
1639 |
{ |
{ |
1640 |
firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, |
firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, |
1654 |
*/ |
*/ |
1655 |
public Icon getRolloverIcon() |
public Icon getRolloverIcon() |
1656 |
{ |
{ |
1657 |
return rollover_icon; |
return rolloverIcon; |
1658 |
} |
} |
1659 |
|
|
1660 |
/** |
/** |
1664 |
* |
* |
1665 |
* @param rolloverIcon The new rollover icon |
* @param rolloverIcon The new rollover icon |
1666 |
*/ |
*/ |
1667 |
public void setRolloverIcon(Icon rolloverIcon) |
public void setRolloverIcon(Icon r) |
1668 |
{ |
{ |
1669 |
Icon old = rollover_icon; |
Icon old = rolloverIcon; |
1670 |
rollover_icon = rolloverIcon; |
rolloverIcon = r; |
1671 |
if (old != rolloverIcon) |
if (old != rolloverIcon) |
1672 |
{ |
{ |
1673 |
firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, |
firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, |
1687 |
*/ |
*/ |
1688 |
public Icon getRolloverSelectedIcon() |
public Icon getRolloverSelectedIcon() |
1689 |
{ |
{ |
1690 |
return rollover_selected_icon; |
return rolloverSelectedIcon; |
1691 |
} |
} |
1692 |
|
|
1693 |
/** |
/** |
1698 |
* |
* |
1699 |
* @param rolloverSelectedIcon The new rollover selected icon |
* @param rolloverSelectedIcon The new rollover selected icon |
1700 |
*/ |
*/ |
1701 |
public void setRolloverSelectedIcon(Icon rolloverSelectedIcon) |
public void setRolloverSelectedIcon(Icon r) |
1702 |
{ |
{ |
1703 |
Icon old = rollover_selected_icon; |
Icon old = rolloverSelectedIcon; |
1704 |
rollover_selected_icon = rolloverSelectedIcon; |
rolloverSelectedIcon = r; |
1705 |
if (old != rolloverSelectedIcon) |
if (old != rolloverSelectedIcon) |
1706 |
{ |
{ |
1707 |
firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, |
firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, |
1723 |
*/ |
*/ |
1724 |
public Icon getSelectedIcon() |
public Icon getSelectedIcon() |
1725 |
{ |
{ |
1726 |
return selected_icon; |
return selectedIcon; |
1727 |
} |
} |
1728 |
|
|
1729 |
/** |
/** |
1735 |
* |
* |
1736 |
* @param selectedIcon The new selected icon |
* @param selectedIcon The new selected icon |
1737 |
*/ |
*/ |
1738 |
public void setSelectedIcon(Icon selectedIcon) |
public void setSelectedIcon(Icon s) |
1739 |
{ |
{ |
1740 |
Icon old = selected_icon; |
Icon old = selectedIcon; |
1741 |
selected_icon = selectedIcon; |
selectedIcon = s; |
1742 |
if (old != selectedIcon) |
if (old != selectedIcon) |
1743 |
{ |
{ |
1744 |
firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, |
firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, |
1800 |
*/ |
*/ |
1801 |
public boolean isContentAreaFilled() |
public boolean isContentAreaFilled() |
1802 |
{ |
{ |
1803 |
return content_area_filled; |
return contentAreaFilled; |
1804 |
} |
} |
1805 |
|
|
1806 |
/** |
/** |
1814 |
*/ |
*/ |
1815 |
public void setContentAreaFilled(boolean b) |
public void setContentAreaFilled(boolean b) |
1816 |
{ |
{ |
1817 |
boolean old = content_area_filled; |
boolean old = contentAreaFilled; |
1818 |
content_area_filled = b; |
contentAreaFilled = b; |
1819 |
if (b != old) |
if (b != old) |
1820 |
{ |
{ |
1821 |
firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); |
firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); |