|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.util.IlEnum
ilog.tgo.model.IltCardItem.Type
ilog.tgo.model.IltLed.Type
public static class IltLed.Type
This enumeration lists the types of LED objects.
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). ILOG 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 ILOG JTGO resource bundle in order to have this type attribute properly represented in the Table component:
ilog.tgo.LED_Type_=
IltLedBaseRenderer,
IltLedImageBaseRendererFactory,
IltLedSVGBaseRendererFactory| Field Summary | |
|---|---|
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. |
| Constructor Summary | |
|---|---|
IltLed.Type()
Default constructor. |
|
IltLed.Type(String name)
Creates a new type. |
|
| Method Summary |
|---|
| Methods inherited from class ilog.tgo.model.IltCardItem.Type |
|---|
setName |
| Methods inherited from class ilog.util.IlEnum |
|---|
getName, intern, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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".
| Constructor Detail |
|---|
public IltLed.Type(String name)
name - A unique name.public IltLed.Type()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||