de.cau.cs.kieler.core.kivi.menu
Class ButtonHandler

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.core.commands.AbstractHandler
          extended by de.cau.cs.kieler.core.kivi.menu.ButtonHandler
All Implemented Interfaces:
IHandler, IHandler2

public class ButtonHandler
extends AbstractHandler

The handler that receives commands from various view management buttons.

Rating red

Constructor Summary
ButtonHandler()
           
 
Method Summary
 Object execute(ExecutionEvent event)
          
 boolean getPushed()
          Returns the pushed status.
 void setEnabled(boolean enabled)
          Set the enabled state of this handler.
 void unload()
          Unload this ButtonHandler.
 
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
 

Constructor Detail

ButtonHandler

public ButtonHandler()
Method Detail

execute

public Object execute(ExecutionEvent event)
               throws ExecutionException

Throws:
ExecutionException

unload

public void unload()
Unload this ButtonHandler. I.e. trigger a last not-pushed state if the button was pushed before.


setEnabled

public void setEnabled(boolean enabled)
Set the enabled state of this handler. This state is used by corresponding menu contributions (buttons, menu entries, etc.) to determine the enabled state of that menu item, e.g. whether a button should be grayed out or not.

Parameters:
enabled - true iff the handler is enabled.

getPushed

public boolean getPushed()
Returns the pushed status.

Returns:
the pushed status