-
Notifications
You must be signed in to change notification settings - Fork 4
/
ILayerManager.java
93 lines (80 loc) · 2.64 KB
/
ILayerManager.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
/*******************************************************************************************************
*
* ILayerManager.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2021 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.common.interfaces;
import java.awt.geom.Rectangle2D;
import java.util.List;
import msi.gama.metamodel.shape.IShape;
/**
* The class ILayerManager. Manages a fixed set of layers on behalf of a IDisplaySurface
*
* @author drogoul
* @since 15 dec. 2011
*
*/
public interface ILayerManager extends ItemList<ILayer>, IDisposable {
/**
* Forces all layers to reload on the surface
*/
void outputChanged();
/**
* @param xc
* x-ordinate on screen
* @param yc
* y-ordinate on screen
* @return a list of ILayers that contain the screen point {x,y} or an empty list if none contain it
*/
List<ILayer> getLayersIntersecting(int xc, int yc);
/**
* Asks this manager to draw all of its enabled layers on the graphics passed in parameter
*
* @param displayGraphics
* an instance of IGraphics on which to draw the layers
*/
void drawLayersOn(IGraphics displayGraphics);
/**
* Whether the layers in this manager are to be drawn by respecting the world's proportions or not
*
* @return true if at least one layer needs to be drawn proportionnaly, false otherwise
*/
boolean stayProportional();
/**
* Returns a rectangle that represent the area to focus on in order to focus on the geometry passed in parameter
*
* @param geometry
* the geometry or agent on which to focus on
* @param s
* the surface of this manager
* @return a rectangle in screen coordinates
*/
Rectangle2D focusOn(IShape geometry, IDisplaySurface s);
/**
* Whether any of the layer managed by this manager can return coordinates for the position of the mouse
*
* @return true if at least one layer can provide coordinates
*/
boolean isProvidingCoordinates();
/**
* Whether any of the layers managed by this manager can return world coordinates for the position of the mouse
*
* @return true if at least one layer can provide world coordinates
*/
boolean isProvidingWorldCoordinates();
/**
* Checks for mouse menu event layer.
*
* @return true, if successful
*/
boolean hasMouseMenuEventLayer();
/**
* Force redrawing layers.
*/
void forceRedrawingLayers();
}