Class SwingGUI

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.OutputMonitor , it.unibo.alchemist.boundary.swingui.api.GraphicalOutputMonitor , java.io.Serializable

    @Deprecated(message = "The Swing UI must be replaced by a web UI") 
    public final class SwingGUI<T extends Object, P extends Position2D<P>>
     implements GraphicalOutputMonitor<T, P>
                        

    Creates a Swing-based graphical interface for the provided environment. The actual implementation of the main display is chosen based on the type of environment

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Environment<T, P> environment
    • Constructor Summary

      Constructors 
      Constructor Description
      SwingGUI(Environment<T, P> environment, File graphicsFile, Boolean failOnHeadless, Integer closeOperation) Builds a single-use graphical interface.
      SwingGUI(Environment<T, P> environment, String graphics, Boolean failOnHeadless, Integer closeOperation) Builds a single-use graphical interface.
      SwingGUI(Environment<T, P> environment, String graphics, Boolean failOnHeadless) Builds a single-use graphical interface.
      SwingGUI(Environment<T, P> environment, String graphics) Builds a single-use graphical interface.
      SwingGUI(Environment<T, P> environment) Builds a single-use graphical interface.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Environment<T, P> getEnvironment()
      Unit initialized(Environment<T, P> environment)
      Unit stepDone(Environment<T, P> environment, Actionable<T> reaction, Time time, Long step)
      Unit finished(Environment<T, P> environment, Time time, Long step)
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.api.GraphicalOutputMonitor

        getStep, isRealTime, repaint, setDrawLinks, setEffectStack, setMarkCloserNode, setRealTime, setStep
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SwingGUI

        SwingGUI(Environment<T, P> environment, File graphicsFile, Boolean failOnHeadless, Integer closeOperation)
        Builds a single-use graphical interface.
        Parameters:
        environment - the simulation for this GUI
        graphicsFile - the effects file
        closeOperation - the type of close operation for this GUI
      • SwingGUI

        SwingGUI(Environment<T, P> environment, String graphics, Boolean failOnHeadless, Integer closeOperation)
        Builds a single-use graphical interface.
        Parameters:
        environment - the simulation for this GUI
        graphics - the effects file
        closeOperation - the type of close operation for this GUI
      • SwingGUI

        SwingGUI(Environment<T, P> environment, String graphics, Boolean failOnHeadless)
        Builds a single-use graphical interface.
        Parameters:
        environment - the simulation for this GUI
        graphics - the effects file
      • SwingGUI

        SwingGUI(Environment<T, P> environment, String graphics)
        Builds a single-use graphical interface.
        Parameters:
        environment - the simulation for this GUI
        graphics - the effects file
      • SwingGUI

        SwingGUI(Environment<T, P> environment)
        Builds a single-use graphical interface.
        Parameters:
        environment - the simulation for this GUI