Using Mouse Gesture
Mouse gestures are visual modeling tools that help you to draw and manage your diagram with just a click of your mouse. There are three types of mouse gestures, the drawing gesture, the command gesture and the connection gesture.
Applying Mouse Gesture
Using Drawing Gesture
By applying drawing gesture, you can directly create the element by drawing on the diagram.
Let’s create a Product class on the following class diagram.
On the class diagram, hold down the right-mouse button, move the mouse to form the clock-wise rectangle gesture which forms a blue path on the diagram.
Release the button, a new
Class element is created automatically.
Rename the class to
Product by double-clicking on the newly created class.
Creating Attributes and Operations
| Gesture | Command |
 | Create Attribute |
 | Create Operation |
To create an attribute in a class, simply hold down your right click and drag from right to left. If you drag outside the class the setter and getter property will be set to true.
To create an operation hold down your right click and drag from left to right. If you drag outside the class the operation will be public. If you release the mouse inside the class the visibility will be protected.
Using Command Gesture
By applying command gesture, you can execute command to the diagram such as layout the diagram.
Let’s execute the auto layout as an example.
On the class diagram, hold down the right-mouse button, move the mouse down-right to form the gesture indicated by the blue path.
Release the button, the class diagram is laid out neatly.
Using Connection Gesture
By applying connection gesture you can easily link elements in a diagram together with just your mouse instead of having to choose from the diagram toolbar.
Here is part of a diagram. We have added two actors on the right and want to connect them to the system.
on the actor, hold down the right mouse button and drag a line across to the usecase you want to connect to. A blue line will appear.
Release the button and a connector will be created immediately.
The finished diagram.
Mouse Gesture Supporting Resource
In order to assist in applying mouse gesture to the diagrams, a Mouse Gestures dialog box is provided to show the mouse gesture available for different diagrams.
Opening Mouse Gesture Dialog Box
To open the Mouse Gesture dialog box, simply click Help > Mouse Gestures... from the menu.
Checking Mouse Gesture
The Mouse Gestures dialog box shows the mouse gesture available on the selected category. When you select a category, the name, description and the drawing path for each gesture available for the selected category are displayed on the dialog box.
Note: If you mouse over the row of each Gesture, it shows the animated drawing path.
Let’s see the animation resulted by mousing over the row of the gesture for Package:
Animation
To check the available mouse gestures for each category, simply select one from the drop-down menu of Category.
Using Mouse Gesture on Windows XP/Vista/2000/2003/98
To apply mouse gesture on Windows platform, simply hold down the right mouse button and move the mouse to form the gesture indicated by a blue path.
Using Mouse Gesture on Linux and Unix
To apply mouse gesture on Linux and Unix platform, press the Ctrl key and hold down the left mouse button, move the mouse to form the gesture indicated by a blue path.
Using Mouse Gesture on Mac OS X
To apply mouse gesture on Mac OS X platform, press the Apple key and hold down the left mouse button, move the mouse to form the gesture indicated by a blue path.
Related Articles
Resources