Lines 130-135
Link Here
|
130 |
int color=current_color(); |
130 |
int color=current_color(); |
131 |
for (int i=0; i<parent.matrix.length; i++)parent.matrix[i]=color; |
131 |
for (int i=0; i<parent.matrix.length; i++)parent.matrix[i]=color; |
132 |
send(new Reset(current_color())); |
132 |
send(new Reset(current_color())); |
|
|
133 |
parent.repaint(); |
133 |
} |
134 |
} |
134 |
|
135 |
|
135 |
public void focusLost(FocusEvent e){} |
136 |
public void focusLost(FocusEvent e){} |
Lines 185-190
Link Here
|
185 |
} |
186 |
} |
186 |
|
187 |
|
187 |
} |
188 |
} |
|
|
189 |
parent.repaint(); |
188 |
} |
190 |
} |
189 |
} |
191 |
} |
190 |
} |
192 |
} |
Lines 200-205
Link Here
|
200 |
element=current_mode(); |
202 |
element=current_mode(); |
201 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
203 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
202 |
parent.requestFocus(); |
204 |
parent.requestFocus(); |
|
|
205 |
parent.repaint(); |
203 |
} |
206 |
} |
204 |
|
207 |
|
205 |
} |
208 |
} |
Lines 209-214
Link Here
|
209 |
// texttool watches mousemove, not only mousedrag |
212 |
// texttool watches mousemove, not only mousedrag |
210 |
if (element instanceof LetterBox){ |
213 |
if (element instanceof LetterBox){ |
211 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
214 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
|
|
215 |
parent.repaint(); |
212 |
} |
216 |
} |
213 |
} |
217 |
} |
214 |
|
218 |
|
Lines 229-242
Link Here
|
229 |
if (mousekey==1 && stateChanged){ |
233 |
if (mousekey==1 && stateChanged){ |
230 |
element=current_mode(); |
234 |
element=current_mode(); |
231 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
235 |
((Shape)element).init((short)e.getX(),(short)e.getY(),current_color(), current_thick(),(short)e.getX(),(short)e.getY()); |
|
|
236 |
parent.repaint(); |
232 |
} |
237 |
} |
233 |
|
238 |
|
234 |
if (mousekey==1 && element instanceof LetterBox){ |
239 |
if (mousekey==1 && element instanceof LetterBox){ |
235 |
((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); |
240 |
((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); |
|
|
241 |
parent.repaint(); |
236 |
} |
242 |
} |
237 |
|
243 |
|
238 |
if (mousekey==2){ |
244 |
if (mousekey==2){ |
239 |
colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); |
245 |
colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); |
|
|
246 |
parent.repaint(); |
240 |
} |
247 |
} |
241 |
|
248 |
|
242 |
} |
249 |
} |
Lines 265-275
Link Here
|
265 |
if (element != null) |
272 |
if (element != null) |
266 |
((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); |
273 |
((Shape)element).setx2y2((short)e.getX(),(short)e.getY()); |
267 |
} |
274 |
} |
|
|
275 |
|
276 |
parent.repaint(); |
268 |
} |
277 |
} |
269 |
|
278 |
|
270 |
if (mousekey==2) |
279 |
if (mousekey==2){ |
271 |
if (e.getX()>=0 && e.getX()<DIM_X && e.getY()>=0 && e.getY()<DIM_Y) |
280 |
if (e.getX()>=0 && e.getX()<DIM_X && e.getY()>=0 && e.getY()<DIM_Y) |
272 |
colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); |
281 |
colorpicker.setNewColor(parent.matrix[e.getY()*DIM_X+e.getX()]); |
|
|
282 |
|
283 |
parent.repaint(); |
284 |
} |
273 |
|
285 |
|
274 |
} |
286 |
} |
275 |
|
287 |
|
Lines 293-298
Link Here
|
293 |
draw(element,parent.matrix); |
305 |
draw(element,parent.matrix); |
294 |
send(element); |
306 |
send(element); |
295 |
element=null; |
307 |
element=null; |
|
|
308 |
parent.repaint(); |
296 |
} |
309 |
} |
297 |
} |
310 |
} |
298 |
mousekey=0; |
311 |
mousekey=0; |