/
IGamaView.java
127 lines (82 loc) · 2.83 KB
/
IGamaView.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*******************************************************************************************************
*
* msi.gama.common.interfaces.IGamaView.java, in plugin msi.gama.core, is part of the source code of the GAMA modeling
* and simulation platform (v. 1.8.1)
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.common.interfaces;
import java.util.Collections;
import java.util.List;
import msi.gama.kernel.experiment.IExperimentPlan;
import msi.gama.kernel.experiment.ITopLevelAgent;
import msi.gama.kernel.simulation.SimulationAgent;
import msi.gama.outputs.IDisplayOutput;
import msi.gama.outputs.LayeredDisplayOutput;
import msi.gama.runtime.IScope;
import msi.gama.util.GamaColor;
import msi.gaml.architecture.user.UserPanelStatement;
import msi.gaml.statements.test.CompoundSummary;
/**
* An abstract representation of the 'views', in a UI sense, that are used to display outputs or present information to
* the user. A view can display one or several outputs (for instance, several monitors)
*
* @author drogoul
*/
public interface IGamaView {
void update(IDisplayOutput output);
void addOutput(IDisplayOutput output);
void removeOutput(IDisplayOutput putput);
IDisplayOutput getOutput();
void close(IScope scope);
void changePartNameWithSimulation(SimulationAgent agent);
void reset();
String getPartName();
void setName(String name);
void updateToolbarState();
public interface Test {
void addTestResult(final CompoundSummary<?, ?> summary);
void startNewTestSequence(boolean all);
void displayProgress(int number, int total);
void finishTestSequence();
}
public interface Display extends IGamaView {
boolean containsPoint(int x, int y);
IDisplaySurface getDisplaySurface();
void toggleFullScreen();
boolean isFullScreen();
void toggleSideControls();
void toggleOverlay();
void showOverlay();
void hideOverlay();
void hideToolbar();
void showToolbar();
@Override
LayeredDisplayOutput getOutput();
int getIndex();
void setIndex(int i);
default List<String> getCameraNames() {
return Collections.EMPTY_LIST;
}
void takeSnapshot();
}
public interface Error {
void displayErrors();
}
public interface Html {
void setUrl(String url);
}
public interface Parameters {
void addItem(IExperimentPlan exp);
void updateItemValues();
}
public interface Console {
void append(String msg, ITopLevelAgent root, GamaColor color);
}
public interface User {
void initFor(final IScope scope, final UserPanelStatement panel);
}
}