Class DefaultsEditor

All Implemented Interfaces:
CommonConstants, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, EngineNodeConstants

public class DefaultsEditor extends JDialog implements CommonConstants

Title: Defaults Editor

Description: A modal or non-modal editor used to setup default values for every parameter of the model.

Author:
Bertoli Marco Date: 12-lug-2005 Time: 16.18.35 Modified by Ashanka (July 2010) Desc: Added new defaults control of a Random CheckBox.
See Also:
  • Field Details

  • Constructor Details

    • DefaultsEditor

      public DefaultsEditor(int target)
      Construct a new DefaultsEditor in a non-modal dialog
      Parameters:
      target - Used to specify to show specific parameters for JMODEL or JSIM
    • DefaultsEditor

      public DefaultsEditor(Frame owner, int target)
      Construct a new DefaultsEditor in a modal dialog
      Parameters:
      owner - owner Frame
      target - Used to specify to show specific parameters for JMODEL or JSIM
    • DefaultsEditor

      public DefaultsEditor(Dialog owner, int target)
      Construct a new DefaultsEditor in a modal dialog
      Parameters:
      owner - owner Dialog
      target - Used to specify to show specific parameters for JMODEL or JSIM
  • Method Details

    • getInstance

      public static DefaultsEditor getInstance(Container parent, int target)
      Returns a new instance of DefaultsEditor, given parent container (used to find top level Dialog or Frame to create this dialog as modal)
      Parameters:
      parent - any type of container contained in a Frame or Dialog
      target - Used to specify to show specific parameters for JMODEL or JSIM
      Returns:
      new instance of DefaultsEditor
    • initWindow

      protected void initWindow(int target)
      Initialize parameters of the window (size, title)... Then calls initComponents
      Parameters:
      target - target application (JMODEL or JSIM)
    • initComponents

      protected void initComponents(int target)
      Initialize all graphic objects
      Parameters:
      target - target application (JMODEL or JSIM)
    • addInputString

      protected void addInputString(String text, String property, Container cont)
      Adds an input field to insert a String
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputCombo

      protected void addInputCombo(String text, String property, Container cont, Map<String,String> values)
      Adds an input field to select from a ComboBox
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
      values - Map with internal value <-> showed value relations
    • addInputSpinner

      protected void addInputSpinner(String text, String property, Container cont, int minvalue)
      Adds an input field to choose a number from a Spinner
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
      minvalue - minimum value allowed for this property
    • addInput01Spinner

      protected void addInput01Spinner(String text, String property, Container cont)
      Adds an input field to choose a number from a Spinner. Number is between 0 and 1
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputDistribution

      protected void addInputDistribution(String text, String property, Container cont)
      Adds an input field to choose a distribution.
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputStationQueueStrategy

      protected void addInputStationQueueStrategy(String text, String property, Container cont)
      Adds an input field to choose a station Queue strategy.
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputQueueStrategy

      protected void addInputQueueStrategy(String text, String property, Container cont)
      Adds an input field to choose a Queue strategy.
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputDropRule

      protected void addInputDropRule(String text, String property, Container cont)
      Adds an input field to choose a Drop rule.
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputRoutingStrategy

      protected void addInputRoutingStrategy(String text, String property, Container cont)
      Adds an input field to choose a Routing strategy.
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputInfSpinner

      protected void addInputInfSpinner(String text, String property, Container cont, int minvalue, int infvalue)
      Adds an input field to choose a number from a Spinner. A special infinite value can be chosen with a checkbox
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
      minvalue - minimum value allowed for this property
      infvalue - special value to be stored for infinite selection
    • addBooleanComboBox

      protected void addBooleanComboBox(String text, String property, Container cont)
      Adds a ComboBox to select a boolean property
      Parameters:
      text - text to be shown on a label
      property - property to be changed in Defaults
      cont - container where input field must be added
    • addInputAnimationSpinner

      protected void addInputAnimationSpinner(String text, String booleanProperty, String valueProperty, Container cont, int minvalue, int maxvalue)
    • addInputRandomSpinner

      protected void addInputRandomSpinner(String text, String booleanProperty, String valueProperty, Container cont, int minvalue)
    • addInputNoAutoSpinner

      protected void addInputNoAutoSpinner(String text, String booleanProperty, String valueProperty, Container cont, int minvalue)