Class Video.Builder<B extends Video.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
Video

public static class Video.Builder<B extends Video.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Video build()
      Finish building the Video object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Video.
      Overrides:
      build in class Widget.Builder<B extends Video.Builder<B>>
      Returns:
      a new instance of Video with the properties that were set in the Builder object.
    • setAutoplay

      public B setAutoplay(boolean autoplay)
      If the video should automatically begin playing.
      Parameters:
      autoplay - the value for the autoplay property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFile

      public B setFile(File file)
      The file played by this video if the video is playing a file.
      Parameters:
      file - the value for the file property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setGraphicsOffload

      public B setGraphicsOffload(GraphicsOffloadEnabled graphicsOffload)
      Whether to enable graphics offload.
      Parameters:
      graphicsOffload - the value for the graphics-offload property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.14
    • setLoop

      public B setLoop(boolean loop)
      If new media files should be set to loop.
      Parameters:
      loop - the value for the loop property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMediaStream

      public B setMediaStream(MediaStream mediaStream)
      The media-stream played
      Parameters:
      mediaStream - the value for the media-stream property
      Returns:
      the Builder instance is returned, to allow method chaining