java.lang.Object | |
↳ | com.datalogic.device.configuration.ScreensaverItem.Builder |
Builder class for constructing instances of ScreensaverItem
.
This class provides methods to set various properties of a screensaver item:
file path, background color, duration, and animation type.
Key functionalities include:
Usage example:
ScreensaverItem item = new ScreensaverItem.Builder("image.jpg") .withBackgroundColor("#FF0000") .withDuration(60) .withAnimation(ScreensaverAnimation.PING_PONG) .build();
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Builder for creating a
ScreensaverItem . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds and returns a new
ScreensaverItem instance with the configured properties. | |||||||||||
Sets the animation type of the screensaver.
| |||||||||||
Sets the animation type of the screensaver.
| |||||||||||
Sets the background color of the screensaver.
| |||||||||||
Sets the background color of the screensaver.
| |||||||||||
Sets the duration of the screensaver.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a new Builder for creating a ScreensaverItem
.
file | The file path of the screensaver. Must be a valid image or video file. Type: String |
---|
IllegalArgumentException | if the file path is null, empty, or not a valid image or video. |
---|
Builds and returns a new ScreensaverItem
instance with the configured properties.
ScreensaverItem
instance. Type: ScreensaverItem
Sets the animation type of the screensaver.
animation | The animation type as a string. Must be a valid ScreensaverAnimation value. Type: String |
---|
Builder
Sets the animation type of the screensaver.
animation | The animation type as a ScreensaverAnimation enum value. Type: ScreensaverAnimation |
---|
Builder
IllegalArgumentException | if the animation is null or invalid for the file type. |
---|
Sets the background color of the screensaver.
backgroundColor | The background color as an integer. Type: int |
---|
Builder
Sets the background color of the screensaver.
backgroundColor | The background color in hexadecimal string format (e.g., #RRGGBB or #AARRGGBB ). Type: String |
---|
Builder
Sets the duration of the screensaver.
duration | The duration in seconds. Must be non-negative. Type: int |
---|
Builder
IllegalArgumentException | if the duration is negative. |
---|