/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70.2.3 by gnu_andrew, Sun Jan 16 02:14:45 2005 UTC revision 1.70.2.4 by gnu_andrew, Sun Jan 16 15:15:01 2005 UTC
# Line 200  public class GtkComponentPeer extends Gt Line 200  public class GtkComponentPeer extends Gt
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)
# Line 384  public class GtkComponentPeer extends Gt Line 386  public class GtkComponentPeer extends Gt
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)
# Line 506  public class GtkComponentPeer extends Gt Line 508  public class GtkComponentPeer extends Gt
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    
# Line 533  public class GtkComponentPeer extends Gt Line 535  public class GtkComponentPeer extends Gt
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    }    }

Legend:
Removed from v.1.70.2.3  
changed lines
  Added in v.1.70.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26