Customizing link tiny types
In the tree and table components, link objects are represented as tiny objects. Each link tiny type can be associated with a tiny base renderer that draws the tiny graphic representation.
JViews TGO allows you to customize the tiny type representation by using one of the predefined base renderer factories, such as
IltTinyImageBaseRendererFactory or
IltTinySVGBaseRendererFactory, or by creating your own implementation of
IltTinyBaseRenderer. The principle to create a new
IltTinyBaseRenderer is the same as to create a new
IltNEBaseRenderer. For details, refer to
Extending the class IltNEBaseRenderer.
For details about how to create image base renderers, refer to
Creating network element types from images and customizing them.
How to create and register a link tiny type (using the API)
IltObject.TinyType MyTinyType = new IltObject.TinyType("MyTinyType");
IltSettings.SetValue("Link.TinyType.MyTinyType.Renderer",
new IltTinyImageBaseRendererFactory(YOUR_IMAGE, YOUR_IMAGE_PARAMETERS));
How to create and register a link tiny type (using CSS)
You can also create new tiny types by using global CSS settings (:
setting."ilog.tgo.model.IltObject"{
tinyTypes[0]: @+tinyType0;
}
Subobject#tinyType0 {
class: 'ilog.tgo.model.IltObject.TinyType';
name: "MyTinyType";
}
How to customize a link tiny type (using CSS)
You can customize the renderer using global CSS settings. The CSS property to customize here is linkTinyRenderer. In the following example, the name of the renderer factory class that is included in the search path is MyLinkTinyRendererFactory.
setting."ilog.tgo.model.IltLink.TinyType"[name="MyTinyType"] {
tinyRenderer: @+linkTinyRendererFactory;
}
Subobject#linkTinyRendererFactory {
class: 'MyLinkTinyRendererFactory';
}
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.