Rogue Wave Knowledge Base
Browse by category:
Knowledgebase | Glossary | Ask a Question |

Introduction to the JViews TGO layer policy

Article ID: 2126
Last updated: 28 May, 2018
Revision: 2
print  Print
share  Share
Views: 801
Posted: 26 Jan, 2011
by Dean J.
Updated: 28 May, 2018
by Gargani A.


How do I implement my own layer policy?


Introduction to Layers

Layers are storage places for graphic objects in a grapher. 
The layer policy defines the layer on which an object is placed.

The Rogue Wave ILOG JViews TGO grapher applies the following default layer policy:

  • Nodes are gathered on the same layer.
  • Links are gathered on a layer below the node layer.
  • Polygons are gathered on a layer below the link layer.
  • Expanded subnetworks are gathered on a layer below the node layer.
JViews TGO adopts the following conventions for displaying network objects and their associated decorations:
  • Within a layer, a graphic object is displayed with all its related decorations (site label, function icon, family label, status icon, and so on).
  • The only exception concerns alarm balloons, which are systematically displayed above all the objects in the view. Information windows are displayed above all other objects.

Expanded subnetworks are also graphers, therefore each subnetwork has its own set of layers and the same layer policy applies.

The layer choice for a given object (along with all its associated decorations) can be customized through the class IltLayerPolicy. 
You can find a complete sample in the JViews TGO distribution, see:


Sample decoration

In this sample, the layer policy defines the layer on which each decoration of an object representation is placed.

Visibility Handling

Visibility can be controlled at the adapter level through the use of the filter capabilities, but the layer policy can also be used to handle in-memory visibility of graphic objects. Take the following two examples:

  • Alarm Visibility : You want to put the objects with alarms on one layer and the objects without alarms on another layer. This way, you can choose to set a layer to invisible to display only the objects with alarms.
  • Parallel Networks : You have two parallel networks and you want to display only one at a time, or have the possibility to switch the network visibility.

1- Alarm Visibility

You have to check if the object has an alarm and then put it on the corresponding layer. 
Using the sample of the distribution, you must declare a layer for the objects with alarms (for example, _alarmLayer) and another layer for the objects without alarms (for example, _noAlarmLayer), instead of declaring a layer for the groups, one for the links, and so on. 
The "sorting" is done through the method IltLayerPolicy.getDefaultLayer(). Here, you can check whether the IltObject.AlarmCountNumberAttribute attribute value from the representation object is greater than 0 . If you must work with different alarm severities, you can, for example, use the IltObject.AlarmHighestSeverityAttribute attribute value from the same representation object.

The following code is a possible implementation for the method IltLayerPolicy.getDefaultLayer():

