Source code: com/arranger/jarl/base/IContext.java
1 package com.arranger.jarl.base;
2
3 import com.arranger.jarl.Jarl;
4
5 import java.awt.*;
6 import java.util.Map;
7
8 /**
9 * IContext describes the rendering context including:
10 * Current time
11 * Rendering preferences
12 * Rendering hints
13 */
14 public interface IContext extends IStatusListener {
15
16 /**
17 * @return the currently configured rendering hints
18 */
19 public RenderingHints getRenderingHints();
20
21 /**
22 * Set rendering hints
23 * @param renderingHints
24 */
25 public void setRenderingHints(RenderingHints renderingHints);
26
27 /**
28 * @return the current rendering height
29 */
30 public int getHeight();
31
32 /**
33 * Set height
34 * @param height
35 */
36 public void setHeight(int height);
37
38 /**
39 * @return the current rendering width
40 */
41 public int getWidth();
42
43 /**
44 * Set width
45 * @param width
46 */
47 public void setWidth(int width);
48
49 /**
50 * Create a properly initialized image
51 * @return an initialized image
52 */
53 public Image createImage();
54
55 /**
56 * Get the current rendering manager
57 * @return the current {@link IRenderManager}
58 */
59 public IRenderManager getRenderManager();
60
61 /**
62 * sets the current render manager
63 * @param renderManager
64 */
65 public void setRenderManager(IRenderManager renderManager);
66
67 /**
68 * Get the current gradient manager
69 * @return the current {@link IGradientManager}
70 */
71 public IGradientManager getGradientManager();
72
73 /**
74 * sets the current gradient manager
75 * @param gradientManager
76 */
77 public void setGradientManager(IGradientManager gradientManager);
78
79 /**
80 * @return the current instance of Jarl
81 */
82 public Jarl getJarl();
83
84 /**
85 * Set the current instance of jarl
86 * @param jarl
87 */
88 public void setJarl(Jarl jarl);
89
90 /**
91 * Get the current time
92 * @return the current rendering time
93 */
94 public Time getTime();
95
96
97 /**
98 * Get the absolute current time that won't be affected by holds or echos
99 * @return the absolutely current rendering time
100 */
101 public Time getAbsoluteTime();
102
103 /**
104 * Set the absolute current time that won't be affected by holds or echos
105 */
106 public void setAbsoluteTime(Time time);
107
108 /**
109 * @return the default stroke width
110 */
111 public float getStrokeWidth();
112
113 /**
114 * The default stroke width
115 * @param strokeWidth
116 */
117 public void setStrokeWidth(float strokeWidth);
118
119 /**
120 * sets the current time
121 * @param time
122 */
123 public void setTime(Time time);
124
125 /**
126 * @return the default Stroke
127 */
128 public Stroke getDefaultStroke();
129
130 /**
131 * @param defaultStroke the default stroke
132 */
133 public void setDefaultStroke(Stroke defaultStroke);
134
135 /**
136 * Clones this object
137 */
138 public Object clone();
139
140 /**
141 * Copy the params from the other context
142 * @param context
143 */
144 public void copy(IContext context);
145
146 /**
147 * Adds a status Listener
148 * @param statusListener
149 */
150 public void addStatusListener(IStatusListener statusListener);
151
152 /**
153 * Removes a status Listener
154 * @param statusListener
155 */
156 public void removeStatusListener(IStatusListener statusListener);
157
158 /**
159 * @return an alterable map
160 */
161 public Map getAttributes();
162 }