Class Twistie

All Implemented Interfaces:
Drawable

public class Twistie extends ToggleHyperlink
A custom selectable control that can be used to control areas that can be expanded or collapsed. The control control can be toggled between selected and deselected state with a mouse or by pressing 'Enter' while the control has focus.

The control is rendered as a triangle that points to the right in the collapsed and down in the expanded state. Triangle color can be changed.

Styles:
None
Since:
3.0
See Also:
  • Constructor Details

    • Twistie

      public Twistie(Composite parent, int style)
      Creates a control in a provided composite.
      Parameters:
      parent - the parent
      style - the style
  • Method Details

    • paintHyperlink

      protected void paintHyperlink(GC gc)
      Description copied from class: AbstractHyperlink
      Paints the hyperlink as a reaction to the provided paint event.
      Specified by:
      paintHyperlink in class AbstractHyperlink
      Parameters:
      gc - graphic context
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from class: Control
      Enables the receiver if the argument is true, and disables it otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.
      Overrides:
      setEnabled in class AbstractHyperlink
      Parameters:
      enabled - the new enabled state