public IltcLayer getDefaultLayer (IltcCompositeGraphic graphic) {
if (graphic instanceof IltCompositeGraphic) { 
IlpRepresentationObject object = graphic.getRepresentationObject();
if (null != object) { 
alarmCount = object.getAttributeValue(IltObject.AlarmCountNumberAttribute);
if(alarmCount instanceof Integer && ((Integer)alarmCount).intValue() > 0)
return _alarmLayer;
return _mainLayer;

Each time the graphic object is internally recomputed, the layer policy puts the corresponding object on the correct layer. 
After the layer policy is implemented, you can turn the layer visibility on or off, so that only the objects of one layer are visible.

Note: Make sure that the alarm balloons are not on the same layer as the nodes, links, or groups. If you only turn off the visibility of the layer corresponding to a type of object, the alarm balloons are still visible. Therefore, you must also turn off the visibility of the alarm balloon layer.

2- Parallel Networks

Suppose that you have two networks in the same grapher but you do not want to systematically display both. Sometimes, you want to display only one of them and sometimes both.

Using the layer policy leads you to create two layers per object collection (alarm balloons, info windows...). The alarm balloons are displayed even when the elements to which they belong are on an invisible layer, as explained in the previous paragraph. This means that, if you turn off the visibility of a network in which some objects have alarms, the alarms are visible whereas the objects themselves are not. 
Therefore you must create two layers for the alarm balloons, two layers for the information windows, and so on.

To put an object on the proper layer, you can set a property to the object when you create it and use this property in the method IltLayerPolicy.getDefaultLayer() to know on which layer the object must be placed.

The following code is a possible implementation of the method IltLayerPolicy.getDefaultLayer():

public IltcLayer getDefaultLayer (IltcCompositeGraphic graphic) {
if (graphic instanceof IltCompositeGraphic) {
IlpRepresentationObject object = graphic.getRepresentationObject();
if (object != null) {
Object networkType = object.getAttributeValue(SOME_TYPE_ATTRIBUTE); 
 ("Type_A" == networkType) {
if (object instanceof IltGroup)
return _firstGroupLayer;
 (object instanceof IltAbstractLink)
return _firstLinkLayer;
else {
if (object instanceof IltGroup)
return _secondGroupLayer;
 (object instanceof IltAbstractLink)
return _secondLinkLayer;
return _secondMainLayer;

Another solution consists in using two IltCompositeGrapher instances and work with the visibility of the objects. 
The main constraint is that you cannot have objects that are common to the two networks. If some objects must be displayed in both networks, you must create them twice.

This article was:   Helpful | Not helpful Report an issue

Also listed in
folder Visualizations -> JViews -> TGO

Prev     Next
Manipulate the size of the network element       Subclasses of IlvManagerViewInteractor can be set to a network

Others in this category
b Collecting data for problems when using JViews products.
b Collecting data for problems when using Elixir product.
b Subclassing IlvBarChartRenderer,computeDataLabel() has no effect
b Multiple tab browser support
b Avoid HeadlessException when running JSF TGO component on headless environment
b Software end of service: ILOG Visualization - Replacements available
b Using Java and/or Swing objects in an IlvManager
b Support drag-and-drop in ILOG JViews
b JMenu or JPopupMenu "hidden" by the JViews IlvManagerView
b Improve the application performance
b Error "cannot find or create interactor nameOfInteractor" when using my own IlvObjectInteractor
b My custom IlvManagerViewInteractor.processXXXEvent() methods are not being called
b Adding a label to graphic object
b The nodes size appear to be modified after applying a graph layout algorithm
b Perform layout on views with transformers different than the identity
b Map projections overview
b Map Projections computed values bounds
b Free maps to download
b Map formats supported by JViews
b Adding geographic positioning information to bitmaps
b All you want to know about Shapefiles
b Adding a listener on the IlvGanttChart's JSplitPane
b Improve performance of my IlvGanttChart and IlvScheduleChart
b Changing the default leaf icon of an IlvTreeColumn
b Translate from mouse (x, y) coordinates to graphic objects and data model entities
b Polyline link points management
b Testing tools that can be used with JViews
b Dump an IlvManager as an image file
b IlvRectangle objects are not rotated or appear malformed when applying a rotation transformer
b Support of TIFF files
b IlvReliefLabel appears completely black
b Table like class availability in JViews Framework
b Mouse interaction with IlvGraphic objects
b Use of IlvFixedSizeGraphic or IlvHalfZoomingGraphic to control an object's size when zooming
b Display a vertical line in a JViews Gantt Chart to mark the current time
b Display a threshold (as an horizontal line) in my chart
b Finding the best way to enforce the logic implied by Gantt Chart constraints
b Making a graphic object transparent, that is, control the alpha value or make it "see-through"
b Making an interactor permanent
b Running JViews servlets in a UNIX headless environment
b Custom renderers and the Cascading Style Sheet (CSS)
b Pie Chart legend customization
b JViews framework and thread-safety
b Dataset point label manipulation
b Nodes decorations
b Disable movements and other interactions of reservations on an IlvScheduleChart or activities on an IlvGanttChart
b Scale units customization
b Multiline nodes labels
b Chart scale positioning
b Extend IlvLegend to arrange items into colums corresponding to the appropriate y-axis
b Subclassing IlvGeneralNode to add CSS parameters and change the node shape
b Hide the root row of the JViews Gantt chart
b Displaying a JComponent as a node in a nested graph
b Subclassing IlvAxisTransformer to reduce periodical differently sized gaps
b Localize an error in a MID or MIF file
b Set the stacking order for Gantt activities
b Load several .sdxl files into a single Gantt chart
b Setting the icon for each node relative to the CSS file
b Deep copy an IlvIcon so that the image inside it is also copied
b Removing points from a chart
b Enable internationalization in the MIDMIF reader
b Subclassing IlvFilterGanttModel
b Local-component tooltips in an SDM prototype
b Using script code in my SVG file
b Gantt Chart thin-client sample with custom server action
b Drawing a graphical object in a map
b Convert a JPEG, GIF or any other image into the IVL format using the JViews library
b An empty chart is displayed when the chart contains only one data point with the bar renderer
b Non-editable table columns in Gantt Chart
b Mouse-wheel interaction in JViews graphs
b Selecting and resizing nodes in an IlvSDMEngine object
b Resizing an IlvJComponentGraphic only rescales the JComponent
b IlvTextPath Sample
b IlvZoomViewInteractor does not maintain the aspect ratio that was set on it
b Specify the bubble size of Bubble Charts
b JViews and the Export Control Classification Numbers (ECCN) under U.S. export regulation
b Accessing and configuring JViews logging traces
b Increasing the tooltip show time and initial delay time in IlvHierarchyChart
b Tree Layout does not properly layout all the links as expected
b Specify different marker types for each data point and have these markers appear in the legend
b Memory keeps increasing as new IlvChart instances are created
b Activate animation during a graph layout with JViews Diagrammer
b Tree Graph with a tree nested grapher as a node
b Performing graphlayout on subgraphs that are connected by intergraph links
b Perform different graph layouts on nested graphers using XML and CSS
b "Add or Remove Programs" shows a large disk usage for JViews products
b Customize the chart decoration to draw a group of notes around a value of the abscissa axis
b Disable reconnection of link to a new anchor node outside an existing SDM node
b Filling the area that limited by two polylines
b Sample demonstrates how to mark specific points dynamically through CSS
b When the bounding box of an object in a grapher/manager changes, it seems to mess up the screen.
b Polyline-like link customization through css
b Edit and save an intermediate point of a polylink in the Designer
b When using an IlvLogarithmicAxisTransformer and setting the data range on an IlvAxis, this range is not taken into account
b Keeping the main view updated as the overview rectangle is being dragged
b Find the version, minor version, and patch level of my JViews JARs
b Eclipse platforms supported by JViews
b Adding a vertical scrollbar to Gantt table in thinclient application
b Filtering done at the data source level
b Custom Property Sheet Table
b Selection in Diagrammer/SDM often take a long time
b Create an image of the entire data range
b Message "Windows error 3 occurred while loading Java VM" when installing JViews
b Creating multiline tooltip for an activity
b Make the contents of a subgraph scrollable
b Customizing the movements of activities in my Gantt Chart
b Selecting data points in the chart
b IlvDiagrammer.printToBitmap() method does not print all nodes in the diagram
b CSS syntax to be used to specify a shape for a node
b Adjusting the way JViews Charts writes out JPEG files
b Getting or setting model properties via the API
b Using an inner class with the CSS class property in data model
b Exporting my Gantt chart to PDF
b Making a Demographic Chart
b Using the TRUNCATE and WORD_WRAP modes for my IlvGeneralNode and IlvSDMCompositeNode labels
b Warning message: The data model property <property> does not exist?
b My labels appear jagged or blurred when zoomed out
b Rendering the border of Activities as dotted lines
b Using API to access graphic properties specified in a CSS
b Adding a new time scale at the bottom of the Gantt Sheet
b Hiding properties in an IlvDiagrammerPropertySheet
b IlvDiagrammer does not refresh after I update my icon files
b Ajax used in JViews, and customizing Ajax-based features into a thin-client application
b Change the font and color of a single cell or entire row in the Gantt Table
b My nodes resized when I display them in a JSF environment
b Counting the number of IlvGraphic objects currently visible in IlvManagerView
b Patch installer hangs at the "Installing" step
b Speed up CPU usage when using cyclic datasets
b Reducing the CPU usage in real-time charts that are frequently updated
b Create a to refer to a CSS in a .jar file
b Extend the components of the Rich Web Charts framework
b Customize the look of a selection
b Change the default temporary-file directory used for JViews applications
b Outline an IlvLabel
b Creation and interaction of multi-points links in Diagrammer application
b ClassCastException occurs when deploying Web application on the Tomcat server that came with the JViews distribution
b Display the same order of data sets in the legend as in the Stacked chart area
b Disable the time indicator during a reshape interaction
b Displaying an image map for the title bar area of subgraphs in my JViews Diagrammer JSF Web application
b Interest of the reference View of the SDM engine
b Customize a charts symbol beyond the predefined parameters
b Sample of interactor that handles multiple Y axes zooming
b Slow response time when using interactor that involves drawing ghost rectangle
b Using the dataLabels value in the IlvSwingTableDataSource as the labels of the X axis
b The chart legend doesn't get repaint when changing chart renderer's style in SWT
b Date Line Wrapping feature
b JViews Maps polygons accuracy
b Making a diagram's background transparent to show the HTML page's background image as the background image of the diagram
b Use jvcf:chartSelectInteractor to select all points of a dataset in a JSF application
b Changing the Equipment component layers policy
b Degraded performance on remote Solaris machine vs local machine
b Use of the API to switch off the frame, the fill or the icon of an App6a symbol
b Retrieving a business object from a view interaction
b Pack200 with signed JARs
b Integrating JViews Framework link connectors in JViews TGO
b Change the behavior of the IlvDiagrammerViewBar's zoom buttons to zoom and focus on the selected graphic objects
b Populate an IlvSDMModel and create subgraphs programmatically
b Select a link in an IlvLinkBundle
b Getting the graphic representation of my IltNetworkElement.Type
b Hello World sample for Rogue Wave JViews TGO
b Hello World sample for JViews Charts
b Drawing the activity name on top of the activity bar
b Starting guide for using graph layout with JViews Diagrammer
b Use of IlvFilterSDMRenderer to set the background of a grapher using a CSS property
b Restrict the activity displacement/resize to a certain threshold to create a "snap" effect
b Customizing the vertical lines of the gantt sheet
b Difference between map layers and manager layers, and use in the IlvLayerTreePanel
b Support for cloned actions in the IlvDashboardEditBar
b Setting position of a symbol in the dashboard editor
b Printing diagrammer view at current zoom level
b Configure Eclipse to show JViews Javadoc
b Usage of IlvHitmapDefinition class to customize a tooltip in JSF
b PATH syntax for loading an image file into an IlvIcon instance
b Control the deletion of some selected nodes in a JSF application
b Unable to change the background color of the gantt's IlvTimeScale
b Making the background of Gantt Sheet transparent
b Silent JViews Installation
b Hiding the label of IlvGeneralLink
b SecurityException when using the latest jar files
b Programmatically expanding subgraphs
b Modify the keyboard shortcuts in Dashboard Editor
b Symbol Editor: relative path for an icon parameter
b Dashboard Editor Search Path for Palettes
b Blink property of JViews objects does not work on JSF page
b Extending the Symbol Editor with custom CSS functions
b Symbol works fine in English locale but disappears in Turkish locale
b Highlight row in the Gantt sheet of a Gantt chart when selecting an activity
b ConcurrentModificationException during diagram refresh in a JSF application
b Set a different background color for a specific interval in the gantt sheet
b Getting the activity on which a Collapse/Expand event occurs in the Gantt table
b Highlight the selected row of a gantt table in thin client environment
b Configuring Transparency value of layers in Map Builder
b Drawing a scale on every axis of a radar chart
b Security warning when running JViews application with applet on Microsoft Windows operating system
b Add App-6a symbol to palette bar
b Multiple tab browser support
b Control the visibility of the JSF JViews Gantt Chart root row
b Control the visibility of IlvMapLayers depending on the scale
b Always show the label on the activity in JViews Gantt
b Override the resizable view in JViews JSF application
b NotSerializableException when deploying chart/gantt/diagrammer on JSF
b Setting the Date Format in the csv flat file
b Prevent long labels on the horizontal axis from overlapping the 3D chart
b Getting java.lang.NoClassDefFoundError: com/ibm/icu/util/ULocale after migrating to JViews 8.8
b Display a label using IlvMakeMeasureInteractor when 2 points are really close to each other
b Increase width of IltLink on mouse over
b Hit-testing on various parts of a chart
b Reading DWG files in JViews Enterprise
b Customizing a predefined chart symbol in the distribution to use in Dashboard Editor
b Signing JViews jars when distributing them with my application
b Latest License Management System for ROGUEWAVE ILOG Visualization Products
b Some Asiatic characters are not displayed
b Select an activity and display popup menu with right click in thin client
b reading encoded JPEG Stream messages in servlet logs
b Customize tooltip text for SDM node
b Setting different tooltips on JSF objects in the same jsp page
b Render different colors for a symbol based on a property
b Performance difference between THREADED_REDRAW and DIRECT_REDRAW mode
b Special character is being added to node's label when exported to SVG file
b Expand or collapse a subnetwork programmatically
b Hard-coding the name of the icon in CSS
b Step by step to deploy a JViews application under WebSphere Application Server 8.0
b Usage example of IlvBusLayout
b reading encoded JPEG Stream messages in servlet logs
b Connecting data to multiple Y axis on chart
b Retrieving WGS84 coordinates from an USRP map
b Dynamically collapse objects with no new alarms and expand objects with new alarms by using CSS
b Logging facility for JTGO
b Implement dragging and dropping between the IlpTree and the IlpNetwork
b Using TableCellEditors with the IlpTable
b Implementing Alarm Propagation at the level of the data model
b JViews TGO Faces Web application deployment in TOMCAT 5.x or 6.x
b Disable sorting when clicking on the header of an IlpTable
b My application is slow on remote displays
b Using IltSettings.SetValue to change the graphic representation does not work
b Usage of JTGO in a multithreaded application
b Updating the style information through the API
b Patch installer hangs at the "Installing" step
b Is Rogue Wave JViews 100% Java coded?
b Support of Java 2 platform SDKs by Rogue Wave JViews
b Internationalization in Composer sample
b JViews graphic objects do not derive from java.awt.Component or javax.swing.JComponent classes
b Notification when a subnetwork is collapsed or expanded
b Show only a selection of object hierarchies in the network
b Dynamically expand/collapse a network element based on new alarms via CSS
b IlpTree is not re-sorted after a change to an object in the tree
b Restrict panning to the boundaries of my Network or Equipment component
b Setting an IlpGeographicPositionConverter via CSS
b Load-On-Demand (LOD) mechanisms can be used with ILOG JTGO
b Enable object interactor to work along with IlvManagerViewInteractor.
b Difference between the methods performLayoutOnce and setNodeLayout
b Calling fitTransformerToContents does not always work
b Set a select interactor to a network
b Display certain types of IltObject on top of another type of IltObject
b Styling management evolution among versions
b IlpEquipment-specific tips that can be used to improve performance
b Object identifier for IlpObject
b Objects alarm state in ILOG JTGO
b Manipulate the size of the network element
b Subclasses of IlvManagerViewInteractor can be set to a network
b The relationship between the classes IltObject, IlpObject, IlpClass and IlpRepresentationObject
b Handle the visibility of the objects
b Retrieving IlpGraphic or the IlvGraphic corresponding to an IltObject
b Sample showing a network component with BTS elements
b Customizing predefined interactor buttons on the toolbar
b Filtering objects representation creation at datasource addition time
b Tips to improve performance on IlpNetwork
b Filtering techniques available with JViews TGO
b Sample showing how zooming on a network component can affect the visibility of labels
b Changing the appearance of the constraints in a Gantt chart
b Implementing an information box on an IlvManagerView
b An IltInvalidStateException is thrown when I call IltNetworkElement.setState(IltState state)
b Sample showing a network component having two nodes and a link
b Sample listing the IltcLayer and IlvManagerLayer layers of a network component
b Set the relative size of the Diagrammer in JSF
b Vertical layout of an activity in a Gantt row
b Redrawing a specific part or the entire IlvChart
b Configure Map Builder to support relative path for the points image source property
b Translating the printing dialogs
b Gantt data model entities deprecation
b Customizing the Gantt Time Scale
b Customize a view template implementation given in an Application Framework application
b Manager layer accessibility
b Creating one bar chart from several data sources
b Moving the submanager when an internal object is moved
b Menu-controlled visibility of a prototype having a multirep behavior
b Setting margins of a diagram, for example after a graph layout
b Diagrammer building based on flat files
b Obtaining latitude and longitude coordinates given a city name or postal code
b Make objects blink in an application
b Multiple stacked bar charts along the z-axis
b Expanding or collapsing subgraphs in thin-client applications
b Accessing the scrollbars of IlvHierarchyChart
b Preserve the position of a node in a hierarchical layout after the node has been replaced
b IlvGeneralNode will not redraw correctly after changing any of the property
b Globally defining by code a chart property that is not specific to a series, and that is evaluated in the .css
b Make the select interactor select an object that intersects the drag rectangle
b Specify slice colors in a pie chart using CSS
b Draw a bi-directional link in JViews
b Customize a JToolTip for an IlvDiagrammer
b JSF Gantt: pattern format for dates in the JSF Tags
b Changing the tooltip style when using jvf:tooltipInteractor
b Adding the DeploymentLicenseRequired declaration in JSF Web Application (Only Apply to 8.7 & 8.8)
b How to correctly display a non-North aligned GeoTiff image in JViews Maps
b How to implement remote code protection
b JViews installer is failling on windows with error "Windows error 2 occured while loading the java VM"
b how to update my code to adapt to the new precision of JViews 2017