Optimized status entry for Swing menus

This commit is contained in:
nathan 2017-01-25 22:38:01 +01:00
parent 1d9921c22d
commit 50076367ee

View File

@ -34,6 +34,13 @@ class SwingMenuItemStatus implements StatusPeer {
// status is ALWAYS at 0 index...
parent._native.add(_native, 0);
Font font = _native.getFont();
Font font1 = font.deriveFont(Font.BOLD);
_native.setFont(font1);
// this makes sure it can't be selected
_native.setEnabled(false);
}
@Override
@ -43,14 +50,7 @@ class SwingMenuItemStatus implements StatusPeer {
@Override
public
void run() {
Font font = _native.getFont();
Font font1 = font.deriveFont(Font.BOLD);
_native.setFont(font1);
_native.setText(menuItem.getText());
// this makes sure it can't be selected
_native.setEnabled(false);
}
});
}