Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
de.ralfebert.rcputils.handler
Class ToggleHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
de.ralfebert.rcputils.handler.ToggleHandler
All Implemented Interfaces: org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2, org.eclipse.ui.commands.IElementUpdater
public abstract class ToggleHandler extends org.eclipse.core.commands.AbstractHandlerimplements org.eclipse.ui.commands.IElementUpdater
Use this handler for style="toggle" command contributions. You need to
declare a state for your command to use ToggleHandler:
<command id="somecommand" name="SomeCommand">
<state class="org.eclipse.jface.commands.ToggleState" id="STYLE"/>
</command>
The id="STYLE" was chosen because of IMenuStateIds.STYLE - maybe this will
work without any Handler foo in later Eclipse versions.
See http://www.ralfebert.de/blog/eclipsercp/togglehandler/
http://eclipsesource.com/blogs/2009/01/15/toggling-a-command-contribution/
Method Summary
java.lang.Object
execute (org.eclipse.core.commands.ExecutionEvent event)
protected abstract void
executeToggle (org.eclipse.core.commands.ExecutionEvent event,
boolean checked)
void
updateElement (org.eclipse.ui.menus.UIElement element,
java.util.Map parameters)
Update command element with toggle state
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ToggleHandler
public ToggleHandler ()
execute
public final java.lang.Object execute (org.eclipse.core.commands.ExecutionEvent event)
throws org.eclipse.core.commands.ExecutionException
Specified by: execute
in interface org.eclipse.core.commands.IHandler
Throws:
org.eclipse.core.commands.ExecutionException
executeToggle
protected abstract void executeToggle (org.eclipse.core.commands.ExecutionEvent event,
boolean checked)
updateElement
public void updateElement (org.eclipse.ui.menus.UIElement element,
java.util.Map parameters)
Update command element with toggle state
Specified by: updateElement
in interface org.eclipse.ui.commands.IElementUpdater
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD