The Essential JViews Framework > Graphic Objects > Geometric Properties > Zoomable and Nonzoomable Objects

A graphic object is said to be zoomable if its bounding box follows the zoom level. In other words, the result of calling the method boundingBox with a transformer is the same as when calling boundingBox with a null transformer and then applying the transformer to the resulting rectangle. That is:

obj.boundingBox(t) = t.apply(obj.boundingBox(null))

A zoomable object follows the zoom factor. When a view is magnified by 2, a zoomable object is drawn twice as big. When a view is reduced by 1/2, a zoomable object is drawn half as big. A nonzoomable object does not follow the zoom factor, that is, it may be drawn at its original size in a reduced view.

Note
More precisely, a graphic object is zoomable if and only if for every transformer t, the rectangle obtained by calling obj.boundingBox(t) is contained in the rectangle obtained by applying the transformer to obj.boundingBox(null). Equality of both rectangles is not necessary.If you define your own graphic objects, you must define zoomable() correctly. If zoomable() returns true, but the object does not follow the zoom factor, the object may be drawn incorrectly.

Zoomable and nonzoomable objects are managed in very different ways in ILOG JViews, zoomable objects being managed in a more optimized way. To know whether an object is zoomable, call the zoomable method:

public boolean zoomable()

The returned value for the class IlvGraphic is true.