# Class SyWindowSet

java.lang.Object
com.io7m.jsycamore.api.windows.SyWindowSet

@Immutable public final class SyWindowSet extends Object
An immutable window set.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SyWindowSet`
  `empty()`
  Create an empty window set.
  `SyWindowSetChanged`
  `windowClose(SyWindowType window)`
  Close the given window.
  `SyWindowSetChanged`
  `windowCreate(SyWindowType window)`
  Create the given window.
  `SyWindowSetChanged`
  `windowFocus(SyWindowType window)`
  Focus the given window.
  `Optional<SyWindowType>`
  `windowFocused(SyWindowLayerID layer)`
  `SyWindowID`
  `windowFreshId()`
  `SyWindowSetChanged`
  `windowHide(SyWindowType window)`
  Hide the given window.
  `boolean`
  `windowIsVisible(SyWindowReadableType window)`
  `SyWindowSetChanged`
  `windowLayerHide(SyWindowLayerID layer)`
  Hide the given window layer.
  `boolean`
  `windowLayerIsShown(SyWindowLayerID layer)`
  `SyWindowSetChanged`
  `windowLayerShow(SyWindowLayerID layer)`
  Show the given window layer.
  `Map<SyWindowID, SyWindowType>`
  `windows()`
  `SyWindowSetChanged`
  `windowShow(SyWindowType window)`
  Make the given window visible.
  `Set<SyWindowID>`
  `windowsVisible()`
  `List<SyWindowType>`
  `windowsVisibleOrdered()`
  Calculate the complete set of visible windows and return them in depth order: Windows nearer to the viewer are closer to the start of the list.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### empty

    public static SyWindowSet empty()
    Create an empty window set.
    Returns:
      The empty set

  - ### windowFocused

    public Optional<SyWindowType> windowFocused(SyWindowLayerID layer)
    Parameters:
      `layer` - The window layer
    Returns:
      The focused window in the set, if any

  - ### windows

    public Map<SyWindowID, SyWindowType> windows()
    Returns:
      The set of windows

  - ### windowsVisible

    public Set<SyWindowID> windowsVisible()
    Returns:
      The set of windows that are visible

  - ### windowsVisibleOrdered

    public List<SyWindowType> windowsVisibleOrdered()
    Calculate the complete set of visible windows and return them in depth order: Windows nearer to the viewer are closer to the start of the list.
    Returns:
      The set of windows that are visible in depth order

  - ### windowCreate

    public SyWindowSetChanged windowCreate(SyWindowType window)
    Create the given window. The window is added to the set of known windows.
    Parameters:
      `window` - The window
    Returns:
      This set with the given window

  - ### windowShow

    public SyWindowSetChanged windowShow(SyWindowType window)
    Make the given window visible. The window is added to the set of visible windows.
    Parameters:
      `window` - The window
    Returns:
      This set with the given window visible

  - ### windowHide

    public SyWindowSetChanged windowHide(SyWindowType window)
    Hide the given window.
    Parameters:
      `window` - The window
    Returns:
      This set with the given window hidden

  - ### windowClose

    public SyWindowSetChanged windowClose(SyWindowType window)
    Close the given window.
    Parameters:
      `window` - The window
    Returns:
      This set with the given window closed

  - ### windowFocus

    public SyWindowSetChanged windowFocus(SyWindowType window)
    Focus the given window.
    Parameters:
      `window` - The window
    Returns:
      This set with the given window focused

  - ### windowIsVisible

    public boolean windowIsVisible(SyWindowReadableType window)
    Parameters:
      `window` - The window
    Returns:
      `true` if the given window is visible

  - ### windowLayerHide

    public SyWindowSetChanged windowLayerHide(SyWindowLayerID layer)
    Hide the given window layer.
    Parameters:
      `layer` - The window layer
    Returns:
      This set with the given window layer hidden

  - ### windowLayerShow

    public SyWindowSetChanged windowLayerShow(SyWindowLayerID layer)
    Show the given window layer.
    Parameters:
      `layer` - The window layer
    Returns:
      This set with the given window layer made visible

  - ### windowLayerIsShown

    public boolean windowLayerIsShown(SyWindowLayerID layer)
    Parameters:
      `layer` - The window layer
    Returns:
      `true` if the given window layer is visible

  - ### windowFreshId

    public SyWindowID windowFreshId()
    Returns:
      A window ID that is not present in this set