Package com.io7m.jcamera
Class JCameraSphericalMouseRegion.Builder
java.lang.Object
com.io7m.jcamera.JCameraSphericalMouseRegion.Builder
- Enclosing class:
- JCameraSphericalMouseRegion
Builds instances of type
JCameraSphericalMouseRegion.
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 TypeMethodDescriptionbuild()Builds a newJCameraSphericalMouseRegion.from(JCameraSphericalMouseRegionType instance) Fill a builder with attribute values from the providedJCameraSphericalMouseRegionTypeinstance.setHeight(double height) Initializes the value for theheightattribute.setOrigin(JCameraScreenOrigin origin) Initializes the value for theoriginattribute.setWidth(double width) Initializes the value for thewidthattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedJCameraSphericalMouseRegionTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setOrigin
Initializes the value for theoriginattribute.- Parameters:
origin- The value for origin- Returns:
thisbuilder for use in a chained invocation
-
setWidth
Initializes the value for thewidthattribute.- Parameters:
width- The value for width- Returns:
thisbuilder for use in a chained invocation
-
setHeight
Initializes the value for theheightattribute.- Parameters:
height- The value for height- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newJCameraSphericalMouseRegion.- Returns:
- An immutable instance of JCameraSphericalMouseRegion
- Throws:
IllegalStateException- if any required attributes are missing
-