200 |
return i.checkImage (); |
return i.checkImage (); |
201 |
} |
} |
202 |
|
|
203 |
public Image createImage (ImageProducer producer) |
public Image createImage (ImageProducer producer) |
204 |
{ |
{ |
205 |
return new GtkImage (producer, null); |
GtkImage image = new GtkImage (producer, null); |
206 |
|
producer.startProduction (image); |
207 |
|
return image; |
208 |
} |
} |
209 |
|
|
210 |
public Image createImage (int width, int height) |
public Image createImage (int width, int height) |
386 |
if (x == 0 && y == 0 && width == 0 && height == 0) |
if (x == 0 && y == 0 && width == 0 && height == 0) |
387 |
return; |
return; |
388 |
|
|
389 |
q.postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE, |
q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE, |
390 |
new Rectangle (x, y, width, height))); |
new Rectangle (x, y, width, height))); |
391 |
} |
} |
392 |
|
|
393 |
public void requestFocus () |
public void requestFocus () |
394 |
{ |
{ |
395 |
gtkWidgetRequestFocus (); |
gtkWidgetRequestFocus(); |
396 |
postFocusEvent (FocusEvent.FOCUS_GAINED, false); |
postFocusEvent(FocusEvent.FOCUS_GAINED, false); |
397 |
} |
} |
398 |
|
|
399 |
public void reshape (int x, int y, int width, int height) |
public void reshape (int x, int y, int width, int height) |
508 |
protected void postMouseEvent(int id, long when, int mods, int x, int y, |
protected void postMouseEvent(int id, long when, int mods, int x, int y, |
509 |
int clickCount, boolean popupTrigger) |
int clickCount, boolean popupTrigger) |
510 |
{ |
{ |
511 |
q.postEvent(new MouseEvent(awtComponent, id, when, mods, x, y, |
q().postEvent(new MouseEvent(awtComponent, id, when, mods, x, y, |
512 |
clickCount, popupTrigger)); |
clickCount, popupTrigger)); |
513 |
} |
} |
514 |
|
|
515 |
protected void postExposeEvent (int x, int y, int width, int height) |
protected void postExposeEvent (int x, int y, int width, int height) |
516 |
{ |
{ |
517 |
if (!isInRepaint) |
if (!isInRepaint) |
518 |
q.postEvent (new PaintEvent (awtComponent, PaintEvent.PAINT, |
q().postEvent (new PaintEvent (awtComponent, PaintEvent.PAINT, |
519 |
new Rectangle (x, y, width, height))); |
new Rectangle (x, y, width, height))); |
520 |
} |
} |
521 |
|
|
535 |
{ |
{ |
536 |
synchronized (q) |
synchronized (q) |
537 |
{ |
{ |
538 |
q.postEvent (keyEvent); |
q().postEvent (keyEvent); |
539 |
q.postEvent (new KeyEvent (awtComponent, KeyEvent.KEY_TYPED, when, mods, |
q().postEvent (new KeyEvent (awtComponent, KeyEvent.KEY_TYPED, when, mods, |
540 |
KeyEvent.VK_UNDEFINED, keyChar, keyLocation)); |
KeyEvent.VK_UNDEFINED, keyChar, keyLocation)); |
541 |
} |
} |
542 |
} |
} |
543 |
else |
else |
544 |
q.postEvent (keyEvent); |
q().postEvent (keyEvent); |
545 |
} |
} |
546 |
|
|
547 |
protected void postFocusEvent (int id, boolean temporary) |
protected void postFocusEvent (int id, boolean temporary) |
548 |
{ |
{ |
549 |
q.postEvent (new FocusEvent (awtComponent, id, temporary)); |
q().postEvent (new FocusEvent (awtComponent, id, temporary)); |
550 |
} |
} |
551 |
|
|
552 |
protected void postItemEvent (Object item, int stateChange) |
protected void postItemEvent (Object item, int stateChange) |
553 |
{ |
{ |
554 |
q.postEvent (new ItemEvent ((ItemSelectable)awtComponent, |
q().postEvent (new ItemEvent ((ItemSelectable)awtComponent, |
555 |
ItemEvent.ITEM_STATE_CHANGED, |
ItemEvent.ITEM_STATE_CHANGED, |
556 |
item, stateChange)); |
item, stateChange)); |
557 |
} |
} |