Specifying the mode for layout coordinates

By default, the IlvGrapherAdapter considers the geometry of the nodes and links of an IlvGrapher in a special coordinate space which is appropriate for most of the cases. In some situations, it can be useful to specify a different coordinate space.
To specify the coordinate space, the class IlvGrapherAdapter provides the following method:
void setCoordinatesMode(int mode)  
The valid values for mode are:
  • IlvGraphLayout.MANAGER_COORDINATES
    The geometry of the graph is computed using the coordinate space of the manager (that is, the IlvGrapher encapsulated by the adapter) without applying any transformation.
    This mode should be used if you visualize the graph at zoom level 1, or you do not visualize it at all, or the grapher contains only fully zoomable objects. In all these cases there is no need to take the transformer into account during the layout.
    Note that in this mode the dimensional parameters of the layout algorithms are considered as being specified in manager coordinates. The reference transformer and the reference view are not used.
  • IlvGraphLayout.VIEW_COORDINATES
    The geometry of the graph is computed in the coordinate space of the manager view. More exactly, all the coordinates are transformed using the current reference transformer.
    This mode should be used if you want the dimensional parameters of the layout algorithms to be considered as being specified in manager view coordinates.
  • IlvGraphLayout.INVERSE_VIEW_COORDINATES
    The geometry of the graph is computed using the coordinate space of the manager view and then applying the inverse transformation using the reference transformer. This mode is equivalent to the "manager coordinates" mode if the geometry of the graphic objects strictly obeys the transformer. (A small difference may exist because of the limited precision of the computations.)
    On the contrary, if some graphic objects are either nonzoomable or semizoomable (for example, links with a maximum line width), this mode gives different results than the manager coordinates mode. These results are optimal if the grapher is visualized using the same transformer as the one taken into account during the layout.
    Note that in this mode the dimensional parameters of the layout algorithms are considered as being specified in manager coordinates.
The default mode is IlvGraphLayout.INVERSE_VIEW_COORDINATES.
To obtain the current choice, use the following method:
long getCoordinatesMode()  
The mode for coordinates can also be specified directly on the layout instances. For details, see Coordinates mode.