Interface LayoutController


  • public interface LayoutController
    A LayoutController is the one responsible for controlling the states of the LayoutModel. It always controls the current workspace model.

    This controller is a singleton and can therefore be found in Lookup:

    LayoutController lc = Lookup.getDefault().lookup(LayoutController.class);
    Author:
    Mathieu Bastian
    • Method Detail

      • setLayout

        void setLayout​(Layout layout)
        Sets the Layout to execute.
        Parameters:
        layout - the layout that is to be selected
      • executeLayout

        void executeLayout()
        Executes the current Layout.
      • executeLayout

        void executeLayout​(int numIterations)
        Executes the current layout for numIterations iterations.
        Parameters:
        numIterations - the number of iterations of the algorithm
      • canExecute

        boolean canExecute()
        Determine if the current Layout can be executed.
        Returns:
        true if the layout is executable.
      • stopLayout

        void stopLayout()
        Stop the Layout's execution.
      • canStop

        boolean canStop()
        Determine if the current Layout execution can be stopped. If the current Layout is not running, it generally cannot be stopped.
        Returns:
        true if the layout can be stopped.