Class Calendar.Builder<B extends Calendar.Builder<B>>

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

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

      public B setDate(DateTime date)

      The selected date.

      This property gets initially set to the current date.

      Parameters:
      date - the value for the date property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDay

      @Deprecated public B setDay(int day)
      Deprecated.
      This property will be removed in GTK 5. Use Calendar:date instead.
      The selected day (as a number between 1 and 31).
      Parameters:
      day - the value for the day property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setMonth

      @Deprecated public B setMonth(int month)
      Deprecated.
      This property will be removed in GTK 5. Use Calendar:date instead.

      The selected month (as a number between 0 and 11).

      This property gets initially set to the current month.

      Parameters:
      month - the value for the month property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowDayNames

      public B setShowDayNames(boolean showDayNames)
      Determines whether day names are displayed.
      Parameters:
      showDayNames - the value for the show-day-names property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowHeading

      public B setShowHeading(boolean showHeading)
      Determines whether a heading is displayed.
      Parameters:
      showHeading - the value for the show-heading property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setShowWeekNumbers

      public B setShowWeekNumbers(boolean showWeekNumbers)
      Determines whether week numbers are displayed.
      Parameters:
      showWeekNumbers - the value for the show-week-numbers property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setYear

      @Deprecated public B setYear(int year)
      Deprecated.
      This property will be removed in GTK 5. Use Calendar:date instead.

      The selected year.

      This property gets initially set to the current year.

      Parameters:
      year - the value for the year property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onDaySelected

      public B onDaySelected(Calendar.DaySelectedCallback handler)
      Emitted when the user selects a day.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onNextMonth

      public B onNextMonth(Calendar.NextMonthCallback handler)
      Emitted when the user switches to the next month.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onNextYear

      public B onNextYear(Calendar.NextYearCallback handler)
      Emitted when user switches to the next year.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onPrevMonth

      public B onPrevMonth(Calendar.PrevMonthCallback handler)
      Emitted when the user switches to the previous month.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onPrevYear

      public B onPrevYear(Calendar.PrevYearCallback handler)
      Emitted when user switches to the previous year.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: