| Advanced Features > Nested Managers and Nested Graphers > Nested Managers > Coordinate System In Nested Managers |
Coordinate System In Nested Managers |
INDEX
PREVIOUS
NEXT
|
Note that in our small example (see Example: Adding a Nested Manager) the position and size of the submanager has not been specified. The position and size of a submanager depend on the position and size of the objects that are contained in the submanager. As a consequence, all objects that are contained in the submanager are always displayed, and the size and position of the submanager may change when a graphic object contained in this manager changes position or size.
As for any graphic object, you can move and resize a submanager using the IlvManager.moveObject or IlvManager.reshapeObject methods. In the example you could do something like:
toplevel.moveObject(subManager, 100,100, true)
When a nested manager is resized or moved, the objects contained in the manager do not change position in the submanager coordinate system. The submanager will move because an affine transformation (an IlvTransformer) will be specified in the submanager to define a new relative coordinate system for the submanager. In the line above for moving the subManager to (100,100), the transformation is a simple translation of (100,100).
To obtain the affine transform that defines the coordinate system of the submanager, you can use the method:
If the submanager has not been moved or reshaped, this returns the identity transformation.
To know what transformation is used to draw a submanager in a specified view, you can use the following method of the IlvManager class:
This method returns the affine transformation used to draw the objects in a manager. If the specified view is a view of the manager, then it simply returns the affine transform of the view; otherwise, the method will compose the transformation of all the parents of the manager and also the transformation of the view to give the result.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |