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

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractEffect
      extended by de.cau.cs.kieler.core.kivi.menu.MenuItemEnableStateEffect
All Implemented Interfaces:
IEffect

public class MenuItemEnableStateEffect
extends AbstractEffect

A KIELER View Management Effect to change the enable state of a menu entry. This can be used for example to switch a button from enabled to disabled state, changing its color from normal to gray and disabling any functionality of that button. The menu item is identified by the String ID of the corresponding Handler that is registered for that item. Only items created in KiVi are supported. General Eclipse menu contributions must be handled using the Command framework of Eclipse. If the id is not registered, the effect will do nothing.

Rating red

Constructor Summary
MenuItemEnableStateEffect(String menuItemID, boolean enabledState)
          Create an effect for menu item state.
 
Method Summary
 void execute()
          Execute the effect.
 
Methods inherited from class de.cau.cs.kieler.core.kivi.AbstractEffect
isMergeable, merge, schedule, scheduleUndo, toString, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuItemEnableStateEffect

public MenuItemEnableStateEffect(String menuItemID,
                                 boolean enabledState)
Create an effect for menu item state.

Parameters:
menuItemID - the menu item identifier
enabledState - the enablement state
Method Detail

execute

public void execute()
Execute the effect.