Managing the diagram

You can interact with the diagram, control the view, edit the diagram, apply a layout to the objects, print the diagram by using the appropriate methods as described below.

Interacting with the diagram

The following methods determine which interactions are available to users of the diagram component, that is, what happens when a user clicks:

Controlling the view

For scrolling, you can use the setScrollable method to control the visibility of the diagram scroll bars.
For zooming, you can use the following methods:
  • The zoomIn and zoomOut methods to zoom the diagram in or out.
  • The fitToContents method to make the whole diagram visible.
  • The resetZoom method to reset the zoom factor to 1:1.

Editing the diagram

The IlvDiagrammer class provides full support for editing, that is, you have all the methods necessary to create an editor based on the diagram component.:

Printing the diagram

The methods print, printToBitmap, pageSetup, printPreview, setPrintArea let you print all or part of the diagram.

Advanced methods

The methods of the IlvDiagrammer class let you achieve the most common tasks, but you will often need to extend the diagram component, or access advanced functionality not available directly in the IlvDiagrammer class.
For this reason, methods such as getEngine, getView, getSelectInteractor, getPrintingController give you access to the low-level objects that implement advanced features.