Normand Briere
2019-07-25 f2b6a33fdf84a06b958f9cb9d667a2eff3063d8b
Cone.java
....@@ -2,7 +2,7 @@
22
33 class Cone extends Biparam implements java.io.Serializable
44 {
5
- //static final long serialVersionUID = -679715043452968126L;
5
+ static final long serialVersionUID = -2558098774090336324L; // -679715043452968126L;
66
77 Cone()
88 {
....@@ -263,9 +263,11 @@
263263 editWindow = objectUI.GetEditor();
264264 }
265265
266
- void drawEditHandles(ClickInfo info, int level)
266
+ void drawEditHandles(//ClickInfo info,
267
+ int level)
267268 {
268
- super.drawEditHandles(info, level);
269
+ super.drawEditHandles(//info,
270
+ level);
269271 if (level == 1)
270272 {
271273 return;
....@@ -273,37 +275,39 @@
273275 {
274276 cVector temp = new cVector();
275277 LA.xformPos(base, toParent, temp);
276
- Rectangle baseSpot = calcHotSpot(temp, info);
278
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
277279 LA.xformPos(apex, toParent, temp);
278
- Rectangle apexSpot = calcHotSpot(temp, info);
279
- info.g.setColor(Color.green);
280
- info.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
281
- info.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
280
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
281
+ clickInfo.g.setColor(Color.green);
282
+ clickInfo.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
283
+ clickInfo.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
282284 return;
283285 }
284286 }
285287
286
- boolean doEditClick(ClickInfo info, int level)
288
+ boolean doEditClick(//ClickInfo info,
289
+ int level)
287290 {
288291 //if (level == 0)
289292 //return false;
290293 hitSomething = 0;
291
- if (super.doEditClick(info, level))
294
+ if (super.doEditClick(//info,
295
+ level))
292296 {
293297 hitSomething = 1;
294298 return true;
295299 }
296300 cVector temp = new cVector();
297301 LA.xformPos(base, toParent, temp);
298
- Rectangle baseSpot = calcHotSpot(temp, info);
302
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
299303 LA.xformPos(apex, toParent, temp);
300
- Rectangle apexSpot = calcHotSpot(temp, info);
301
- if (baseSpot.contains(info.x, info.y))
304
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
305
+ if (baseSpot.contains(clickInfo.x, clickInfo.y))
302306 {
303307 hitSomething = 2;
304308 startRad = baseRadius;
305309 } else
306
- if (apexSpot.contains(info.x, info.y))
310
+ if (apexSpot.contains(clickInfo.x, clickInfo.y))
307311 {
308312 hitSomething = 3;
309313 startRad = apexRadius;
....@@ -311,20 +315,22 @@
311315 {
312316 return false;
313317 }
314
- startX = info.x;
318
+ startX = clickInfo.x;
315319 return true;
316320 }
317321
318
- void doEditDrag(ClickInfo info, boolean opposite)
322
+ void doEditDrag(//ClickInfo info,
323
+ boolean opposite)
319324 {
320325 if (hitSomething == 0)
321326 return;
322327 if (hitSomething == 1)
323328 {
324
- super.doEditDrag(info, opposite);
329
+ super.doEditDrag(//info,
330
+ opposite);
325331 return;
326332 }
327
- double deltaR = info.x - startX;
333
+ double deltaR = clickInfo.x - startX;
328334 double newRad = startRad + deltaR;
329335 if (newRad < 0)
330336 newRad = 0;
....@@ -333,7 +339,7 @@
333339 else
334340 apexRadius = newRad;
335341 recalculate();
336
- info.pane.repaint();
342
+ clickInfo.pane.repaint();
337343 }
338344
339345 cVector base;