• No se han encontrado resultados

4. objetivos

10.11. plan de tabulación de datos

10.11.3 encuesta realizada en el municipio de yopal

The former version of ProSpec lacks much of the functionality users expect from a

drawing editor. For example, connections are neither selectable nor removable and there is no toolbar for adding elements. Additionally, there is no possibility to customise the tool and no navigation functionality (although this is not necessary because this tool supports only one single flat data structure, i.e. all elements are in a single list).

8.1 Major Changes to the GUI

Compared to the former version of ProSpec (see Figure 50) whose GUI consists of only two parts (menu and drawing panel) the GUI of the new version is divided in five areas (see Figure 73). Each of these parts provides some functionality for the overall modeling task.

Figure 73: Demo application showing the sample XML instance

1. Menu: The menu provides the whole functionality as in the former version of ProSpec.

2. Horizontal toolbar: This main toolbar provides often used functions like open, save, switching between views, and so on.

3. Project panel: This panel shows all elements in a tree-based form as provided by the XML structure. A major purpose of this panel is to navigate between views and

4. Vertical toolbar: This toolbar provides the elements for the actual modeling and depends on the view context, i.e. only the elements which are appropriate for the current view are provided in the bar. The icons on the buttons are not fixed images but are derived from the actual modeling elements. This has the advantage that customized modeling elements, e.g. elements with different colour or shape, are reflected in the toolbar without having to be defined as a new image. Elements can be selected from this toolbar and dropped on the drawing panel. Connections between elements are selected from the toolbar, too, and afterwards selecting the from-element and the to-element. The first button in the toolbar does not contain an element but is used to switch in a select modus.

5. Drawing panel: The container which shows the model elements. Which elements are shown depends on the selected view. This is the main part for doing the actual modeling. Elements can be added to the panel, selected for further refinement, moved to other positions, or removed from the panel.

Most of the parts can be customized in an easy way with the help of property files. For example, the following piece of code defines the menu and the modeling elements available in the toolbar for the workflow view (see Listing 13). Of course, an

implementation for these definitions has to be provided. The actual implementation of the functionality is done in an Action class which can be reused in different contexts. For example, an open Action can be assigned to a button from the tool bar and also an item

from the menu (see Listing 14).

Listing 13: Definitions of properties for the editor

#menu definition

menubar=file edit view file=open new save – exit fileLabel=File

...

exitLabel=Exit edit=cut copy paste ...

#workflow toolbar definition

workflowtoolbar=select event activity process xor controlflow

Listing 14: Example code showing action command assignment

Hashtable commands=new Hashtable();//table with all commands Commands.put("open",new OpenAction());

...

commands.put("save",new SaveAction()); ...

JButton b=new JButton();

b.setActionListener(commands.get(key)); //e.g. key=”open” //or

JmenuItem mi=new JMenuItem();

mi.setActionListener(commands.get(key));// e.g. key=”open”

A great advantage of such customisable functions is the possibility to develop the tool in a more modular way. New functions can be develop independently and added to the tool or removed if they are not appropriate in the current modeling project.

8.2 Minor Changes to the GUI

The usability of a drawing editor depends not only on the functionality but also on small details. Such details enhance the readability of models, provide a more professional “look and feel”, or improve the access a user has to the objects on the screen. The particular changes and improvements are:

Arrows: The arrows in the former version are not on the end of a connection between

nodes but rest in the middle of it. The arrow size depends upon the angle the connection has to the coordination system. The improvements are implemented with the help of elementary vector algorithms.

Pop-up menu: A context specific menu used with the right mouse button

Selectable connections: The former version does not allow to select a connection

between elements. Therefore such a connection cannot have properties and cannot be deleted directly. So, if a connection has to be removed the source or target node has to be deleted. This leads to furthermore deleted connections if the node is connected to other elements.

Cornered Connections: The former version shows a connection only as a straight line

between the centres of two nodes.

Grid: A grid helps to position elements in a more accurate way. The grid value (in

pixels) is customisable.

Antialiasing: Antialiasing is a technique that makes computer graphics pictures look

better, especially those with slanted and curved edges.

The effects of these changes are shown in Figure 74, where the left side shows the original version of ProSpec and the right side the improved version.

Figure 74: Minor improvements to the GUI.

Summary ProSpec Improvements

The changes made in the look and feel of ProSpec greatly improved the usability of the tool. Additionally, the separation of models according to the proposed method allows to validate method and tool against "real world" modeling problems. Finally, the

representation of models in an XML data structure and the customisation property allow the configuration and further development of the tool with respect to the outcome of such a validation process.

Documento similar