skip to main content
Programmers documentation > Styling > Customizing shelves and cards > Representing and customizing LEDs
 
Representing and customizing LEDs
Representing LEDs
The graphic representation of LEDs is intended to be simple and reduced. Therefore it is only based on the attributes type and name, and on the alarms set in the object state, but not on any other state information.
*Type: Circular
*Name: L0
*Object State: OSI Object State with Alarms
A LED representation
Customizing LED representations
LEDs are meant to be simple objects with a reduced graphical representation. In this representation, the only property used to customize the LED representation is the property foreground, which defines the color of the graphic object.
By default, this color is mapped from the alarm information set in the object.
CSS property for LED representations
Property Name
Type
Set
Default Value
Description
foreground
Color
Yes
lightGray
Denotes the color of the LED.
Label and tooltip for port types
The predefined LED types have a label and a tooltip specified in the JViews TGO resource bundle.
The resources that apply to LED types are identified as:
*ilog.tgo.LED_Type_<TYPE NAME> : LED type labels
*ilog.tgo.LED_Type_<TYPE NAME>_ToolTip : LED type tooltips
You can edit the values directly in the JViews TGO resource bundle files.
When you create new LED types, the label and tooltip information will also be retrieved from this resource bundle to be displayed, for example, in a table cell. As you declare new LED types, register the corresponding entries in the resource bundle file.
Suppose that you have created the following new LED type:
 
IltLed.Type batteryType = new IltLed.Type("Battery");
You should declare the following properties in the JTGOMessages.properties file:
*ilog.tgo.LED_Type_Battery=Battery
*ilog.tgo.LED_Type_Battery_ToolTip=Battery Indicator

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.