Cosmetic change. Use two rows of buttons.

git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@82432 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-11-08 20:27:43 +00:00
parent 232b27e5c3
commit 2d71a48609

View File

@@ -57,7 +57,7 @@ import java.io.FileInputStream;
* This is a test application for using the BrowserControl.
*
* @version $Id: EMWindow.java,v 1.24.2.2 2000-11-07 02:40:35 edburns%acm.org Exp $
* @version $Id: EMWindow.java,v 1.24.2.3 2000-11-08 20:27:43 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
@@ -174,17 +174,26 @@ public class EMWindow extends Frame implements DialogClient, ActionListener, Doc
stopButton.setEnabled(false);
refreshButton = makeItem(buttonsPanel, "Refresh", 3, 0, 1, 1, 0.0, 0.0);
refreshButton.setEnabled(false);
makeItem(buttonsPanel, "Bookmarks", 4, 0, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, "Stream With Len", 5, 0, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, "Stream No Len", 6, 0, 1, 1, 0.0, 0.0);
// makeItem(buttonsPanel, "DOMViewer", 7, 0, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, "Bookmarks", 0, 1, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, "Stream With Len", 1, 1, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, "Stream No Len", 2, 1, 1, 1, 0.0, 0.0);
makeItem(buttonsPanel, " ", 3, 1, 1, 1, 0.0, 0.0);
//makeItem(buttonsPanel, "DOMViewer", 3, 1, 1, 1, 0.0, 0.0);
// Create the control panel
controlPanel = new Panel();
controlPanel.setLayout(new BorderLayout());
// Add the URL field, and the buttons panel
controlPanel.add(urlField, BorderLayout.CENTER);
Panel centerPanel = new Panel();
Button spacerButton = new Button(" ");
spacerButton.setEnabled(false);
centerPanel.setLayout(new BorderLayout());
centerPanel.add(urlField, BorderLayout.NORTH);
centerPanel.add(spacerButton, BorderLayout.SOUTH);
// controlPanel.add(urlField, BorderLayout.CENTER);
controlPanel.add(centerPanel, BorderLayout.CENTER);
controlPanel.add(buttonsPanel, BorderLayout.WEST);
// create the status panel
@@ -466,6 +475,8 @@ public void actionPerformed (ActionEvent evt)
history.forward();
}
}
else if (command.equals(" ")) {
}
else {
navigation.loadURL(urlField.getText());
}
@@ -540,6 +551,10 @@ private Component makeItem (Panel p, Object arg, int x, int y, int w, int h, dou
p.add(comp);
gbl.setConstraints(comp, c);
if (((String)arg).equals(" ")) {
b.setEnabled(false);
}
}
return comp;
} // makeItem()