Interface LayoutModel


  • public interface LayoutModel
    Layout model contains data and flags relative to the layout execution and user interface. There is one model per Workspace

    PropertyChangeListener can be used to receive events about a change in the model.

    Author:
    Mathieu Bastian
    • Method Detail

      • getSelectedLayout

        Layout getSelectedLayout()
        Returns the currently selected layout or null if no layout is selected.
      • getLayout

        Layout getLayout​(LayoutBuilder layoutBuilder)
        Return a layout instance for the given layoutBuilder. If saved properties exists, the layout properties values are set. Values are default if it is the first time this layout is built.

        Use this method instead of LayoutBuilder.buildLayout() directly.

        Parameters:
        layoutBuilder - the layout builder
        Returns:
        the layout build from layoutBuilder with formely saved properties.
      • getSelectedBuilder

        LayoutBuilder getSelectedBuilder()
        Returns the builder used for building the currently selected layout or null if no layout is selected.
      • isRunning

        boolean isRunning()
        Returns true if a layout is currently running, false otherwise.
      • addPropertyChangeListener

        void addPropertyChangeListener​(PropertyChangeListener listener)
        Add a property change listener for this model. The listener is notified when layout is selected and when running flag change.
        Parameters:
        listener - a property change listener
      • removePropertyChangeListener

        void removePropertyChangeListener​(PropertyChangeListener listener)
        Remove listerner.
        Parameters:
        listener - a property change listener.