de.cau.cs.kieler.sim.kiem.ui
Class AimedStepDurationTextField

java.lang.Object
  extended by org.eclipse.jface.action.ContributionItem
      extended by org.eclipse.jface.action.ControlContribution
          extended by de.cau.cs.kieler.sim.kiem.ui.AimedStepDurationTextField
All Implemented Interfaces:
EventListener, IContributionItem, FocusListener, KeyListener, org.eclipse.swt.internal.SWTEventListener

public class AimedStepDurationTextField
extends ControlContribution
implements KeyListener, FocusListener

The Class AimedStepDurationTextField. This is the GUI component that shows the currently set aimed step duration for the execution. It can also be used to edit this duration.

Rating proposed yellow
(2009-01-15)

Constructor Summary
AimedStepDurationTextField(KiemPlugin kIEMParam)
          Instantiates a new aimed step duration text field.
 
Method Summary
protected  Control createControl(Composite parent)
           
 void focusGained(FocusEvent e)
          
 void focusLost(FocusEvent e)
          
 boolean isEnabled()
          Returns whether the text field is currently enabled or not.
 void keyPressed(KeyEvent e)
          
 void keyReleased(KeyEvent e)
          
 void setEnabled(boolean enabledParam)
          Enables or disables the text field.
 void update()
           
 
Methods inherited from class org.eclipse.jface.action.ControlContribution
computeWidth, fill, fill, fill
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
dispose, fill, getId, getParent, isDirty, isDynamic, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AimedStepDurationTextField

public AimedStepDurationTextField(KiemPlugin kIEMParam)
Instantiates a new aimed step duration text field.

Parameters:
kIEMParam - a reference to to the KIEM plug-in
Method Detail

setEnabled

public void setEnabled(boolean enabledParam)
Enables or disables the text field. Only sets the status if there already is a text field created by the GUI createControl.

Parameters:
enabledParam - the new status of the enableness

isEnabled

public boolean isEnabled()
Returns whether the text field is currently enabled or not.

Specified by:
isEnabled in interface IContributionItem
Overrides:
isEnabled in class ContributionItem
Returns:
true, if text field is enabled

createControl

protected Control createControl(Composite parent)
Specified by:
createControl in class ControlContribution

keyPressed

public void keyPressed(KeyEvent e)

Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)

Specified by:
keyReleased in interface KeyListener

focusLost

public void focusLost(FocusEvent e)

Specified by:
focusLost in interface FocusListener

update

public void update()
Specified by:
update in interface IContributionItem
Overrides:
update in class ContributionItem

focusGained

public void focusGained(FocusEvent e)

Specified by:
focusGained in interface FocusListener