Navigating within class diagrams
Normal Point and Select Mode
The point and select mode is the normal mode for viewing and editing diagrams. A selection of types can be repositioned by dragging. The Hand Scrolling mode is deselected automatically when this mode is selected.
In addition to the scroll bars, there is a hand scroll selection action which switches to a drag mode for scrolling the diagram. This action is toggled - selecting it sets or clears the hand-scroll mode. The hand cursor indicates when you are in hand scroll mode.
You can also hand scroll while in normal point and select mode by dragging while holding down the Alt key.
The Zoom In and Zoom Out actions zoom the diagram taking the center of the diagram as the focal point. The zoom in action becomes disabled when 100% zoom has been reached. These actions are available from the toolbar, AgileJ menu, or by right clicking in empty space on the diagram. Additionally, the plus (+) and minus (-) keys on your keyboard can be used to zoom in and out.
The mouse wheel can also be used to zoom in and out.
The drag zoom action is useful when you are zoomed out and wish to zoom in on a particular region. After selecting this action the mouse cursor changes to indicate that a drag can be carried out to mark a box. When the mouse is released, the contents of the box are zoomed and scrolled so as to fill the diagram window.
You can also drag zoom while in normal point and select mode by dragging while holding down the Shift key.
Zoom to Fit
The Zoom to Fit action selects the best zoom and scroll for viewing the whole diagram in the diagram editor window.
Zoom to (a class)
The popup menu on a type (triggered by right clicking on its title bar or any region within its bounds not occupied by one of its members) has an option to zoom in on that type. This option is grayed out when you are already zoomed in on the diagram as much as is possible.
The popup on a field has a Zoom To option which takes you to the field's type, provided it is present somewhere on the diagram. Methods have an equivalent option which takes you to their return type.
Mouse wheel zoomingThe mouse wheel can be used to zoom in and out. Hold down ctrl while rolling the mouse wheel. (Use cmd on Mac).
Select Window-Show View-Other to open the Eclipse 'Show View' dialog.
Select the 'Overview' node and press OK.
A new view will be opened in your workbench which maintains a whole diagram view for the active diagram editor. Within the view, a pink square shows which portion of the whole diagram is currently on display in the editor window. This pink square may be dragged so as to affect the scroll location in the editor. You can also right click on the pink square to access zoom in, zoom out and zoom to fit.
Navigating by line
You can also navigate on a class diagram by line (inheritance, field or dependency). Right clicking on a line will show a popup menu with navigation options.
Go to head : navigate to the class at the head end (superclass, field type or outward dependency)
Go to tail : navigate to the Java element at the tail end (subclass, field or inward dependency)
Show whole line : scroll and zoom to make the whole line visible
All past scroll and zoom activity is navigable with the Eclipse Back and Forward controls.
To open a source editor select the source option from the popup menu. This will open the editor at the point in the Java source file corresponding to the type or member which you clicked on. This action can also be triggered by double clicking.
Copyright © AgileJ Ltd. All rights reserved.