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

    Constructors
    Constructor
    Description
    HistogramTextControl(HistogramView parentView, org.eclipse.swt.widgets.Composite parent, String label, long value)
    Constructor with given group and text values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener)
    Add a mouse wheel listener to the text control
    void
    Dispose of the widget
    void
    focusGained(org.eclipse.swt.events.FocusEvent event)
     
    void
    focusLost(org.eclipse.swt.events.FocusEvent event)
     
    long
    Returns the time value.
    boolean
    Returns if widget isDisposed or not
    void
    keyPressed(org.eclipse.swt.events.KeyEvent event)
     
    void
    keyReleased(org.eclipse.swt.events.KeyEvent e)
     
    void
    removeMouseWheelListener(org.eclipse.swt.events.MouseWheelListener listener)
    Remove a mouse wheel listener from the text control
    void
    setEnabled(boolean enabled)
    Enables the receiver if the argument is true, and disables it otherwise.
    void
    setLayoutData(org.eclipse.swt.layout.GridData layoutData)
    Set the Grid Layout Data for the group.
    abstract void
    setValue(long time)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 composite
      label - The text label
      value - The initial value
  • Method Details

    • dispose

      public void dispose()
      Dispose of the widget
    • isDisposed

      public boolean isDisposed()
      Returns if widget isDisposed or not
      Returns:
      true if widget is disposed else false
    • 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 is true, 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:
      focusGained in interface org.eclipse.swt.events.FocusListener
    • focusLost

      public void focusLost(org.eclipse.swt.events.FocusEvent event)
      Specified by:
      focusLost in interface org.eclipse.swt.events.FocusListener
    • keyPressed

      public void keyPressed(org.eclipse.swt.events.KeyEvent event)
      Specified by:
      keyPressed in interface org.eclipse.swt.events.KeyListener
    • keyReleased

      public void keyReleased(org.eclipse.swt.events.KeyEvent e)
      Specified by:
      keyReleased in interface org.eclipse.swt.events.KeyListener