Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Nebula CSS Oscilloscope
Introduction
This page explains how to use the CSS theming for the Oscilloscope widget.
Contents
Installation
In you e4 application you can install :
- The plugin org.eclipse.nebula.widgets.oscilloscope.css OR
- The feature org.eclipse.nebula.widgets.oscilloscope.css.feature
Properties
General Properties
These properties allow the developer to customize the grid displayed in the background.
SWT Method | Impact | CSS Property Name | CSS Example |
---|---|---|---|
setGridSquareSize(int size) | Set the size of the square (in pixels) | grid-square-size | Oscilloscope { grid-square-size: 30px; } |
setGridLineWidth(int gridLineWidth) | Set the line width of the square (in pixels) | grid-line-width | Oscilloscope { grid-line-width: 5px; } |
setGridBackground(Color gridBackground) | Set color of the background | grid-background-color | Oscilloscope { grid-background-color: #808080; } |
setGridForeground(Color gridBackground) | Set color of the grid | grid-color | Oscilloscope { grid-color: darkred; } |
Graphs Properties
These properties allow the developer to customize the graphics displayed.
Each graph displayed in the oscilloscope has an integer identifier, called channel number You can access each graph by replacing "-n" by the identifier (for example channel-color-0 for the first channel, channel-color-1 for the second channel...).
You can customize up to 10 channels (from 0 to 9)
SWT Method | Impact | CSS Property Name | CSS Example |
---|---|---|---|
setForeground(int channel, Color color) | Set color of the graph | channel-color-n | Oscilloscope { channel-color-0: #FF6A00; } |
setActiveForegoundColor(Color color) | Set color of the graph when active | channel-active-color-n | Oscilloscope { channel-active-color-0: blue; } |
setInactiveForegoundColor(Color color) | Set color of the graph when not active | channel-inactive-color-n | Oscilloscope { channel-inactive-color-0: darkred; } |
Examples
An e4 example application called org.eclipse.nebula.widgets.oscilloscope.example.e4 shows how to customize the Oscilloscope widget.
This example is also available here : org.eclipse.nebula.widgets.oscilloscope.example.e4