Class HeapStatus

All Implemented Interfaces:
Drawable

public class HeapStatus extends Composite
The Heap Status control, which shows the heap usage statistics in the window trim.

All colors except the low-memory red and the free-memory orange derive from the control's background and foreground.

Since:
3.1
  • Field Details

    • isInGC

      protected volatile boolean isInGC
  • Constructor Details

    • HeapStatus

      public HeapStatus(Composite parent, IPreferenceStore prefStore)
      Creates a new heap status control with the given parent, and using the given preference store to obtain settings such as the refresh interval.
      Parameters:
      parent - the parent composite
      prefStore - the preference store
  • Method Details

    • computeSize

      public Point computeSize(int wHint, int hHint, boolean changed)
      Description copied from class: Control
      Returns the preferred size (in points) of the receiver.

      The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.

      If the changed flag is true, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.

      Overrides:
      computeSize in class Control
      Parameters:
      wHint - the width hint (can be SWT.DEFAULT)
      hHint - the height hint (can be SWT.DEFAULT)
      changed - true if the control's contents have changed, and false otherwise
      Returns:
      the preferred size of the control.
      See Also: