|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.MacAdapter
public final class MacAdapter
Adapter that maps Mac OS X specific system functions to Swing actions.
Nested Class Summary | |
---|---|
static class |
MacAdapter.EventHandlerAdapter
Adapter for EAWT event handlers. |
static class |
MacAdapter.NopAction
Action that does nothing. |
Constructor Summary | |
---|---|
MacAdapter()
Creates a new mac adapter that is only active if running on a mac. |
Method Summary | |
---|---|
static void |
initialize(String name)
Sets the Mac OS X application name and enables the application menu bar. |
static boolean |
isMac()
Checks if the application is running on Mac OS X. |
void |
registerAboutAction(Action action)
Registers an action for the application about menu item. |
void |
registerOpenFileAction(Action action)
Registers an action for events that prompt the application to open a file. |
void |
registerPreferencesAction(Action action)
Registers an action for the application preferences menu item. |
void |
registerQuitAction(Action action)
Registers an action for the application quit command. |
void |
setDockImage(Image image)
Sets the image displayed on the dock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MacAdapter()
Method Detail |
---|
public static boolean isMac()
true
if the application is running on Mac OS X,
false
otherwise.public static void initialize(String name)
Does nothing if the application is not running on Mac OS X.
name
- the application name to set.public void registerQuitAction(Action action)
action
- the action to execute, null
to disable handling.public void registerAboutAction(Action action)
action
- the action to execute, null
to disable handling.public void registerPreferencesAction(Action action)
action
- the action to execute, null
to disable handling.public void registerOpenFileAction(Action action)
The file to be opened is passed in to the action handler as source of the
action event in form of a String
.
action
- the action to register.public void setDockImage(Image image)
image
- the image to use as dock image.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG