skip to main content
Programmers documentation > Styling > Customizing links > Changing the representation of individual links
 
Changing the representation of individual links
By default, the representation of the base of a link is determined by its base style, which is itself calculated from the state of the link.
How to change the graphical representation of a link (using CSS)
You might want to define specific link representations, regardless of the base styles managed by JViews TGO (when you do not use states, for example). In this case, you can change the representation of the link using cascading style sheets.
The following example shows an extract of a CSS file which changes the representation of a given link. Note that to make this possible, you must use the object state IltAlarmObjectState, IltTrapObjectState, or no object state at all for this specific link, since using another state system would force the appearance of the link base.
 
#myLink {
  centerWidth: 6;
  foreground: blue;
  background: '';
  lineStyle: "3.000001, 1.000001";
  borderWidth: 3;
  borderColor: yellow;
  borderColor2: blue;
  reliefBorders: false;
  borderLineStyle: Dot;
}
For details on how to load a configuration like this one in a network component, see How to load a CSS file in a network component.
The link is represented as a hatched central line with a blue background color and two identical border lines hatched in yellow on a transparent background, as shown below:
Customizing a link representation
Changing the representation of links based on states and llarms
For details about how to customize the links that are based on object and alarm states, refer to Customizing the object representation based on states.
Customizing link states and alarms
For information on how to customize the link representation when it contains states and alarms, refer to Customizing object and alarm states of predefined business objects. The information that you will find in that section is valid for all IltObject classes.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.