70 |
import java.awt.image.ImageProducer; |
import java.awt.image.ImageProducer; |
71 |
import java.awt.image.VolatileImage; |
import java.awt.image.VolatileImage; |
72 |
import java.awt.peer.ComponentPeer; |
import java.awt.peer.ComponentPeer; |
73 |
|
import java.util.Timer; |
74 |
|
import java.util.TimerTask; |
75 |
|
|
76 |
public class GtkComponentPeer extends GtkGenericPeer |
public class GtkComponentPeer extends GtkGenericPeer |
77 |
implements ComponentPeer |
implements ComponentPeer |
374 |
if (x == 0 && y == 0 && width == 0 && height == 0) |
if (x == 0 && y == 0 && width == 0 && height == 0) |
375 |
return; |
return; |
376 |
|
|
377 |
q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE, |
Timer t = new Timer(); |
378 |
new Rectangle (x, y, width, height))); |
|
379 |
|
t.schedule(new RepaintTimerTask(x, y, width, height), tm); |
380 |
|
} |
381 |
|
|
382 |
|
private class RepaintTimerTask extends TimerTask |
383 |
|
{ |
384 |
|
private int x, y, width, height; |
385 |
|
|
386 |
|
RepaintTimerTask(int x, int y, int width, int height) |
387 |
|
{ |
388 |
|
this.x = x; |
389 |
|
this.y = y; |
390 |
|
this.width = width; |
391 |
|
this.height = height; |
392 |
|
} |
393 |
|
|
394 |
|
public void run() |
395 |
|
{ |
396 |
|
q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE, |
397 |
|
new Rectangle (x, y, width, height))); |
398 |
|
} |
399 |
} |
} |
400 |
|
|
401 |
public void requestFocus () |
public void requestFocus () |
608 |
|
|
609 |
public void updateCursorImmediately () |
public void updateCursorImmediately () |
610 |
{ |
{ |
611 |
|
if (awtComponent.getCursor() != null) |
612 |
|
setCursor(awtComponent.getCursor()); |
613 |
} |
} |
614 |
|
|
615 |
public boolean handlesWheelScrolling () |
public boolean handlesWheelScrolling () |