Customizing the secondary state icons
Secondary states are normally represented by icons, gauges, charts, or counters, which are displayed in a row (called stacker) on the top or at the bottom of an
IltObject. By default, the position of the secondary states is defined by the insertion order in the object state. Depending on your application, you may be interested in defining specific positions for some states. This can be accomplished by configuring the secondary state positioner.
The position of the icons in the stacker is defined globally inside the static instance of
IltSecondaryStatePositioner.
The following fragment of code illustrates how you should proceed to force the
Degraded to be constantly in the first position of the stacker.
IltSecondaryStatePositioner positioner =
IltSecondaryStatePositioner.GetInstance();
positioner.setPosition (IltOSI.Availability.Degraded, 0);
If you have decided to remove this constraint, you just need to set the new position to -1, to indicate that it will no longer be handled by the
IltSecondaryStatePositioner.
positioner.setPosition (IltOSI.Availability.Degraded, -1);
Secondary states can also be located in two specific positions, called
InState and
OutState. By default, the SNMP states
Interface.InOctets and
Interface.OutOctets are displayed in these positions, as illustrated in
Positions of SNMP states Interface.InOctets and Interface.OutOctets.
Positions ofSNMP states Interface.InOctets and Interface.OutOctets
To place a state in the
InState or
OutState position, use the methods
setInState or
setOutState, as illustrated in the code extracts below:
positioner.setInState (IltSNMP.Interface.InDiscards);
or
positioner.setOutState (IltSNMP.Interface.OutDiscards);
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.