Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey 2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions

View file

@ -340,13 +340,16 @@ public class Frame extends Window implements MenuContainer
parent.remove(menuBar);
menuBar.setParent(this);
if (peer != null)
{
if (menuBar != null)
menuBar.addNotify();
invalidateTree();
((FramePeer) peer).setMenuBar(menuBar);
}
// Create local copy for thread safety.
FramePeer p = (FramePeer) peer;
if (p != null)
{
if (menuBar != null)
menuBar.addNotify();
if (valid)
invalidate();
p.setMenuBar(menuBar);
}
}
}
@ -485,7 +488,10 @@ public class Frame extends Window implements MenuContainer
private static void noteFrame(Frame f)
{
weakFrames.add(new WeakReference(f));
synchronized (weakFrames)
{
weakFrames.add(new WeakReference(f));
}
}
public static Frame[] getFrames()
@ -533,8 +539,7 @@ public class Frame extends Window implements MenuContainer
public int getState()
{
// FIXME: State might have changed in the peer... Must check.
return (state & ICONIFIED) != 0 ? ICONIFIED : NORMAL;
return (getExtendedState() & ICONIFIED) != 0 ? ICONIFIED : NORMAL;
}
/**
@ -542,7 +547,13 @@ public class Frame extends Window implements MenuContainer
*/
public void setExtendedState(int state)
{
this.state = state;
if (getToolkit().isFrameStateSupported(state))
{
this.state = state;
FramePeer p = (FramePeer) peer;
if (p != null)
p.setState(state);
}
}
/**
@ -550,6 +561,9 @@ public class Frame extends Window implements MenuContainer
*/
public int getExtendedState()
{
FramePeer p = (FramePeer) peer;
if (p != null)
state = p.getState();
return state;
}