EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.sensorframework.visualisation.views]

COVERAGE SUMMARY FOR SOURCE FILE [DAOFactoryPreferencePage.java]

nameclass, %method, %block, %line, %
DAOFactoryPreferencePage.java0%   (0/1)0%   (0/2)0%   (0/110)0%   (0/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DAOFactoryPreferencePage0%   (0/1)0%   (0/2)0%   (0/110)0%   (0/26)
DAOFactoryPreferencePage (IDAOFactory): void 0%   (0/1)0%   (0/6)0%   (0/3)
createContents (Composite): Control 0%   (0/1)0%   (0/104)0%   (0/23)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.sensorframework.visualisation.views;
5 
6import org.eclipse.jface.preference.PreferencePage;
7import org.eclipse.swt.SWT;
8import org.eclipse.swt.layout.GridData;
9import org.eclipse.swt.layout.GridLayout;
10import org.eclipse.swt.widgets.Composite;
11import org.eclipse.swt.widgets.Control;
12import org.eclipse.swt.widgets.Label;
13 
14import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory;
15 
16/**
17 * DAO Factory preference page implementation.
18 * 
19 * @author Roman Andrej
20 */
21public class DAOFactoryPreferencePage extends PreferencePage {
22 
23 
24        IDAOFactory factory;
25        
26        /**
27         * @param factory
28         */
29        public DAOFactoryPreferencePage(IDAOFactory factory) {
30                this.factory = factory;
31        }
32 
33        
34        /* (non-Javadoc)
35         * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
36         */
37        @Override
38        protected Control createContents(Composite parent) {
39                
40                final int width = 70;
41                final int heigth = 16;
42                
43                Composite container = new Composite(parent, SWT.NONE);
44                final GridLayout gridLayout = new GridLayout();
45                gridLayout.numColumns = 2;
46                container.setLayout(gridLayout);
47 
48                // Name
49                final Label nameLabel = new Label(container, SWT.NONE);
50                final GridData gd_nameLabel = new GridData(width, heigth);
51                nameLabel.setLayoutData(gd_nameLabel);
52                nameLabel.setText("Name:");
53 
54                final Label namevalueLabel = new Label(container, SWT.NONE);
55                final GridData gd_namevalueLabel = new GridData(SWT.FILL, SWT.CENTER, false, false);
56                gd_namevalueLabel.heightHint = heigth;
57                namevalueLabel.setLayoutData(gd_namevalueLabel);
58                namevalueLabel.setText(factory.getName());
59 
60//                // Description
61//                final Label descriptionLabel = new Label(container, SWT.NONE);
62//                final GridData gd_descriptionLabel = new GridData(width, heigth);
63//                descriptionLabel.setLayoutData(gd_descriptionLabel);
64//                descriptionLabel.setText("Description:");
65//
66//                final Label descriptionvalueLabel = new Label(container, SWT.NONE);
67//                final GridData gd_descriptionvalueLabel = new GridData(SWT.FILL, SWT.CENTER, false, false);
68//                gd_descriptionLabel.heightHint = heigth;
69//                descriptionvalueLabel.setLayoutData(gd_descriptionvalueLabel);
70//                descriptionvalueLabel.setText(factory.getDescription());
71 
72                // Persistent Info
73                final Label locationPathLabel = new Label(container, SWT.NONE);
74                final GridData gd_locationPathLabel = new GridData(width, heigth);
75                locationPathLabel.setLayoutData(gd_locationPathLabel);
76                locationPathLabel.setText("Location path:");
77 
78                final Label pathValueLabel = new Label(container, SWT.NONE);
79                final GridData gd_pathValueLabel = new GridData(SWT.FILL, SWT.CENTER, false, false);
80                gd_pathValueLabel.heightHint = heigth;
81                pathValueLabel.setLayoutData(gd_pathValueLabel);
82                pathValueLabel.setText(factory.getPersistendInfo());
83 
84                return container;
85        }
86}

[all classes][de.uka.ipd.sdq.sensorframework.visualisation.views]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov