355 |
*/ |
*/ |
356 |
public Dimension getPreferredSize(JComponent c) |
public Dimension getPreferredSize(JComponent c) |
357 |
{ |
{ |
358 |
return getPreferredMenuItemSize(c, checkIcon, arrowIcon, defaultTextIconGap); |
return getPreferredMenuItemSize(c, checkIcon, arrowIcon, |
359 |
|
defaultTextIconGap); |
360 |
} |
} |
361 |
|
|
362 |
protected String getPropertyPrefix() |
protected String getPropertyPrefix() |
533 |
SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign, |
SwingUtilities.layoutCompoundLabel(m, fm, null, checkIcon, vertAlign, |
534 |
horAlign, vertTextPos, horTextPos, |
horAlign, vertTextPos, horTextPos, |
535 |
vr, cr, tr, defaultTextIconGap); |
vr, cr, tr, defaultTextIconGap); |
536 |
checkIcon.paintIcon(m, g, cr.x, cr.y); |
if (m.isSelected()) |
537 |
|
checkIcon.paintIcon(m, g, cr.x, cr.y); |
538 |
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
539 |
|
defaults.getBorder("CheckBox.border").paintBorder(m, g, cr.x, cr.y, |
540 |
|
cr.width, cr.height); |
541 |
|
|
542 |
// We need to calculate position of the menu text and position of |
// We need to calculate position of the menu text and position of |
543 |
// user menu icon if there exists one relative to the check icon. |
// user menu icon if there exists one relative to the check icon. |