this.menuItem.addFocusListener(this.substanceFocusListener);
final Set<FadeKind> toIgnore = new HashSet<FadeKind>();
// fix for issue 371 - repaint the menu bar since the
// menu is marked as flat
this.substanceFadeStateListener = new FadeStateListener(this.menuItem,
null, this.menuItem.getModel(), SubstanceCoreUtilities
.getFadeCallback(this.menuItem, this.menuItem
.getModel(), false, true, this.menuItem),
toIgnore);
this.substanceFadeStateListener.registerListeners();
// this.menuItem.getModel().addChangeListener(new ChangeListener() {
// public void stateChanged(ChangeEvent e) {
// ButtonModel bm = menuItem.getModel();
// System.out.println(menuItem.getText() + " e:" + bm.isEnabled()
// + ":a:" + bm.isArmed() + ":r:" + bm.isRollover()
// + ":p:" + bm.isPressed() + ":s:" + bm.isSelected());
// }
// });
this.substancePropertyListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (AbstractButton.MODEL_CHANGED_PROPERTY.equals(evt
.getPropertyName())) {
if (substanceFadeStateListener != null)
substanceFadeStateListener.unregisterListeners();
substanceFadeStateListener = new FadeStateListener(
menuItem,
null,
menuItem.getModel(),
SubstanceCoreUtilities
.getFadeCallback(menuItem, menuItem