de.cau.cs.kieler.core.kivi.menu
Class ButtonTrigger.ButtonState

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractTriggerState
      extended by de.cau.cs.kieler.core.kivi.menu.ButtonTrigger.ButtonState
All Implemented Interfaces:
ITriggerState
Enclosing class:
ButtonTrigger

public static class ButtonTrigger.ButtonState
extends AbstractTriggerState

Contains information about the last view management button pressed.

Rating red

Constructor Summary
ButtonTrigger.ButtonState()
          Default constructor.
ButtonTrigger.ButtonState(IEditorPart editorPart, String id, Map<?,?> params, boolean pushed)
          Create a new button state for the given editor and button id.
 
Method Summary
 String getButtonId()
          Get the id for the last button pressed.
 IEditorPart getEditor()
          Get the active editor associated with the button.
 Map<?,?> getParameters()
          Get the parameters of the button.
 Class<? extends ITrigger> getTriggerClass()
          Get the trigger class associated with this trigger state.
 boolean isPushedIn()
          Check if a toggle button is pushed in or not.
 boolean isPushedIn(String thebuttonId)
          Get the map of button IDs to the state of the button.
 void merge(ITriggerState previous)
          Merge this state instance with the previous instance in case of delta trigger events.
 
Methods inherited from class de.cau.cs.kieler.core.kivi.AbstractTriggerState
finish, getKeyClass, getSequenceNumber, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonTrigger.ButtonState

public ButtonTrigger.ButtonState()
Default constructor.


ButtonTrigger.ButtonState

public ButtonTrigger.ButtonState(IEditorPart editorPart,
                                 String id,
                                 Map<?,?> params,
                                 boolean pushed)
Create a new button state for the given editor and button id.

Parameters:
editorPart - the active editor
id - the button id
params - a map of button parameters
pushed - true if a toggle button is pushed in
Method Detail

getEditor

public IEditorPart getEditor()
Get the active editor associated with the button.

Returns:
the active editor

getButtonId

public String getButtonId()
Get the id for the last button pressed.

Returns:
the id

getParameters

public Map<?,?> getParameters()
Get the parameters of the button.

Returns:
a map of parameters

isPushedIn

public boolean isPushedIn()
Check if a toggle button is pushed in or not. Gives the state of the last button pressed.

Returns:
true if pushed in

getTriggerClass

public Class<? extends ITrigger> getTriggerClass()
Get the trigger class associated with this trigger state.

Returns:
the trigger class

isPushedIn

public boolean isPushedIn(String thebuttonId)
Get the map of button IDs to the state of the button. Returns false if the button Id is not registered.

Parameters:
thebuttonId - the button identifier
Returns:
the map of button IDs to the state of the button.

merge

public void merge(ITriggerState previous)
Merge this state instance with the previous instance in case of delta trigger events.

Specified by:
merge in interface ITriggerState
Overrides:
merge in class AbstractTriggerState
Parameters:
previous - the previous instance of this trigger state