Package com.io7m.jcamera

# Class JCameraFPSStyleMouseRegion.Builder

java.lang.Object
com.io7m.jcamera.JCameraFPSStyleMouseRegion.Builder

Enclosing class:
  JCameraFPSStyleMouseRegion

public static final class JCameraFPSStyleMouseRegion.Builder extends Object
Builds instances of type `JCameraFPSStyleMouseRegion`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JCameraFPSStyleMouseRegion`
  `build()`
  Builds a new `JCameraFPSStyleMouseRegion`.
  `final JCameraFPSStyleMouseRegion.Builder`
  `from(JCameraFPSStyleMouseRegionType instance)`
  Fill a builder with attribute values from the provided `JCameraFPSStyleMouseRegionType` instance.
  `final JCameraFPSStyleMouseRegion.Builder`
  `setHeight(double height)`
  Initializes the value for the `height` attribute.
  `final JCameraFPSStyleMouseRegion.Builder`
  `setOrigin(JCameraScreenOrigin origin)`
  Initializes the value for the `origin` attribute.
  `final JCameraFPSStyleMouseRegion.Builder`
  `setWidth(double width)`
  Initializes the value for the `width` attribute.

  ### Methods inherited from class java.lang.Object

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

- ## Method Details

  - ### from

    public final JCameraFPSStyleMouseRegion.Builder from(JCameraFPSStyleMouseRegionType instance)
    Fill a builder with attribute values from the provided `JCameraFPSStyleMouseRegionType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setOrigin

    public final JCameraFPSStyleMouseRegion.Builder setOrigin(JCameraScreenOrigin origin)
    Initializes the value for the `origin` attribute.
    Parameters:
      `origin` - The value for origin
    Returns:
      `this` builder for use in a chained invocation

  - ### setWidth

    public final JCameraFPSStyleMouseRegion.Builder setWidth(double width)
    Initializes the value for the `width` attribute.
    Parameters:
      `width` - The value for width
    Returns:
      `this` builder for use in a chained invocation

  - ### setHeight

    public final JCameraFPSStyleMouseRegion.Builder setHeight(double height)
    Initializes the value for the `height` attribute.
    Parameters:
      `height` - The value for height
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public JCameraFPSStyleMouseRegion build()
    Builds a new `JCameraFPSStyleMouseRegion`.
    Returns:
      An immutable instance of JCameraFPSStyleMouseRegion
    Throws:
      `IllegalStateException` - if any required attributes are missing