Release Notes > JTGO 4.0 Release Notes > New Features > Adapters

Adapters have been improved with the following features:

CSS Configuration

It is now possible to customize the adapter through a CSS file, along with the graphic component configuration. Each adapter type has its own set of customizable properties. For more information, refer to the Graphic Components User's Documentation.

The adapter customization is enabled or disabled through the adapter selector within the graphic component configuration. For example:

Network {
  toolbar: true;
  interactor: true;
  adapter: true;
}

When the adapter customization is enabled, the adapter declaration follows. For example:

Adapter {
  showOrigin: true;
  origin[0]: "objID";
}

When customizing the adapter properties, you may need to access the adapter object to use it as an argument of a property constructor, for example, of the expansion strategy factory property. You can access an adapter instance in CSS by using the built-in property __ADAPTER in the following way:

Adapter {
  expansionStrategyFactory: @+MyFactory;
}
#MyFactory {
  class: 'MyFactoryClass';
  adapter: @__ADAPTER;
}

The following tables provide a brief description of each adapter type customization.

Table 3.11 IlpNetworkAdapter
Property 
Description 
filter 
Defines the adapter filter.This property accepts a bean that implements the IlpFilter interface. 
expansionStrategyFactory  
Defines the expansion strategy factory used by the adapter.This property accepts a bean that implements the IlpExpansionStrategyFactory interface. 
showOrigin 
Defines the visibility of the origin.This property accepts a boolean (true or false
origin 
An indexed property that accepts the business object ID.  
nodeFactory 
Defines the node factory used by the adapter.This property accepts a bean that implements the IlpNetworkNodeFactory.  
linkFactory  
Defines the link factory used by the adapter.This property accepts a bean that implements the IlpNetworkLinkFactory
acceptedClasses 
Defines the list of classes that are accepted by the adapter. This property accepts a class name as used in IlpClassManager.  
excludedClasses 
Defines the list of classes that are NOT accepted by the adapter. This property accepts a class name as used in IlpClassManager.  
Note
IlpEquipmentAdapter has the same configuration as the network adapter.

Table 3.12 IlpAbstractTreeAdapter
Property 
Description 
filter  
Defines the adapter filter.This property accepts a bean that implements the IlpFilter interface
expansionStrategyFactory  
Defines the expansion strategy factory used by the adapter.This property accepts a bean that implements IlpExpansionStrategyFactory. 
comparator  
Defines the comparator used to sort the tree nodes when they are added to the tree model.This property accepts a bean that implements java.util.Comparator. 
showOrigin  
Defines the visibility of the origin.This property accepts a boolean (true or false).  
origin 
An indexed property that accepts the business object ID.  
nodeFactory  
Defines the node factory used by the adapter.This property accepts a bean that implements IlpTreeNodeFactory.  
comparator  
Defines the object responsible for comparing the tree nodes in order to decide their position in the tree.  
acceptedClasses 
Defines the list of classes that are accepted by the adapter. This property accepts a class name as used in IlpClassManager.  
excludedClasses 
Defines the list of classes that are NOT accepted by the adapter. This property accepts a class name as used in IlpClassManager.  

Table 3.13 TableListAdapter
Property 
Description 
filter  
Defines the adapter filter.This property accepts a bean that implements the IlpFilter interface.  
acceptedClass  
Defines the accepted class to be set in the adapter.This property accepts a fully qualified class name.  
representationObjectFactory  
Defines the node factory used by the adapter.This property accepts a bean that implements IlpRepresentationObjectFactory.  
excludedClasses 
Defines the list of classes that are not accepted by the adapter. This property accepts a class name as used in IlpClassManager.