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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.graphics.RGB
Returns the state color.float
Returns the state height factor.Returns the state string.int
Returns the state width.Gets the height factor of a given state (how thick it will be when displayed)void
reset()
Reset the style to the original valuesvoid
setStateColor
(org.eclipse.swt.graphics.RGB stateColor) Sets the state color.void
setStateString
(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
-