Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IView |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.view.able; | |
2 | ||
3 | import org.jtheque.core.managers.view.ViewComponent; | |
4 | import org.jtheque.core.managers.view.able.components.IModel; | |
5 | ||
6 | ||
7 | /* | |
8 | * This file is part of JTheque. | |
9 | * | |
10 | * JTheque is free software: you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation, either version 3 of the License. | |
13 | * | |
14 | * JTheque is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
21 | */ | |
22 | ||
23 | /** | |
24 | * Represents a view. | |
25 | * | |
26 | * @author Baptiste Wicht | |
27 | */ | |
28 | public interface IView extends ViewComponent { | |
29 | /** | |
30 | * Display the view. | |
31 | */ | |
32 | void display(); | |
33 | ||
34 | /** | |
35 | * Close the view. | |
36 | */ | |
37 | void closeDown(); | |
38 | ||
39 | /** | |
40 | * Display the view in first plan. | |
41 | */ | |
42 | void toFirstPlan(); | |
43 | ||
44 | /** | |
45 | * Enable or disable the view. | |
46 | * | |
47 | * @param enabled If true, the interface will be enabled else the interface will be disabled | |
48 | */ | |
49 | void setEnabled(boolean enabled); | |
50 | ||
51 | /** | |
52 | * Indicate if the view is enabled or not. | |
53 | * | |
54 | * @return <code>true</code> if the view is enabled else <code>false</code> | |
55 | */ | |
56 | boolean isEnabled(); | |
57 | ||
58 | /** | |
59 | * Send a message to the view. | |
60 | * | |
61 | * @param message The message key. | |
62 | * @param value The value of the message. | |
63 | */ | |
64 | void sendMessage(String message, Object value); | |
65 | ||
66 | /** | |
67 | * Refresh the view. | |
68 | */ | |
69 | void refresh(); | |
70 | ||
71 | /** | |
72 | * Return the model of the view. | |
73 | * | |
74 | * @return The model of the view. | |
75 | */ | |
76 | IModel getModel(); | |
77 | ||
78 | /** | |
79 | * Validate the view. | |
80 | * | |
81 | * @return true if the data are valid else false. | |
82 | */ | |
83 | boolean validateContent(); | |
84 | } |