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

COVERAGE SUMMARY FOR SOURCE FILE [ParametersDialog.java]

nameclass, %method, %block, %line, %
ParametersDialog.java0%   (0/1)0%   (0/5)0%   (0/65)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ParametersDialog0%   (0/1)0%   (0/5)0%   (0/65)0%   (0/20)
ParametersDialog (Shell, AbstractMeasurementsCollection): void 0%   (0/1)0%   (0/10)0%   (0/4)
configureShell (Shell): void 0%   (0/1)0%   (0/7)0%   (0/3)
createButtonsForButtonBar (Composite): void 0%   (0/1)0%   (0/8)0%   (0/3)
createDialogArea (Composite): Control 0%   (0/1)0%   (0/34)0%   (0/9)
getInitialSize (): Point 0%   (0/1)0%   (0/6)0%   (0/1)

1package de.uka.ipd.sdq.sensorframework.visualisation.tabs.filters;
2 
3import org.eclipse.jface.dialogs.IDialogConstants;
4import org.eclipse.jface.dialogs.TitleAreaDialog;
5import org.eclipse.swt.SWT;
6import org.eclipse.swt.graphics.Point;
7import org.eclipse.swt.layout.FormLayout;
8import org.eclipse.swt.layout.GridData;
9import org.eclipse.swt.widgets.Composite;
10import org.eclipse.swt.widgets.Control;
11import org.eclipse.swt.widgets.Shell;
12 
13import de.uka.ipd.sdq.pcm.dialogs.parameters.CreateEditorContents;
14import de.uka.ipd.sdq.sensorframework.filter.AbstractMeasurementsCollection;
15 
16/**
17 * @author Roman Andrej
18 */
19public class ParametersDialog extends TitleAreaDialog {
20 
21        private AbstractMeasurementsCollection filter;
22 
23        /**
24         * Creates a dialog with the given parent and edited properties name
25         * 
26         * @param parentShell
27         *            -object that returns the current parent shell columnName -
28         *            edited properties
29         */
30        public ParametersDialog(Shell parentShell, AbstractMeasurementsCollection filter) {
31                super(parentShell);
32                this.filter = filter;
33 
34                /**
35                 * the result of combining the constants which are required
36                 * to produce a typical application top level shell
37                 */
38                setShellStyle(SWT.RESIZE|SWT.TITLE|SWT.CLOSE |SWT.MIN|SWT.MAX);
39        }
40        
41        /* (non-Javadoc)
42         * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
43         */
44        @Override
45        protected void configureShell(Shell newShell) {
46                super.configureShell(newShell);
47                newShell.setText("Filter parameters");
48        }
49 
50        /* (non-Javadoc)
51         * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
52         */
53        @Override
54        protected Control createDialogArea(Composite parent) {
55                setTitle("Edit a Parameter...");
56 
57                Composite area = (Composite) super.createDialogArea(parent);
58                Composite container = new Composite(area, SWT.NONE);
59                container.setLayout(new FormLayout());
60                container.setLayoutData(new GridData(GridData.FILL_BOTH));
61 
62                CreateEditorContents editorContents = CreateEditorContents
63                                .create(container);
64 
65//                editorContents
66//                                .setViewerContentProvider(new IStructuredContentProvider(){
67//
68//                                        /* (non-Javadoc)
69//                                         * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
70//                                         */
71//                                        public Object[] getElements(Object inputElement) {
72//                                                if (inputElement instanceof AbstractMeasurementsFilter) {
73//                                                        AbstractMeasurementsFilter filter = (AbstractMeasurementsFilter) inputElement;
74//                                                        return new Object[] { filter.getParameter() };
75//                                                }
76//                                                return null;
77//                                        }
78//
79//                                        /* (non-Javadoc)
80//                                         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
81//                                         */
82//                                        public void dispose() {
83//                                                // The implementation is not necessary.
84//                                        }
85//
86//                                        /* (non-Javadoc)
87//                                         * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
88//                                         */
89//                                        public void inputChanged(Viewer viewer, Object oldInput,
90//                                                        Object newInput) {
91//                                                // The implementation is not necessary.
92//                                        }
93//                                });
94//                editorContents
95//                                .setViewerLabelProvider(new ParametersDialogLabelProvider(
96//                                                filter.getClass().getSimpleName()));
97//                editorContents.setViewerCellModifier(new ...);
98//                editorContents.setAddButtonActionListener(new AddParameterAction(
99//                                signature));
100//
101//                DeleteParameterAction deleteParameterAction = new DeleteParameterAction(
102//                                signature);
103//                UpParameterAction upParameterAction = new UpParameterAction(signature);
104//                DownParameterAction downParameterAction = new DownParameterAction(
105//                                signature);
106//
107//                editorContents.setDeleteButtonActionListener(deleteParameterAction);
108//                editorContents.setUpButtonActionListener(upParameterAction);
109//                editorContents.setDownButtonActionListener(downParameterAction);
110//
111//                editorContents.setViewerSelectionChangedListener(deleteParameterAction);
112//                editorContents.setViewerSelectionChangedListener(upParameterAction);
113//                editorContents.setViewerSelectionChangedListener(downParameterAction);
114//
115                editorContents.setViewerInput(filter);
116//
117//                /** create separatot to button area */
118//                ((CreateEditorContents) editorContents).createSeparator(parent);
119 
120                return area;
121        }
122        
123        /*
124         * (non-Javadoc)
125         * 
126         * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
127         */
128        @Override
129        protected void createButtonsForButtonBar(Composite parent) {
130                createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
131                                false);
132        }
133 
134        /* (non-Javadoc)
135         * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize()
136         */
137        @Override
138        protected Point getInitialSize() {
139                return new Point(500, 375);
140        }
141}

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