Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RcpProgressMonitor |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
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, | |
13 | * either express or implied. See the License for the specific language | |
14 | * governing permissions and limitations under the License. | |
15 | */ | |
16 | package org.seasar.uruma.jobs.impl; | |
17 | ||
18 | import org.eclipse.core.runtime.IProgressMonitor; | |
19 | import org.seasar.uruma.jobs.ProgressMonitor; | |
20 | ||
21 | /** | |
22 | * RCP 環境における {@link ProgressMonitor} の実装クラスです。<br /> | |
23 | * 本クラスは {@link IProgressMonitor} をラップします。 | |
24 | * | |
25 | * @author y-komori | |
26 | */ | |
27 | public class RcpProgressMonitor implements ProgressMonitor { | |
28 | private IProgressMonitor monitor; | |
29 | ||
30 | /** | |
31 | * {@link RcpProgressMonitor} を構築します。<br /> | |
32 | * | |
33 | * @param monitor | |
34 | * {@link IProgressMonitor} オブジェクト | |
35 | */ | |
36 | 0 | public RcpProgressMonitor(final IProgressMonitor monitor) { |
37 | 0 | this.monitor = monitor; |
38 | 0 | } |
39 | ||
40 | /* | |
41 | * @see org.seasar.uruma.jobs.ProgressMonitor#beginTask(java.lang.String, | |
42 | * int) | |
43 | */ | |
44 | public void beginTask(final String name, final int totalWork) { | |
45 | 0 | monitor.beginTask(name, totalWork); |
46 | 0 | } |
47 | ||
48 | /* | |
49 | * @see org.seasar.uruma.jobs.ProgressMonitor#done() | |
50 | */ | |
51 | public void done() { | |
52 | 0 | monitor.done(); |
53 | 0 | } |
54 | ||
55 | /* | |
56 | * @see org.seasar.uruma.jobs.ProgressMonitor#isCanceled() | |
57 | */ | |
58 | public boolean isCanceled() { | |
59 | 0 | return monitor.isCanceled(); |
60 | } | |
61 | ||
62 | /* | |
63 | * @see org.seasar.uruma.jobs.ProgressMonitor#setCanceled(boolean) | |
64 | */ | |
65 | public void setCanceled(final boolean value) { | |
66 | 0 | monitor.setCanceled(value); |
67 | 0 | } |
68 | ||
69 | /* | |
70 | * @see org.seasar.uruma.jobs.ProgressMonitor#setTaskName(java.lang.String) | |
71 | */ | |
72 | public void setTaskName(final String name) { | |
73 | 0 | monitor.setTaskName(name); |
74 | 0 | } |
75 | ||
76 | /* | |
77 | * @see org.seasar.uruma.jobs.ProgressMonitor#subTask(java.lang.String) | |
78 | */ | |
79 | public void subTask(final String name) { | |
80 | 0 | monitor.setTaskName(name); |
81 | 0 | } |
82 | ||
83 | /* | |
84 | * @see org.seasar.uruma.jobs.ProgressMonitor#worked(int) | |
85 | */ | |
86 | public void worked(final int work) { | |
87 | 0 | monitor.worked(work); |
88 | 0 | } |
89 | ||
90 | } |