ilog.tgo.model
Class IltLed.Type

java.lang.Object
  extended by ilog.util.IlEnum
      extended by ilog.tgo.model.IltCardItem.Type
          extended by ilog.tgo.model.IltLed.Type
Enclosing class:
IltLed

public static class IltLed.Type
extends IltCardItem.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_=

See Also:
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

metainfo

public static IlEnumInfo metainfo
Contains metainformation about this IlEnum class.

Internal method or field: do not use!

Circular

public static IltLed.Type Circular
This type defines a standard circular LED.


Rectangular

public static IltLed.Type Rectangular
This type defines a standard rectangular LED.


CircularFlat

public static IltLed.Type CircularFlat
This type defines a standard flat circular LED.


CircularShape

public static IltLed.Type CircularShape
This type defines a standard simple circular LED.


RectangularShape

public static IltLed.Type RectangularShape
This type defines a standard simple rectangular LED.


HardDisk_A

public static IltLed.Type HardDisk_A
Defines a Hard Disk LED.

It is based on a single image; the entire image area "glows".


HardDiskPwr_A

public static IltLed.Type HardDiskPwr_A
Defines a Hard Disk power LED.

It is based a single image; the entire image area "glows".


Power_A

public static IltLed.Type Power_A
Defines a Power LED.

It is based on a single image; the entire image area "glows".


HardDisk_B

public static IltLed.Type HardDisk_B
Defines a Hard Disk LED.

It is based on two images and only a specific image area "glows".


HardDiskPwr_B

public static IltLed.Type HardDiskPwr_B
Defines a Hard Disk power LED.

It is based on two images and only a specific image area "glows".


Power_B

public static IltLed.Type Power_B
Defines a Power LED.

It is based on two images and only a specific image area "glows".

Constructor Detail

IltLed.Type

public IltLed.Type(String name)
Creates a new type.

Parameters:
name - A unique name.

IltLed.Type

public IltLed.Type()
Default constructor. This constructor is used by CSS styling mechanism and is not meant to be called directly.

Internal method or field: do not use!


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.