org.pietschy.command
Class MacFaceRenderer
- FaceRenderer
public class MacFaceRenderer
The MacFaceRender extends
DefaultFaceRenderer
to provide Mac specific rendering of
buttons and menus. In particular this renderer ensures.
- Ignores icons on menus
- Ignores mnemonics on both buttons and menus
- Configures the client properties as specified by faces
- Configures the client properties of the buttons created by the members of ToggleGroups.
configureAccelerator , configureButton , configureIcons , configureMenu , configureMnemonic , configureText , configureTextPosition , configureToolTip , getDefaultGroupIcon , getFace , setDefaultGroupIcon |
isButtonMnemonicsEnabled
public static boolean isButtonMnemonicsEnabled()
Checks if the renderer will be configuring mnemonics on buttons.
- true if the buttons mnemonics are enabled, false otherwise.
isMenuMnemonicsEnabled
public static boolean isMenuMnemonicsEnabled()
Checks if the renderer will be configuring mnemonics on menu items.
- true if the menu mnemonics are enabled, false otherwise.
isToolbar
public boolean isToolbar(RenderContext buttonContext)
Checks the the current button context is rendering a toolbar. This simply checks that
the parent groups isn't null and that the button face is
Face.TOOLBAR
.
- true if the button has a toolbar face and is being rendered as part of
a group.
setButtonMnemonicsEnabled
public static void setButtonMnemonicsEnabled(boolean buttonMnemonicsEnabled)
Sets if the renderer will be configuring mnemonics on buttons.
buttonMnemonicsEnabled
- true if the buttons mnemonics are enabled, false otherwise.
setMenuMnemonicsEnabled
public static void setMenuMnemonicsEnabled(boolean menuMnemonicsEnabled)
Sets if the renderer will be configuring mnemonics on menu items.
menuMnemonicsEnabled
- true if the menu mnemonics are enabled, false otherwise.
shouldDisplayMnemonic
protected boolean shouldDisplayMnemonic(AbstractButton button)
Returns false.
button
- the button to check.