IltCardBaseRenderer
is the same as to create a new IltNEBaseRenderer. For details, refer to Extending the class IltNEBaseRenderer.
IltCard.Type MyType = new IltCard.Type("CType"); IltSettings.SetValue("Card.Type.CType.Renderer", new IltBaseRendererFactory() { public IltBaseRenderer createValue() { return new MyCardTypeBaseRenderer(); } });
setting."ilog.tgo.model.IltCard"{ types[0]: @+cardType0; } Subobject#cardType0 { class: 'ilog.tgo.model.IltCard.Type'; name: "CType"; }
renderer
.
setting."ilog.tgo.model.IltCard.Type"[name="CType"] { renderer: @+cardRendererFactory; } Subobject#cardRendererFactory { class: 'MyCardRendererFactory'; }
MyCardRendererFactory
.
String fileName = "rj45.png"; // create the new type that will be associated with the GIF image IltCard.Type cardType = new IltCard.Type("RJ45"); try { // Retrieve the image using the Image Repository Image img = IltSystem.GetDefaultContext().getImageRepository().getImage(fileName); // then map the drawer factory created using the GIF with the new type IltCardImageBaseRendererFactory factory = new IltCardImageBaseRendererFactory(img, 255, 1, 255); IltSettings.SetValue("Card.Type.RJ45.Label", "RJ45"); IltSettings.SetValue("Card.Type.RJ45.Renderer", factory); // Note: the numerical values above have been adjusted using the // Image Color Tuner application provided with JTGO. } catch (Exception e) { e.printStackTrace(); }
IltCard.Type cardType = new IltCard.Type("RJ45");
setting."ilog.tgo.model.IltCard"{ types[0]: @+cardType0; } Subobject#cardType0 { class: 'ilog.tgo.model.IltCard.Type'; name: "RJ45"; }
IltSettings.SetValue("Card.Type.RJ45.Label", "RJ45"); IltSettings.SetValue("Card.Type.RJ45.Renderer", new IltCardDirectImageBaseRendererFactory());
setting."ilog.tgo.model.IltCard.Type"[name=RJ45] { renderer: @+cardRendererFactory; } Subobject#cardRendererFactory { class: 'ilog.tgo.graphic.renderer.IltCardDirectImageBaseRendererFactory'; }
object."ilog.tgo.model.IltCard"["type"=RJ45]["objectState.Bellcore.State"=En abledIdle] { sourceImage: '@|image("CardRJ45_EnabledIdle.png")'; alarmColorLevel: 128; } object."ilog.tgo.model.IltCard"["type"=RJ45]["objectState.Bellcore.State"=Di sabledIdle] { sourceImage: '@|image("CardRJ45_DisabledIdle.png")'; alarmColorLevel: 140; }
ilog.tgo.Card_Type_<TYPE NAME>
: card type labels
ilog.tgo.Card_Type_<TYPE
NAME>_ToolTip
: card type tooltips
IltCard.Type MyType = new IltCard.Type("CType");
JTGOMessages.properties
file:
ilog.tgo.Card_Type_CType=C Type
ilog.tgo.Card_Type_CType_ToolTip=My
New Card Type
IltTinyBaseRenderer
is the same as to create a new IltNEBaseRenderer. For details, refer to Extending the class IltNEBaseRenderer.
IltCard.Type MyType = new IltCard.Type("CType"); IltSettings.SetValue("Card.TinyType.CType.Renderer", new IltTinyImageBaseRendererFactory(YOUR_IMAGE, YOUR_IMAGE_PARAMETERS));
tinyRenderer
. In the example below, the name of the renderer factory class
that is included in the search path is
MyCardTinyRendererFactory
.
setting."ilog.tgo.model.IltCard.Type"[name="CType"] { tinyRenderer: @+cardTinyRendererFactory0; } Subobject#CardTinyRendererFactory0 { class: 'MyCardTinyRendererFactory'; }
Property
Name |
Type |
Default
Value |
Description
|
---|---|---|---|
verticalLabelStacksGlyphs
|
boolean
|
false
|
Denotes the way a vertical label is built. If this property
is set to
true
, the vertical label is build by stacking the characters. In
this case, the properties
labelWrappingMode,
labelWrappingWidth
, and
labelWrappingHeight
are ignored.
|
object."ilog.tgo.model.IltCard" { labelPosition: Bottom; labelSpacing: 25; }