modesteditor.core.stepsimulation
Class SimulationView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by modesteditor.core.stepsimulation.SimulationView
All Implemented Interfaces:
ISimulationListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation

public class SimulationView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.jface.viewers.ISelectionChangedListener, ISimulationListener

View class where the available transitions of the step simulation are displayed.


Field Summary
protected  org.eclipse.jface.action.Action back
           
protected  org.eclipse.jface.action.Action forward
           
protected  org.eclipse.jface.action.Action takeAlternative
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SimulationView()
           
SimulationView(SimulationRoot root)
           
 
Method Summary
 void addListener(ISimulationViewListener listener)
           
 void back()
           
 void clearSimulationListeners()
           
protected  void createActions()
           
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
protected  void createToolbar(org.eclipse.swt.widgets.Composite parent)
           
 void forward()
           
static SimulationView getView()
           
 void removeListener(ISimulationViewListener listener)
           
 void reset()
           
 void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          Method updates the selection.
 void setFocus()
           
 void setRoot(SimulationRoot root)
           
 void simulationChanged(SimulationRoot sim)
          Method gets called from the SimulationRoot after an update.
 void takeAlternative()
          Method calls the choiceTaken method from the SimuluationRoot on hand of the selection.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
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
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

takeAlternative

protected org.eclipse.jface.action.Action takeAlternative

back

protected org.eclipse.jface.action.Action back

forward

protected org.eclipse.jface.action.Action forward
Constructor Detail

SimulationView

public SimulationView(SimulationRoot root)

SimulationView

public SimulationView()
Method Detail

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

createActions

protected void createActions()

createToolbar

protected void createToolbar(org.eclipse.swt.widgets.Composite parent)

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

selectionChanged

public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Method updates the selection.

Specified by:
selectionChanged in interface org.eclipse.jface.viewers.ISelectionChangedListener

takeAlternative

public void takeAlternative()
Method calls the choiceTaken method from the SimuluationRoot on hand of the selection.


back

public void back()

forward

public void forward()

simulationChanged

public void simulationChanged(SimulationRoot sim)
Method gets called from the SimulationRoot after an update. It updates the View and checks if the simulation is finished and thus opens a MessageDialog.

Specified by:
simulationChanged in interface ISimulationListener

getView

public static SimulationView getView()

setRoot

public void setRoot(SimulationRoot root)
Parameters:
root - the root to set

addListener

public void addListener(ISimulationViewListener listener)

removeListener

public void removeListener(ISimulationViewListener listener)

clearSimulationListeners

public void clearSimulationListeners()

reset

public void reset()