Class SimulationControl

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, Control, MainFrame, SimControl, AppFrame, Hidable

public class SimulationControl extends AnimationControl implements SimControl
An AnimationControl that controls the editing of parameters.
Version:
1.0
Author:
Wolfgang Christian
See Also:
  • Constructor Details

    • SimulationControl

      public SimulationControl(Simulation animation)
      Constructs a SIPAnimationControl for the given animation.
      Parameters:
      animation - Animation
  • Method Details

    • setParameterToFixed

      public void setParameterToFixed(String name, boolean fixed)
      Sets the fixed property of the given parameter. Fixed parameters can only be changed before initialization.
      Specified by:
      setParameterToFixed in interface SimControl
    • isParamterFixed

      public boolean isParamterFixed(String name)
      Determines if the given parameter is fixed and can only be changed during initialization.
      Parameters:
      name - String
      Returns:
      boolean
    • setValue

      public void setValue(String name, Object val)
      Stores an object in the control that can only be edited when the control is in initialization mode.
      Specified by:
      setValue in interface Control
      Overrides:
      setValue in class OSPControl
      Parameters:
      name -
      val -
    • setAdjustableValue

      public void setAdjustableValue(String name, Object val)
      Stores an object in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
      Parameters:
      name -
      val -
    • setValue

      public void setValue(String name, double val)
      Stores a name and a double value in the control that can only be edited when the control is in initialization mode.
      Specified by:
      setValue in interface Control
      Overrides:
      setValue in class OSPControl
      Parameters:
      name -
      val -
    • setAdjustableValue

      public void setAdjustableValue(String name, double val)
      Stores a double in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
      Parameters:
      name -
      val -
    • setValue

      public void setValue(String name, int val)
      Stores a name and an integer value in the control that can only be edited when the control is in initialization mode.
      Specified by:
      setValue in interface Control
      Overrides:
      setValue in class OSPControl
      Parameters:
      name -
      val -
    • setAdjustableValue

      public void setAdjustableValue(String name, int val)
      Stores an integer in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
      Parameters:
      name -
      val -
    • setValue

      public void setValue(String name, boolean val)
      Stores a name and a boolean value in the control that can only be edited when the control is in initialization mode.
      Specified by:
      setValue in interface Control
      Overrides:
      setValue in class OSPControl
      Parameters:
      name -
      val -
    • removeParameter

      public void removeParameter(String name)
      Removes a parameter from this control.
      Specified by:
      removeParameter in interface SimControl
      Overrides:
      removeParameter in class OSPControl
      Parameters:
      name -
    • setAdjustableValue

      public void setAdjustableValue(String name, boolean val)
      Stores a boolean in the control that can be edited after initialization.
      Specified by:
      setAdjustableValue in interface SimControl
      Parameters:
      name -
      val -
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns an XML.ObjectLoader to save and load data for this object.
      Returns:
      the object loader
    • createApp

      public static SimulationControl createApp(Simulation model)
      Creates a SIP animation control and establishes communication between the control and the model.
      Parameters:
      model - SIPAnimation
      Returns:
      AnimationControl
    • createApp

      public static SimulationControl createApp(Simulation model, String[] xml)
      Creates a simulation control and establishes communication between the control and the model. Initial parameters are set using the xml data.
      Parameters:
      model - Simulation
      xml - String[]
      Returns:
      SimulationControl