Release Notes > JTGO 4.0 Release Notes > New Features > Off-page Connectors

Off-page connectors (OPC) can now have different graphic representations according to the value of their new attribute type. By default, JTGO provides the following OPC types and representations:

Table 3.4 OPC Types and their Representation
Type 
Representation 
Description 
Standard 
images/OPCStandard27.gif  
Standard off-page connector 
Managed 
images/OPCManaged28.gif  
Generic managed entity 
SingleManaged 
images/OPCSingleManaged29.gif  
Single entity currently managed by the system 
MultipleManaged 
images/OPCMultipleManaged30.gif  
Multiple entities currently managed by the system 
Unmanaged 
images/OPCUnmanaged31.gif  
Generic entities not managed by the system 
SingleUnmanaged 
images/OPCSingleUnmanaged32.gif  
Single entity currently not managed by the system 
MultipleUnmanaged 
images/OPCMultipleUnmanaged33.gif  
Multiple entities currently not managed by the system 

The off-page connector type can be set to the object through XML or through the API. Refer to the class ilog.tgo.model.IltOffPageConnector in the JTGO Java API Reference Documentation for more information.

You can customize the graphic representation of an off-page connector type by registering a new base renderer (see ilog.tgo.graphic.renderer.IltOPCBaseRenderer). This base renderer is registered in the JTGO default settings (see ilog.tgo.resource.IltSettings#SetValue). Besides the predefined base renderers, you can also register base renderers based on images or on any IlvGraphic class, including SVG support.

The following example shows how you create a new off-page connector type and define its graphic representation:

 IltOffPageConnector.Type newType = new IltOffPageConnector.Type(YOUR_NEW_TYPE_NAME);
 try {
   Image img = null;
   URL url = new URL("file", "", YOUR_IMAGE_FILE_NAME);
   img = getImage(url);
   if (img != null) {
     IltOPCImageBaseRendererFactory factory =
       new IltOPCImageBaseRendererFactory(img, YOUR_IMAGE_PARAMETERS );
     IltSettings.SetValue("OffPageConnector.Type.YOUR_NEW_TYPE_NAME.Renderer", factory);
   }
 } catch (Exception e) {
   e.printStackTrace();
 }

YOUR_NEW_TYPE_NAME should be replaced with a string of your choice. YOUR_IMAGE_FILE_NAME should be replaced with the appropriate string to create a URL object for your image. YOUR_IMAGE_PARAMETERS is optional.

Like network elements, ports and LEDs, off-page connectors are represented in the tree and table components with a reduced version of the type representation.