In a previous post, we described how to create a layout for the Diagram component. In this post, we'll focus specifically on how to control the initial position and zoom level of the Diagram.
By default, the Diagram content will be zoomed to fit and placed at the component center. This is done to allow users to see the Diagram as a whole. However, in some cases you might want to display the Diagram using a specific zoom level or pan the Diagram to a position to emphasize one of the nodes. You should be able to achieve this by calling setViewport() method in your layout. The setViewport() method is available on DvtDiagramLayoutContext object that is passed to the layout. The method expects an object with x, y, w, h properties that describes the visible viewport in layout coordinates.
Here is how it works. Let's assume that you have only one 50x50 px node that is positioned by the layout at (0,0) and the following component binding: Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.