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.
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

    • setBackground

      public void setBackground(Color color)
      Description copied from class: Control
      Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.

      Note: This operation is a hint and may be overridden by the platform.

      Overrides:
      setBackground in class Control
      Parameters:
      color - the new color (or null)
    • setForeground

      public void setForeground(Color color)
      Description copied from class: Control
      Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.

      Note: This operation is a hint and may be overridden by the platform.

      Overrides:
      setForeground in class Control
      Parameters:
      color - the new color (or null)
    • getForeground

      public Color getForeground()
      Description copied from class: Control
      Returns the foreground color that the receiver will use to draw.
      Overrides:
      getForeground in class Control
      Returns:
      the receiver's foreground color
    • 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: