java.lang.Object
org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem

public class StateItem extends Object
Class that contains the color of a state and the corresponding state string to display.
Version:
1.0
Author:
Bernd Hufmann
  • Field Details

  • Constructor Details

    • StateItem

      public StateItem(Map<String,Object> style)
      Copy constructor, from a map
      Parameters:
      style - the map of styles
      Since:
      3.2
    • StateItem

      public StateItem(org.eclipse.swt.graphics.RGB stateColor, String stateString)
      Creates a state color - state string pair.
      Parameters:
      stateColor - A state color
      stateString - A state string
  • Method Details

    • getStateColor

      public org.eclipse.swt.graphics.RGB getStateColor()
      Returns the state color.
      Returns:
      Returns the state color.
    • setStateColor

      public void setStateColor(org.eclipse.swt.graphics.RGB stateColor)
      Sets the state color.
      Parameters:
      stateColor - A state color to set
    • getStateHeightFactor

      public float getStateHeightFactor()
      Returns the state height factor.
      Returns:
      Returns the state height factor.
      Since:
      4.3
    • getStateWidth

      public int getStateWidth()
      Returns the state width.
      Returns:
      Returns the state width.
      Since:
      6.1
    • getStateString

      public String getStateString()
      Returns the state string.
      Returns:
      the state string.
    • reset

      public void reset()
      Reset the style to the original values
      Since:
      3.2
    • setStateString

      public void setStateString(String stateString)
      Sets the state string
      Parameters:
      stateString - A state string to set
    • getStyleMap

      public Map<String,Object> getStyleMap()
      Gets the height factor of a given state (how thick it will be when displayed)
      Returns:
      The map of styles
      Since:
      3.0