Class StateItem
java.lang.Object
org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem
Class that contains the color of a state and the corresponding state string
to display.
- Version:
- 1.0
- Author:
- Bernd Hufmann
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.graphics.RGBReturns the state color.floatReturns the state height factor.Returns the state string.intReturns the state width.Gets the height factor of a given state (how thick it will be when displayed)voidreset()Reset the style to the original valuesvoidsetStateColor(org.eclipse.swt.graphics.RGB stateColor) Sets the state color.voidsetStateString(String stateString) Sets the state string
-
Field Details
-
UNDEFINED_STATE_NAME
Name of state if not known- See Also:
-
-
Constructor Details
-
StateItem
Copy constructor, from a map- Parameters:
style- the map of styles- Since:
- 3.2
-
StateItem
Creates a state color - state string pair.- Parameters:
stateColor- A state colorstateString- 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
Returns the state string.- Returns:
- the state string.
-
reset
public void reset()Reset the style to the original values- Since:
- 3.2
-
setStateString
Sets the state string- Parameters:
stateString- A state string to set
-
getStyleMap
Gets the height factor of a given state (how thick it will be when displayed)- Returns:
- The map of styles
- Since:
- 3.0
-