Klasse Toggle

Alle implementierten Schnittstellen:
PointerInterface

public class Toggle extends PropertyHolder
A toggle within [class@ToggleGroup].

`AdwToggle` can optionally have a name, set with [property@Toggle:name].
If the name is set, [property@ToggleGroup:active-name] can be used to access
toggles instead of index.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toggle.html

  • Konstruktordetails

    • Toggle

      public Toggle(PointerContainer pointer)
    • Toggle

      public Toggle()
      Creates a new `AdwToggle`.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getChild

      public Widget getChild()
      Gets the child widget of @self.
      Gibt zurück:
      the toggle child
    • getEnabled

      public boolean getEnabled()
      Gets whether @self is enabled.
      Gibt zurück:
      whether the toggle is enabled
    • getIconName

      public Str getIconName()
      Gets the icon name of @self.
      Gibt zurück:
      the toggle icon name
    • getIndex

      public int getIndex()
      Gets the index of @self within its toggle group.
      Gibt zurück:
      the index, or `GTK_INVALID_LIST_POSITION` if it's not in a group
    • getLabel

      public Str getLabel()
      Gets the label of @self.
      Gibt zurück:
      the toggle label
    • getName

      public Str getName()
      Gets the name of @self.
      Gibt zurück:
      the toggle name
    • getTooltip

      public Str getTooltip()
      Gets the tooltip of @self.
      Gibt zurück:
      the toggle tooltip
    • getUseUnderline

      public boolean getUseUnderline()
      Gets whether @self uses underlines.
      Gibt zurück:
      whether the toggle uses underlines
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child of @self to @child.

      When the child is set, icon and label are not displayed.

      It's recommended to still set the label, as it can still be used by the
      screen reader.
      Parameter:
      child - a child widget
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether @self is enabled.
      Parameter:
      enabled - whether the toggle should be enbled
    • setIconName

      public void setIconName(@Nullable Str icon_name)
      Sets the icon name of @self to @icon_name.

      The icon will be displayed alone or next to the label, unless
      [property@Toggle:child] is set.
      Parameter:
      icon_name - the icon name
    • setIconName

      public void setIconName(String icon_name)
      Sets the icon name of @self to @icon_name.

      The icon will be displayed alone or next to the label, unless
      [property@Toggle:child] is set.
      Parameter:
      icon_name - the icon name
    • setLabel

      public void setLabel(@Nullable Str label)
      Sets the label of @self to @label.

      The label will be displayed alone or next to the icon, unless
      [property@Toggle:child] is set, but will still be read out by the screen
      reader.
      Parameter:
      label - a label
    • setLabel

      public void setLabel(String label)
      Sets the label of @self to @label.

      The label will be displayed alone or next to the icon, unless
      [property@Toggle:child] is set, but will still be read out by the screen
      reader.
      Parameter:
      label - a label
    • setName

      public void setName(@Nullable Str name)
      Sets the name of @self to @name.

      Allows accessing @self by its name instead of index.

      See [property@ToggleGroup:active-name].
      Parameter:
      name - a name
    • setName

      public void setName(String name)
      Sets the name of @self to @name.

      Allows accessing @self by its name instead of index.

      See [property@ToggleGroup:active-name].
      Parameter:
      name - a name
    • setTooltip

      public void setTooltip(@Nonnull Str tooltip)
      Sets the tooltip of @self to @tooltip.

      @tooltip can be marked up with the Pango text markup language.
      Parameter:
      tooltip - the tooltip
    • setTooltip

      public void setTooltip(String tooltip)
      Sets the tooltip of @self to @tooltip.

      @tooltip can be marked up with the Pango text markup language.
      Parameter:
      tooltip - the tooltip
    • setUseUnderline

      public void setUseUnderline(boolean use_underline)
      Sets whether an embedded underline in the label indicates a mnemonic.

      See [property@Toggle:label].
      Parameter:
      use_underline - whether an underline in the label indicates a mnemonic
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()