EMMA Coverage Report (generated Wed Feb 13 07:49:24 ICT 2008)
[all classes][net.sourceforge.hiveboard.command]

COVERAGE SUMMARY FOR SOURCE FILE [GeneralCommands.java]

nameclass, %method, %block, %line, %
GeneralCommands.java100% (1/1)78%  (7/9)89%  (70/79)88%  (23/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GeneralCommands100% (1/1)78%  (7/9)89%  (70/79)88%  (23/26)
print (): void 0%   (0/1)0%   (0/8)0%   (0/2)
setAnyWriter (): void 0%   (0/1)0%   (0/1)0%   (0/1)
GeneralCommands (Channel, Channel, Channel, Channel): void 100% (1/1)100% (18/18)100% (7/7)
changeSelfPassword (): void 100% (1/1)100% (7/7)100% (2/2)
clearComments (): void 100% (1/1)100% (5/5)100% (2/2)
clearNotifications (): void 100% (1/1)100% (5/5)100% (2/2)
showAbout (): void 100% (1/1)100% (7/7)100% (2/2)
showPreferences (): void 100% (1/1)100% (7/7)100% (2/2)
switchScreenMode (): void 100% (1/1)100% (21/21)100% (6/6)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hiveboard.command;
16 
17import org.jdesktop.application.Action;
18 
19import net.sourceforge.hiveevents.Channel;
20//import net.sourceforge.hivegui.docking.DockingHelper;
21 
22public class GeneralCommands extends AbstractCommandHolder
23{
24        public GeneralCommands(        Channel<Object>                                clearComments,
25                                                        Channel<Object>                                clearNotifications,
26                                                        Channel<Object>                         fullScreenMode,
27                                                        Channel<Object>                                windowMode)
28        {
29                _clearComments = clearComments;
30                _clearNotifications = clearNotifications;
31                _fullScreenMode = fullScreenMode;
32                _windowMode = windowMode;
33        }
34        
35        @Action public void        setAnyWriter()
36        {
37                // This action is a no-op
38        }
39 
40        @Action(enabledProperty = DRAW_BOARD_SELECTED)
41        public void        print()
42        {
43                _application.showMessage("unimplemented-feature");
44//                DockingHelper.trace(_application.getMainFrame().getContentPane(), "");
45        }
46 
47        @Action(enabledProperty = DRAW_BOARD_SELECTED)
48        public void        clearComments()
49        {
50                _clearComments.push(null);
51        }
52 
53        @Action public void        clearNotifications()
54        {
55                _clearNotifications.push(null);
56        }
57        
58        @Action public void        changeSelfPassword()
59        {
60                showDialog("change-password-panel");
61        }
62 
63        @Action(enabledProperty = DRAW_BOARD_SELECTED)
64        public void        switchScreenMode()
65        {
66                // In which mode are we currently?
67                if (_fullScreen)
68                {
69                        // Full screen: pass back to window mode
70                        _windowMode.push(null);
71 
72                }
73                else
74                {
75                        // Window: pass back to full screen mode
76                        _fullScreenMode.push(null);
77                }
78                _fullScreen = !_fullScreen;
79        }
80        
81        @Action public void        showPreferences()
82        {
83                showDialog("preferences-panel");
84        }
85 
86        @Action public void        showAbout()
87        {
88                showDialog("about-panel");
89        }
90 
91        final private Channel<Object>                        _clearComments;
92        final private Channel<Object>                        _clearNotifications;
93        final private Channel<Object>                        _fullScreenMode;
94        final private Channel<Object>                        _windowMode;
95        private boolean                                                        _fullScreen = false;
96}

[all classes][net.sourceforge.hiveboard.command]
EMMA 2.0.5312 (C) Vladimir Roubtsov