EMMA Coverage Report (generated Sat Apr 14 15:01:05 EDT 2012)
[all classes][org.deduced.viewer.web.shared]

COVERAGE SUMMARY FOR SOURCE FILE [CellPanelModel.java]

nameclass, %method, %block, %line, %
CellPanelModel.java100% (1/1)100% (6/6)100% (39/39)100% (13/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CellPanelModel100% (1/1)100% (6/6)100% (39/39)100% (13/13)
CellPanelModel (): void 100% (1/1)100% (3/3)100% (1/1)
getCellPanel (): CellPanel 100% (1/1)100% (4/4)100% (1/1)
getSpacing (): int 100% (1/1)100% (3/3)100% (1/1)
internalSynchronizeWithUI (): void 100% (1/1)100% (8/8)100% (3/3)
propertyChanged (ChangeEvent): void 100% (1/1)100% (17/17)100% (5/5)
setSpacing (int): void 100% (1/1)100% (4/4)100% (2/2)

1/**
2 *    Copyright 2005-2011 Steve McDuff d-duff@users.sourceforge.net
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.deduced.viewer.web.shared;
17 
18import com.google.gwt.user.client.ui.CellPanel;
19 
20/**
21 * Cell Panel Model
22 * 
23 * @author Steve McDuff
24 * 
25 */
26public abstract class CellPanelModel extends ComplexPanelModel
27{
28 
29        /**
30         * serialVersionUID
31         */
32        private static final long serialVersionUID = -6213574644458921802L;
33 
34        /**
35         * spacing between the cells in the panel
36         */
37        private int spacing;
38 
39        /**
40         * (non-JSDoc)
41         * 
42         * @see org.deduced.viewer.web.shared.UserInterfaceModel#internalSynchronizeWithUI()
43         */
44        @Override
45        public void internalSynchronizeWithUI()
46        {
47                getCellPanel().setSpacing(getSpacing());
48                super.internalSynchronizeWithUI();
49        }
50 
51        /**
52         * get Cell Panel
53         * 
54         * @return the cell panel
55         */
56        public CellPanel getCellPanel()
57        {
58                return (CellPanel) getUIObject();
59        }
60 
61        /**
62         * (non-JSDoc)
63         * 
64         * @see org.deduced.viewer.web.shared.UserInterfaceModel#propertyChanged(org.deduced.viewer.web.shared.ChangeEvent)
65         */
66        @Override
67        public void propertyChanged(
68                ChangeEvent event)
69        {
70                if (isEventNameEqual(event, "spacing"))
71                {
72                        setSpacing(((Integer) event.getSerializableValue()).intValue());
73                        synchronizeWithUI();
74                }
75                else
76                {
77                        super.propertyChanged(event);
78                }
79        }
80 
81        /**
82         * @param setSpacing the spacing to set
83         */
84        public void setSpacing(
85                int setSpacing)
86        {
87                spacing = setSpacing;
88        }
89 
90        /**
91         * @return the spacing
92         */
93        public int getSpacing()
94        {
95                return spacing;
96        }
97}

[all classes][org.deduced.viewer.web.shared]
EMMA 2.0.9525 (unsupported private build) (C) Vladimir Roubtsov