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.CompositeInstances 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.Canvasbarprivate org.eclipse.swt.graphics.ColorbarBorderColorprivate org.eclipse.swt.graphics.ColorbarGradientColorMiddleStartprivate org.eclipse.swt.graphics.ColorbarGradientColorTopEndprivate org.eclipse.swt.graphics.ColorbarGradientColorTopStartprivate org.eclipse.swt.graphics.ColorbarInnerColorprivate org.eclipse.swt.graphics.ColorbarTextColorprivate org.eclipse.swt.widgets.Buttonbuttonprivate intheapMaxSizeprivate intheapSize
-
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 voidcreateBar()Creates the bar that displays the memoryprivate voidcreateButton()Create the button used to perform GCprivate voidcreateDefaultColors()Creates the default colorsprivate voiddrawBar(org.eclipse.swt.events.PaintEvent e)Draw the barorg.eclipse.swt.graphics.ColorgetBarBorderColor()org.eclipse.swt.graphics.ColorgetBarGradientColorMiddleStart()org.eclipse.swt.graphics.ColorgetBarGradientColorTopEnd()org.eclipse.swt.graphics.ColorgetBarGradientColorTopStart()org.eclipse.swt.graphics.ColorgetBarInnerColor()org.eclipse.swt.graphics.ColorgetBarTextColor()voidsetBarBorderColor(org.eclipse.swt.graphics.Color barBorderColor)voidsetBarGradientColorMiddleStart(org.eclipse.swt.graphics.Color barGradientColorMiddleStart)voidsetBarGradientColorTopEnd(org.eclipse.swt.graphics.Color barGradientColorTopEnd)voidsetBarGradientColorTopStart(org.eclipse.swt.graphics.Color barGradientColorTopStart)voidsetBarInnerColor(org.eclipse.swt.graphics.Color barInnerColor)voidsetBarTextColor(org.eclipse.swt.graphics.Color barTextColor)private voidupdateContent()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
SWTwhich 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 thoseSWTstyle 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
-
-