Class FileLauncher.Builder<B extends FileLauncher.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
FileLauncher

public static class FileLauncher.Builder<B extends FileLauncher.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
4.10
  • Constructor Details

    • Builder

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

    • build

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

      public B setAlwaysAsk(boolean alwaysAsk)
      Whether to ask the user to choose an app for opening the file. If FALSE, the file might be opened with a default app or the previous choice.
      Parameters:
      alwaysAsk - the value for the always-ask property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • setFile

      public B setFile(File file)
      The file to launch.
      Parameters:
      file - the value for the file property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setWritable

      public B setWritable(boolean writable)
      Whether to make the file writable for the handler.
      Parameters:
      writable - the value for the writable property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.14