Class HistogramTextControl
java.lang.Object
org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramTextControl
- All Implemented Interfaces:
EventListener,org.eclipse.swt.events.FocusListener,org.eclipse.swt.events.KeyListener
- Direct Known Subclasses:
HistogramCurrentTimeControl,HistogramTimeRangeControl
public abstract class HistogramTextControl
extends Object
implements org.eclipse.swt.events.FocusListener, org.eclipse.swt.events.KeyListener
This control provides a group containing a text control.
- Version:
- 1.1
- Author:
- Francois Chouinard
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramTextControl(HistogramView parentView, org.eclipse.swt.widgets.Composite parent, String label, long value) Constructor with given group and text values. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener) Add a mouse wheel listener to the text controlvoiddispose()Dispose of the widgetvoidfocusGained(org.eclipse.swt.events.FocusEvent event) voidfocusLost(org.eclipse.swt.events.FocusEvent event) longgetValue()Returns the time value.booleanReturns if widget isDisposed or notvoidkeyPressed(org.eclipse.swt.events.KeyEvent event) voidkeyReleased(org.eclipse.swt.events.KeyEvent e) voidremoveMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener) Remove a mouse wheel listener from the text controlvoidsetEnabled(boolean enabled) Enables the receiver if the argument istrue, and disables it otherwise.voidsetLayoutData(org.eclipse.swt.layout.GridData layoutData) Set the Grid Layout Data for the group.abstract voidsetValue(long time)
-
Constructor Details
-
HistogramTextControl
public HistogramTextControl(HistogramView parentView, org.eclipse.swt.widgets.Composite parent, String label, long value) Constructor with given group and text values.- Parameters:
parentView- The parent histogram view.parent- The parent compositelabel- The text labelvalue- The initial value
-
-
Method Details
-
dispose
public void dispose()Dispose of the widget -
isDisposed
public boolean isDisposed()Returns if widget isDisposed or not- Returns:
trueif widget is disposed elsefalse
-
setLayoutData
public void setLayoutData(org.eclipse.swt.layout.GridData layoutData) Set the Grid Layout Data for the group.- Parameters:
layoutData- A GridData to set.
-
setEnabled
public void setEnabled(boolean enabled) Enables the receiver if the argument istrue, and disables it otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.- Parameters:
enabled- the new enabled state
-
setValue
public abstract void setValue(long time) - Parameters:
time- the time value to display
-
getValue
public long getValue()Returns the time value.- Returns:
- time value.
-
addMouseWheelListener
public void addMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener) Add a mouse wheel listener to the text control- Parameters:
listener- the mouse wheel listener
-
removeMouseWheelListener
public void removeMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener) Remove a mouse wheel listener from the text control- Parameters:
listener- the mouse wheel listener
-
focusGained
public void focusGained(org.eclipse.swt.events.FocusEvent event) - Specified by:
focusGainedin interfaceorg.eclipse.swt.events.FocusListener
-
focusLost
public void focusLost(org.eclipse.swt.events.FocusEvent event) - Specified by:
focusLostin interfaceorg.eclipse.swt.events.FocusListener
-
keyPressed
public void keyPressed(org.eclipse.swt.events.KeyEvent event) - Specified by:
keyPressedin interfaceorg.eclipse.swt.events.KeyListener
-
keyReleased
public void keyReleased(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyReleasedin interfaceorg.eclipse.swt.events.KeyListener
-