Class TreeNode

All Implemented Interfaces:
Drawable

public class TreeNode 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 box with a '+' or '-' sign, depending on the expansion state. Focus indication is rendered around the box when the control has keyboard focus.

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

    • TreeNode

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

    • paint

      protected void paint(PaintEvent e)
      Description copied from class: AbstractHyperlink
      Paints the control as a reaction to the provided paint event.
      Overrides:
      paint in class AbstractHyperlink
      Parameters:
      e - the paint event
    • 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