Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Nebula CSS Oscilloscope

< Back to Nebula Main Page

Introduction

This page explains how to use the CSS theming for the Oscilloscope widget.

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

Oscilloscope1.png

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

Oscilloscope2.png

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

Back to the top