Default behavior

In addition to the different actions that can be used in the Visualizer and the Diagrammer, users can define some other behaviors just by enabling or disabling some controllers.

The different controllers that are defined in KapIT diagramming tools are listed as follows:

Property Description
enableAutofitOnLayout indicates if the Graph should be auto-fitted to the Visualizer bounds
enablePan indicates if panning Visualizer content should be enabled
enableSelectionDrag indicates if selected elements can be dragged and re-positioned
enableExpandOnDoubleClick indicates if elements with Expand (or Collapse) status should be collapsed (or expanded) by double click
enableAnimation indicates if the Visualizer content should be animated on layout (animating zoom and position)
animationDuration indicates the duration of the animation when the enableAnimation property is set to true
export it is a method used to export the graph
import it is a method used to import a graph from a saved XML. The saved XML should be generated through the export method
CenterContent places the Visualizer graph center at the center of the visible area of the component. it takes the following parameters:
  • withAnimation: once set to true, the centering process will be animated according to the Visualizer animation properties.
  • layoutDependant: if set to true, the computation of the required displacement will be based on the graph model content. This is generally used when a layout computation is processed and not rendered visually.
  • noEventIf set to false, a VisualizerEvent.GRAPH_PANNED event is dispatched when centering is finished (after animation if centering process has animation enabled)
autoFit Fits and centers the whole graph to the visible region of Visualizer. A panning and zoom operation will be coupled during the autofit process. it takes the following parameters:
  • horizontalGap: defines the horizontal gap between the fitted graph and Visualizer right and left limits
  • verticalGap: defines the vertical gap between the fitted graph and Visualizer top and bottom limits.
  • layoutDependant: If set to true, the autofit computation will be based on the graph model content. This is generally used when a layout computation is processed and not rendered visually.
  • ratioNotLessThanOne: If set to true, autofit process will maintain a zoom ratio inferior or equal to 1.
  • noEvent: If set to false, the VisualizerEvent.GRAPH_FITTED event is dispatched when autofitting finishes (after animation if autofit operation is animated).
zoomContent Performs a zoom on the Visualizer with respect to zoom ratio, center and its relativity. Zooming can be animated or instantly done. it takes these following parameters :
  • zoomRatio: specifies the zoom ratio
  • zoomCenter: specifies the zoom focus point. This point will be static in the zoom process.
  • relativeZoom: if set to true, the ratio value will be multiplied by the current zoom ratio to get the global zoom ratio that will be applied. In the other case, the ratio value will be applied as the global zoom value.
  • withAnimation: if set to true, the zoom process will be animated according to the Visualizer animation properties.
  • noEvent: if set to false, a VisualizerEvent.GRAPH_ZOOMED event is dispatched when zooming finishes (after animation if zooming is animated).