| Summary: | Implement scroll and zoom actions/contribution items and demonstrate them in the Zest Graph view, MVC Logo view, and DOT Graph view. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | GEF MVC | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nyssen |
| Version: | 0.2.0 | ||
| Target Milestone: | 5.0.0 (Oxygen) M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Matthias Wienand
The same should be provided for the Zest Graph example. We should integrate support for a toolbar, a graphical context menu, or a flyout-toolbar within mvc (or all), into which the functionality could be integrated by default. Additionally, there should probably be a button to reset the scaling (i.e. zooming) within a viewer to 1. I implemented FitToSizeAction (fit contents within the viewport) and ResetViewportAction (reset zoom level) and added them to the toolbar of the DotGraphView. We still need to find nice icons for the functionality, as well as provide a mechanism for using such actions in a standalone context (no Eclipse). We now have implemented the following actions/contribution items (so far added to Dot Graph view): - Fit-to-Viewport (aka Fit-to-Size) - Zoom-In, Zoom-Out, Zoom-Combo, Zoom-Scale - Scroll-Center, Scroll-Top-Left, Scroll-Top-Right, Scroll-Bottom-Right, Scroll-Bottom-Left. All actions come with respective icons (including @x2 high resolution versions). We should yet implement some action groups to bundle related functionalities (zoom and scroll respectively) and add them to the example views. And IMHO, we should make the scale a bit shorter by default. I added action groups for zooming (ZoomActionGroup), scrolling (ScrollActionGroup), and fit-to-viewport (FitToViewportActionGroup). Additionally to the FitToViewportAction, I implemented FitToViewportLockAction that can be toggled to keep performing fit-to-viewport when the viewport size changes. Moreover, the ScrollActionGroup only displays the ScrollCenterAction in the toolbar, while the other scroll actions (top-left, top-right, bottom-left, and bottom-right) are accessible via a drop down menu next to the ScrollCenterAction. I added toolbar contributions to the MVC Logo example and Zest Graph example using these action groups. The toolbar contribution for the Dot Graph view uses the defaults. The MVC Logo example adds an item to the zoom combo to perform fit-to-viewport and does not contribute the FitToViewportActionGroup, but only the FitToViewportLockAction. The Zest Graph example uses all three action groups, and adds an item for fit-to-viewport to the zoom combo, too. The code is published on the master branch, therefore, I resolve this ticket as fixed for 5.0.0 M5. |