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

COVERAGE SUMMARY FOR SOURCE FILE [GeneralSetWriter.java]

nameclass, %method, %block, %line, %
GeneralSetWriter.java100% (2/2)100% (8/8)100% (68/68)100% (14/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GeneralSetWriter100% (1/1)100% (6/6)100% (49/49)100% (11/11)
GeneralSetWriter (HiveGuiApplicationMain, WhiteBoardUserService, Account, int... 100% (1/1)100% (16/16)100% (6/6)
access$000 (GeneralSetWriter): int 100% (1/1)100% (3/3)100% (1/1)
access$100 (GeneralSetWriter): int 100% (1/1)100% (3/3)100% (1/1)
access$200 (GeneralSetWriter): WhiteBoardUserService 100% (1/1)100% (3/3)100% (1/1)
createAction (HiveGuiApplicationMain, WhiteBoardUserService, Account, int): A... 100% (1/1)100% (17/17)100% (3/3)
setWriter (): Task 100% (1/1)100% (7/7)100% (1/1)
     
class GeneralSetWriter$1100% (1/1)100% (2/2)100% (19/19)100% (3/3)
GeneralSetWriter$1 (GeneralSetWriter, HiveGuiApplicationMain): void 100% (1/1)100% (7/7)100% (1/1)
doInBackground (): Void 100% (1/1)100% (12/12)100% (2/2)

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;
18import org.jdesktop.application.Task;
19 
20import net.sourceforge.hiveboard.Account;
21import net.sourceforge.hiveboard.WhiteBoardUserService;
22import net.sourceforge.hivegui.application.HiveGuiApplicationMain;
23 
24/**
25 * This command is used from full screen mode by the popup menu item to set the
26 * writer of the current board. It is instantiated once for each participant of
27 * the board.
28 *
29 * @author Jean-Francois Poilpret
30 */
31public class GeneralSetWriter
32{
33        static public javax.swing.Action        createAction(        HiveGuiApplicationMain        application,
34                                                                                                                WhiteBoardUserService        service,
35                                                                                                                Account                                        who,
36                                                                                                                int                                                where)
37        {
38                GeneralSetWriter target = new GeneralSetWriter(application, service, who, where);
39                javax.swing.Action action;
40                action = application.getContext().getActionMap(target).get("setWriter");
41                return action;
42        }
43 
44        public GeneralSetWriter(HiveGuiApplicationMain        application,
45                                                        WhiteBoardUserService        service,
46                                                        Account                                        who,
47                                                        int                                                where)
48        {
49                _application = application;
50                _service = service;
51                _where = where;
52                _who = who.getId();
53        }
54 
55        @Action(block = Task.BlockingScope.WINDOW)
56        public Task setWriter()
57        {
58                return new AbstractTask(_application)
59                {
60                        @Override protected Void doInBackground() throws Exception
61                        {
62                                _service.giveToken(_where, _who);
63                                return null;
64                        }
65                };
66        }
67 
68        private final HiveGuiApplicationMain        _application;
69        private final WhiteBoardUserService                _service;
70        private final int                                                _who;
71        private final int                                                _where;
72}

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