Interface Layouts

All Known Implementing Classes:
LayoutsManager

public interface Layouts
API for managing Glue Desktop layouts.
  • Method Details

    • save

      Saves the currently setup layout. It uses a Consumer with parameters for the new layout. The only mandatory parameter is a name. If a name has not been specified a random name will be generated instead.
      Parameters:
      layout - Consumer with parameters for the new Layout
      Returns:
      CompletionStage to indicate a signal for completion.
    • restore

      Restore a layout via LayoutRestoreOptions.
      Parameters:
      options - options used to pick layout to restore.
      Returns:
      CompletionStage to indicate completion.
    • delete

      CompletionStage<Void> delete​(LayoutType type, String name)
      Delete a layout via its name and type
      Parameters:
      type - type of the layout
      name - name of the layout
      Returns:
      CompletionStage to indicate completion
    • list

      Lists available layouts.
      Returns:
      Collection
    • importLayouts

      CompletionStage<Void> importLayouts​(Collection<Layout> layouts, LayoutImportMode mode)
      Imports layouts by either merging them or replacing them.
      Parameters:
      layouts - collection of layouts to import
      mode - mode of import - merge or replace
      Returns:
      CompletionStage to indicate completion or problems
    • exportLayouts

      CompletionStage<Collection<Layout>> exportLayouts()
      Exports the layouts of this user for external use.
      Returns:
      Collection of all Layout instances.
    • onSave

      void onSave​(Layouts.SaveRequestListener listener)
      Provides additional context to be saved with the layout.
      Parameters:
      listener - type Layouts.SaveRequestListener