Component.java (processPaintEvent): Dispose of Graphics object when finished.
2003-01-28 Oscar Pearce <oscar@pearceenterprises.com> * java/awt/Component.java (processPaintEvent): Dispose of Graphics object when finished. From-SVN: r62052
This commit is contained in:
parent
e150159cbe
commit
757e166288
2 changed files with 25 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-01-28 Oscar Pearce <oscar@pearceenterprises.com>
|
||||
|
||||
* java/awt/Component.java (processPaintEvent): Dispose of Graphics
|
||||
object when finished.
|
||||
|
||||
2003-01-28 Andreas Tobler <a.tobler@schweiz.ch>
|
||||
|
||||
* libjava/configure.host: Disable can_unwind_signal on darwin.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Component.java -- a graphics component
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -4168,19 +4168,26 @@ p * <li>the set of backward traversal keys
|
|||
return;
|
||||
|
||||
Graphics gfx = getGraphics();
|
||||
Shape clip = event.getUpdateRect();
|
||||
gfx.setClip(clip);
|
||||
|
||||
switch (event.id)
|
||||
try
|
||||
{
|
||||
case PaintEvent.PAINT:
|
||||
paint(gfx);
|
||||
break;
|
||||
case PaintEvent.UPDATE:
|
||||
update(gfx);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("unknown paint event");
|
||||
Shape clip = event.getUpdateRect();
|
||||
gfx.setClip(clip);
|
||||
|
||||
switch (event.id)
|
||||
{
|
||||
case PaintEvent.PAINT:
|
||||
paint(gfx);
|
||||
break;
|
||||
case PaintEvent.UPDATE:
|
||||
update(gfx);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("unknown paint event");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
gfx.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue