public static class IltLed.Type extends IltCardItem.Type
LED type information specifies the category of an LED object
and defines how the object will be graphically represented.
If a type is not explicitely defined, a default value is used
(IltLed.DefaultType
). You can modify the type information on an LED
object, by setting the value of
IltCardItem.TypeAttribute
or by using the
method IltLed.setType(ilog.tgo.model.IltLed.Type)
.
You can declare new types of LEDs by creating new instances for this class. Each type instance must have a name, that is used as a unique identifier. The following example shows how you can create a new LED type:
IltLed.Type newType = new IltLed.Type(YOUR_NEW_TYPE_NAME);
The graphic representation associated with an LED type is defined
through LED base renderers
(IltLedBaseRenderer
). JTGO provides
a set of predefined LED types with their corresponding representation. You
can change the LED type predefined renderers or define new base renderers
for your new LED types through @link ilog.tgo.resource.IltSettings},
as illustrated below:
try { Image img = null; URL url = new URL("file","",YOUR_IMAGE_FILE_NAME); img = java.awt.Toolkit.getDefaultToolkit().getImage(url); if (img != null) { IltLedImageBaseRendererFactory factory = new IltLedImageBaseRendererFactory( img , YOUR_IMAGE_PARAMETERS ); IltSettings.SetValue("Led.Type.YOUR_NEW_TYPE_NAME.Renderer" , factory ); } } catch (Exception e) {e.printStackTrace();}
Once you create a new type, register the following resources in the JTGO resource bundle in order to have this type attribute properly represented in the Table component:
ilog.tgo.LED_Type_<YOUR TYPE NAME>=<Label value> ilog.tgo.LED_Type_<YOUR_TYPE_NAME>_ToolTip=<ToolTip value>
Modifier and Type | Field and Description |
---|---|
static IltLed.Type |
Circular
This type defines a standard circular LED.
|
static IltLed.Type |
CircularFlat
This type defines a standard flat circular LED.
|
static IltLed.Type |
CircularShape
This type defines a standard simple circular LED.
|
static IltLed.Type |
HardDisk_A
Defines a Hard Disk LED.
|
static IltLed.Type |
HardDisk_B
Defines a Hard Disk LED.
|
static IltLed.Type |
HardDiskPwr_A
Defines a Hard Disk power LED.
|
static IltLed.Type |
HardDiskPwr_B
Defines a Hard Disk power LED.
|
static IlEnumInfo |
metainfo
Contains metainformation about this
IlEnum class. |
static IltLed.Type |
Power_A
Defines a Power LED.
|
static IltLed.Type |
Power_B
Defines a Power LED.
|
static IltLed.Type |
Rectangular
This type defines a standard rectangular LED.
|
static IltLed.Type |
RectangularShape
This type defines a standard simple rectangular LED.
|
public static IlEnumInfo metainfo
IlEnum
class.public static IltLed.Type Circular
public static IltLed.Type Rectangular
public static IltLed.Type CircularFlat
public static IltLed.Type CircularShape
public static IltLed.Type RectangularShape
public static IltLed.Type HardDisk_A
It is based on a single image; the entire image area "glows".
public static IltLed.Type HardDiskPwr_A
It is based a single image; the entire image area "glows".
public static IltLed.Type Power_A
It is based on a single image; the entire image area "glows".
public static IltLed.Type HardDisk_B
It is based on two images and only a specific image area "glows".
public static IltLed.Type HardDiskPwr_B
It is based on two images and only a specific image area "glows".
public static IltLed.Type Power_B
It is based on two images and only a specific image area "glows".
public Type(String name)
name
- A unique name.public Type()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.