Class LDStrategyEditor

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

public class LDStrategyEditor extends JMTDialog implements CommonConstants

Title: Load Dependent Service Time Strategy Editor

Description: An editor used to parametrize a load dependent service time strategy. This is a modal JDialog.

Author:
Bertoli Marco Date: 13-ott-2005 Time: 11.49.53
See Also:
  • Field Details

  • Constructor Details

    • LDStrategyEditor

      public LDStrategyEditor(Frame parent, LDStrategy strategy)
      Builds a new LDStrategyEditor Dialog. This dialog is designed to be modal.
      Parameters:
      parent - owner Frame for this dialog.
      strategy - Reference to LDStrategy to be edited
    • LDStrategyEditor

      public LDStrategyEditor(Dialog parent, LDStrategy strategy)
      Builds a new LDStrategyEditor Dialog. This dialog is designed to be modal.
      Parameters:
      parent - owner Dialog for this dialog.
      strategy - Reference to LDStrategy to be edited
  • Method Details

    • getInstance

      public static LDStrategyEditor getInstance(Container parent, LDStrategy strategy)
      Returns a new instance of LDStrategyEditor, 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
      strategy - LDStrategy to be modified
      Returns:
      new instance of LDStrategyEditor
    • findDistributions

      protected static Map<String, Distribution> findDistributions()
      Uses reflection to return a Map of distributions suitable for LDStrategy. (With mean value specifiable) Search's key is distribution name and value is the Class of found distribution
      Returns:
      found distributions
    • initData

      protected void initData(LDStrategy strategy)
      Initialize this dialog data structures
      Parameters:
      strategy - Reference to service strategy to be edited
    • initGUI

      protected void initGUI()
      Initialize all gui related stuff
    • setNumberOfRanges

      protected void setNumberOfRanges(int newNumber)
      Sets number of ranges in this strategy
      Parameters:
      newNumber - new number of ranges
    • addRange

      protected void addRange()
      Adds a new range to the strategy
    • refreshComponents

      protected void refreshComponents()
      synchronizes components to display coherently global number of ranges
    • deleteRange

      protected void deleteRange(int index)
      delete a range from strategy given the index the range to be deleted is displayed at inside the table.
    • deleteSelectedClasses

      protected void deleteSelectedClasses()
      Multiple deletion of ranges. Indices to ship call to precedent method, are retrieved through classtable methods (get selected rows)