Class MainWizard

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

public class MainWizard extends JMCHWizard
Main Wizard that contains all the panels for JTeach Models and Markov chains
Author:
Lorenzo Torri Date: 29-mar-2024 Time: 15.04
See Also:
  • Constructor Details

    • MainWizard

      public MainWizard()
  • Method Details

    • main

      public static void main(String[] args)
    • setAnimationPanelEnv

      public void setAnimationPanelEnv(Simulation simulation)
      Method to create a new AnimationPanel for Non Preemptive Scheduling
      Parameters:
      simulation - the type of Simulation
    • setMMQueuesPanelEnv

      public void setMMQueuesPanelEnv(String selectedMethod)
      Method to create a new MMQueuesPanel
    • setToolBar

      public void setToolBar(JToolBar bar)
      To change dinamically the type of ToolBar. Since different panels have different ToolBars, each panel creates its own toolbar and then it is setted correctly here
      Parameters:
      bar - new JToolBar
    • setMenuBar

      public void setMenuBar(JMenuBar bar)
      To change dinamically the type of MenuBar. Since different panels have different Menus, each panel creates its own menubar and then it is setted correctly here
      Parameters:
      bar - new JTMMenuBar
    • resetScreen

      public void resetScreen()
      To remove all the panels and to go back to the MainPanel. It is called by all the panels in the CanGoBack()
    • setSelectedPanel

      public void setSelectedPanel()
    • getNumbersPanel

      public int getNumbersPanel()
    • setIconLoading

      public void setIconLoading()
    • setIconFinish

      public void setIconFinish()
    • saveResults

      public void saveResults()
      Save the results of the Results Panel, and display them in the next chosen simulation, if the type is the same
    • routeResults

      public void routeResults(String typeOfResult, int genereatedJobs, String algorithm, String arrivalDistr, double lambda, String serviceDistr, int nServers, double service, int nQueues, double responseTime, double queueTime, double thoughput, double queueNumber)
      Method called by the AnimationPanel to update the Result Panel
      Parameters:
      typeOfResult - if the result is the one from JSIM or from the Animation
      genereatedJobs - the number of jobs generated for this simulation
      algorithm - queue algorithm of the animation
      arrivalDistr - arrival time distribution
      lambda - the inter arrival time
      serviceDistr - service time distribution
      nServers - number of servers for each station
      service - service time
      nQueues - number of queues reachable
      responseTime - response time
      queueTime - queue time
      thoughput - thoughput
      queueNumber - queue number
    • updateAnimResults

      public void updateAnimResults(int generatedJobs, double[] measures)
      Called each time the animator is paused, to udpate the row of ANIM results
      Parameters:
      measures -
    • setLastPanel

      public void setLastPanel(int value)
    • setLastPanel

      public void setLastPanel()
    • about

      public void about()
    • getAnimationPanel

      public AnimationPanel getAnimationPanel()