Class HeapManager
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.eclipse.nebula.widgets.opal.heapmanager.HeapManager
-
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class HeapManager extends org.eclipse.swt.widgets.Composite
Instances of this class are controls that display the memory used, the whole memory, and contains a button to perform a GC
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Canvas
bar
private org.eclipse.swt.graphics.Color
barBorderColor
private org.eclipse.swt.graphics.Color
barGradientColorMiddleStart
private org.eclipse.swt.graphics.Color
barGradientColorTopEnd
private org.eclipse.swt.graphics.Color
barGradientColorTopStart
private org.eclipse.swt.graphics.Color
barInnerColor
private org.eclipse.swt.graphics.Color
barTextColor
private org.eclipse.swt.widgets.Button
button
private int
heapMaxSize
private int
heapSize
-
Constructor Summary
Constructors Constructor Description HeapManager(org.eclipse.swt.widgets.Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createBar()
Creates the bar that displays the memoryprivate void
createButton()
Create the button used to perform GCprivate void
createDefaultColors()
Creates the default colorsprivate void
drawBar(org.eclipse.swt.events.PaintEvent e)
Draw the barorg.eclipse.swt.graphics.Color
getBarBorderColor()
org.eclipse.swt.graphics.Color
getBarGradientColorMiddleStart()
org.eclipse.swt.graphics.Color
getBarGradientColorTopEnd()
org.eclipse.swt.graphics.Color
getBarGradientColorTopStart()
org.eclipse.swt.graphics.Color
getBarInnerColor()
org.eclipse.swt.graphics.Color
getBarTextColor()
void
setBarBorderColor(org.eclipse.swt.graphics.Color barBorderColor)
void
setBarGradientColorMiddleStart(org.eclipse.swt.graphics.Color barGradientColorMiddleStart)
void
setBarGradientColorTopEnd(org.eclipse.swt.graphics.Color barGradientColorTopEnd)
void
setBarGradientColorTopStart(org.eclipse.swt.graphics.Color barGradientColorTopStart)
void
setBarInnerColor(org.eclipse.swt.graphics.Color barInnerColor)
void
setBarTextColor(org.eclipse.swt.graphics.Color barTextColor)
private void
updateContent()
Update the content of the bar-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
-
-
-
Field Detail
-
bar
private org.eclipse.swt.widgets.Canvas bar
-
button
private org.eclipse.swt.widgets.Button button
-
heapMaxSize
private int heapMaxSize
-
heapSize
private int heapSize
-
barBorderColor
private org.eclipse.swt.graphics.Color barBorderColor
-
barInnerColor
private org.eclipse.swt.graphics.Color barInnerColor
-
barTextColor
private org.eclipse.swt.graphics.Color barTextColor
-
barGradientColorTopStart
private org.eclipse.swt.graphics.Color barGradientColorTopStart
-
barGradientColorTopEnd
private org.eclipse.swt.graphics.Color barGradientColorTopEnd
-
barGradientColorMiddleStart
private org.eclipse.swt.graphics.Color barGradientColorMiddleStart
-
-
Constructor Detail
-
HeapManager
public HeapManager(org.eclipse.swt.widgets.Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.The style value is either one of the style constants defined in class
SWT
which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to construct- Throws:
java.lang.IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- See Also:
Composite(Composite, int)
,Widget.getStyle()
-
-
Method Detail
-
createBar
private void createBar()
Creates the bar that displays the memory
-
drawBar
private void drawBar(org.eclipse.swt.events.PaintEvent e)
Draw the bar- Parameters:
e
-PaintEvent
-
createButton
private void createButton()
Create the button used to perform GC
-
updateContent
private void updateContent()
Update the content of the bar
-
createDefaultColors
private void createDefaultColors()
Creates the default colors
-
getBarBorderColor
public org.eclipse.swt.graphics.Color getBarBorderColor()
- Returns:
- the barBorderColor
-
setBarBorderColor
public void setBarBorderColor(org.eclipse.swt.graphics.Color barBorderColor)
- Parameters:
barBorderColor
- the barBorderColor to set
-
getBarInnerColor
public org.eclipse.swt.graphics.Color getBarInnerColor()
- Returns:
- the barInnerColor
-
setBarInnerColor
public void setBarInnerColor(org.eclipse.swt.graphics.Color barInnerColor)
- Parameters:
barInnerColor
- the barInnerColor to set
-
getBarTextColor
public org.eclipse.swt.graphics.Color getBarTextColor()
- Returns:
- the barTextColor
-
setBarTextColor
public void setBarTextColor(org.eclipse.swt.graphics.Color barTextColor)
- Parameters:
barTextColor
- the barTextColor to set
-
getBarGradientColorTopStart
public org.eclipse.swt.graphics.Color getBarGradientColorTopStart()
- Returns:
- the barGradientColorTopStart
-
setBarGradientColorTopStart
public void setBarGradientColorTopStart(org.eclipse.swt.graphics.Color barGradientColorTopStart)
- Parameters:
barGradientColorTopStart
- the barGradientColorTopStart to set
-
getBarGradientColorTopEnd
public org.eclipse.swt.graphics.Color getBarGradientColorTopEnd()
- Returns:
- the barGradientColorTopEnd
-
setBarGradientColorTopEnd
public void setBarGradientColorTopEnd(org.eclipse.swt.graphics.Color barGradientColorTopEnd)
- Parameters:
barGradientColorTopEnd
- the barGradientColorTopEnd to set
-
getBarGradientColorMiddleStart
public org.eclipse.swt.graphics.Color getBarGradientColorMiddleStart()
- Returns:
- the barGradientColorMiddleStart
-
setBarGradientColorMiddleStart
public void setBarGradientColorMiddleStart(org.eclipse.swt.graphics.Color barGradientColorMiddleStart)
- Parameters:
barGradientColorMiddleStart
- the barGradientColorMiddleStart to set
-
-