Class JSIMWizMain

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

public class JSIMWizMain extends Wizard implements GuiInterface
Created by IntelliJ IDEA. User: orsotronIII Date: 18-lug-2005 Time: 8.59.44 Modified by Bertoli Marco Modified by Francesco D'Aquino
See Also:
  • Field Details

  • Constructor Details

    • JSIMWizMain

      public JSIMWizMain()
    • JSIMWizMain

      public JSIMWizMain(CommonModel model)
  • Method Details

    • cancel

      public boolean cancel()
      Exits from JSIM
      Overrides:
      cancel in class Wizard
      Returns:
      true if window can be closed, false otherwise.
    • launchToJMVA

      public void launchToJMVA()
    • launchSimulation

      public void launchSimulation()
    • changeSimActionsState

      public void changeSimActionsState(boolean start, boolean pause, boolean stop)
      Description copied from interface: GuiInterface
      Changes simulation action status. This method is called by DispatcherThread.
      Specified by:
      changeSimActionsState in interface GuiInterface
      Parameters:
      start - state for start action
      pause - state for pause action
      stop - state for stop action
    • getModel

      public CommonModel getModel()
    • setResultsWindow

      public void setResultsWindow(JFrame rsw)
      Sets resultWindow to be shown. This method is used by pollerThread
      Specified by:
      setResultsWindow in interface GuiInterface
      Parameters:
      rsw - window to be set as current ResultsWindow
    • showResultsWindow

      public void showResultsWindow(boolean selected)
      Called when showResults action is triggered
      Parameters:
      selected - Tells if show results button is selected or not
    • showResultsWindow

      public void showResultsWindow()
      Shows results window and forces show results button to be selected
      Specified by:
      showResultsWindow in interface GuiInterface
    • showRelatedPanel

      public void showRelatedPanel(int problemType, int problemSubType, Object relatedStation, Object relatedClass)
      Shows the panel to solve a problem
      Specified by:
      showRelatedPanel in interface GuiInterface
    • isAnimationDisplayable

      public boolean isAnimationDisplayable()
      Used to discover if the instance can display simulation animation
      Specified by:
      isAnimationDisplayable in interface GuiInterface
      Returns:
      true if the instance can display simulation animation
    • handleException

      public void handleException(Exception e)
      Shows a panel with caught exception
      Specified by:
      handleException in interface GuiInterface
      Parameters:
      e - exception to be shown
    • showErrorMessage

      public void showErrorMessage(String message)
      Shows a panel with an error message
      Specified by:
      showErrorMessage in interface GuiInterface
      Parameters:
      message - specified error message
    • checkForSave

      public boolean checkForSave(String msg)
      Checks if there's an old graph to save. This methods is called when creates/closes/opens a graph.
      Parameters:
      msg - The message to display.
      Returns:
      true - whether the user accepts to save the graph, or he cancels the current action.
    • main

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

      protected void finish()
      Overrides default Solve button press...
      Overrides:
      finish in class Wizard
      See Also:
    • setAnimationHolder

      public void setAnimationHolder(Thread thread)
      Specified by:
      setAnimationHolder in interface GuiInterface
    • getFileName

      public String getFileName()
      Specified by:
      getFileName in interface GuiInterface
    • simulationFinished

      public void simulationFinished()
      Description copied from interface: GuiInterface
      Used only for the AnimationPanel to update the table
      Specified by:
      simulationFinished in interface GuiInterface