[ 1795370 ] Include the main window in the window list menu

This commit is contained in:
Heng Sin Low 2007-09-15 06:19:24 +00:00
parent 06eec41494
commit 22232d8ee1
1 changed files with 16 additions and 0 deletions

View File

@ -121,6 +121,22 @@ public class WindowMenu extends JMenu {
closeOthers.setEnabled(false);
}
if ( !(frame instanceof AMenu) ) {
JFrame frame = Env.getWindow(0);
if (frame != null && frame instanceof AMenu) {
menu = new ChildMenuItem((AMenu)frame);
menu.setState(false);
menu.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
CFrame frame = ((ChildMenuItem)ae.getSource()).getWindow();
AEnv.showWindow(frame);
}
});
add(menu);
addSeparator();
}
}
for (i = 0; i < array.length; i++) {
menu = new ChildMenuItem(array[i]);
menu.setState(array[i].equals(frame));