Container.java (addImpl): Enable paint events if adding a lightweight to a heavyweight.
2003-04-20 Scott Gilbertson <scottg@mantatest.com> * java/awt/Container.java (addImpl): Enable paint events if adding a lightweight to a heavyweight. (addNotify): Ensure that peer is created before addNotifyContainerChildren. (addNotifyContainerChildren): Enable paint events if a heavyweight container contains a lightweight. From-SVN: r65870
This commit is contained in:
parent
b39b808448
commit
ebf96c133b
2 changed files with 23 additions and 6 deletions
|
@ -297,9 +297,13 @@ public class Container extends Component
|
|||
if (peer != null)
|
||||
{
|
||||
comp.addNotify();
|
||||
|
||||
if (comp.isLightweight())
|
||||
enableEvents(comp.eventMask);
|
||||
|
||||
if (comp.isLightweight ())
|
||||
{
|
||||
enableEvents (comp.eventMask);
|
||||
if (!isLightweight ())
|
||||
enableEvents (AWTEvent.PAINT_EVENT_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
invalidate();
|
||||
|
@ -907,8 +911,8 @@ public class Container extends Component
|
|||
*/
|
||||
public void addNotify()
|
||||
{
|
||||
addNotifyContainerChildren();
|
||||
super.addNotify();
|
||||
addNotifyContainerChildren();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1288,8 +1292,12 @@ public class Container extends Component
|
|||
for (int i = ncomponents; --i >= 0; )
|
||||
{
|
||||
component[i].addNotify();
|
||||
if (component[i].isLightweight())
|
||||
enableEvents(component[i].eventMask);
|
||||
if (component[i].isLightweight ())
|
||||
{
|
||||
enableEvents(component[i].eventMask);
|
||||
if (peer != null && !isLightweight ())
|
||||
enableEvents (AWTEvent.PAINT_EVENT_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue