• No results found

one column (columns=1). In this grid layout there are twoGroups, one display- ingGeneral Information(title=General Information) and arranging its content in two columns (columns=2) and one displayingOperationsin its title (title=Operations). The first widget placed in theGeneral Informationgroup is anAttributemapped to the employee name (attribute=name). The second widget maps to the salary attribute (attribute=salary) and the third to the boolean hasPhD attribute. A

BooleanAttributeis used to configurePhDas a label instead ofhasPhD(label=PhD) and to use a checkbox to select whether the employee has a PhD (checkbox=true). The lastAttributemaps to theexpertiseattribute.

In theOperationsgroup there is only oneActionwhich is of kind removeand has itslabelset to Delete Employee. ThegrabHorizontalExcess attribute is set to

trueand thehorizontalAlignmentattribute is set toendto right-align the button in the group.

The effect of this user-defined form-based visualizer is shown at the bottom right of Figure 7.3. The form displaysBob, the employee name, as its title. Also the breadcrumb is visible and shows the employee’snameattribute value,

Bob, as the currently selected model element. The General Information group is located below the breadcrumb containing text boxes for Name, Salary and

Expertise. One checkbox is included to represent whether or not the employee has aPhD.

Theoperationsgroup at the bottom of the form displays theDelete Employee

button as the only operation available on the current employee. Pressing this button deletes the currently selected employee.

7.3

Form-based Weaving Model

The form-based format’s weaving model, displayed in Figure 7.4, consists of five metaclasses — WeavingModel and WeavingLink with its three subclasses

TraitWeavingLink, ExpressionWeavingLink and CompoundWeavingLink. The Weav- ingModelstores theWeavingLinkswhich establish a weaving between the model element displayed (target) and the widget displaying the information in the form-based language. Thetraitattribute of TraitWeavingLinkdetermines which trait of thetargetis displayed and theExpressionWeavingLinkholds theexpression

WeavingModel target:plm::ElementWeavingLink widget:Object TraitWeavingLink trait:ecore::EStructualFeature ExpressionWeavingLink definitionContext:ecore::EObject expression:String * content CompoundWeavingLink * content

Figure 7.4: Form-based weaving model.

element on which the expression is defined (definitionContext). CompoundWeav- ingLinks are used when more than one model-element is displayed in a widget which is for example the case when displaying all connected clabjects in a list. The available operations for manipulating the form-based weaving model are not described further because the weaving models created for form-based languages are trivial since they only depict one model element at a time. The weaving models are therefore built per model element and do not store any layout which could be influenced by a language user. Even when the delete or add operations are executed a completely new weaving model for the newly displayed model element is created which is independent of all previous weaving models. Additionally, both ends of the weaving model are directly addressable via pointers in memory making the implementation of editing functions trivial.

7.3.1

Form-based Weaving Model Example

An example of a user-defined, form-based language’s weaving model is shown in Figure 7.5. The lower left of the figure shows an excerpt of the data un- derlying the form-based language visualized in a tree structure. The company example from previous chapters showing the Quality Toys Inc. is chosen. The bottom right of the figure showsBob, an employee working in theToy Research

department of Quality Toys Inc. in a form-based view. The breadcrumb at the top shows the location of Bobin the underlying model. It has been configured to display the name attribute of companies, departments and employees in the breadcrumb. Below the breadcrumb,General Informationabout the selected employee (i.e. Bob) is shown. Bob has a Name set to Bob and a Salary set to 48k, does not have a PhD and has expertisein RC Car Research. Below the

7.3. Form-based Weaving Model

Weaving Model

Form-based Data

TraitWeavingLink (target=name; trait=value; widget=0) TraitWeavingLink (target=salary; trait=value; widget=1) TraitWeavingLink (target=hasPhD; trait=value; widget=2) TraitWeavingLink (target=expertise; trait=value; widget=3)

Company Structure O2 Quality Toys Inc.

Toy Research

Name Bob Salary 48k General Information

Bob

Delete Employee PhD Expertise RC Car Research

Operations

Entity(name='QualityToys')

Attribute(name='Quality Toys Inc.') Entity(name='ToyResearch') Attribute(name='Toy Research') Entity(name='Bob')

Attribute (name='name'; value='Bob') Attribute(name='salary'; value='48k') Attribute(name='hasPhD'; value='false') Attribute(name='expertise'; value='RC ...') Entity(name='Jim') Attribute(name='name'; value='Jim') ...

Figure 7.5: Form-based weaving model for the company structure modeling language example.

group. By pressing this button the currently selected employee (hereBob) can be deleted.

TheWeaving Modelinstance at the top center of Figure 7.5 connects theData

and itsForm-basedvisualization. For each widget representing an ontological attribute oneTraitWeavingLink exists. All TraitWeavingLinks point to the value traitof one ontological attribute of Bob. In the figure, the attribute to which theTraitWeavingLinkspoint are identified by their name and thewidgetto which aTraitWeavingLinkpoints is defined by the order of occurrence from left to right and top to bottom. In a tool, however,TraitWeavingLinks would address their

targets and widgets through pointers to memory locations. For visualization purposes the TraitWeavingLinks of the nameand salaryattributes are indicated through solid lines.

Chapter 8

Deep Constraint Language

for Deep Visualization

All of the visualization definition languages described in the previous chap- ters rely on constraints expressed in (deep) constraint languages to support visualization. More specifically, deep constraint languages are used to define expressions for: 1. calculating visualizer attributes, 2. defining the application conditions of aspects and 3. calculating values displayed to the user etc. In this chapter the challenges arising in the definition of deep constraint languages to support deep visualization are described and solutions to the different prob- lems are discussed. This chapter also presents the deep constraint language developed in this thesis to support multi-format visualization.