aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/demo/BrowserDemo.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
committerMarc Englund <marc.englund@itmill.com>2007-11-19 14:03:05 +0000
commitf2e3722df9676436680afc0f1991e91e1696fb99 (patch)
tree6f255ff78abaf96f1e71a1f2c9ecd3b66647f4a2 /src/com/itmill/toolkit/demo/BrowserDemo.java
parent93291f532db9d545cf2a8dd98e2671f27cd197b0 (diff)
downloadvaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.tar.gz
vaadin-framework-f2e3722df9676436680afc0f1991e91e1696fb99.zip
MASS REFORMAT.
According to http://toolkit.intra.itmill.com/trac/itmilltoolkit/wiki/CodingConventions svn changeset:2864/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/demo/BrowserDemo.java')
-rw-r--r--src/com/itmill/toolkit/demo/BrowserDemo.java89
1 files changed, 45 insertions, 44 deletions
diff --git a/src/com/itmill/toolkit/demo/BrowserDemo.java b/src/com/itmill/toolkit/demo/BrowserDemo.java
index 62a5a5fde5..5a03dce9d9 100644
--- a/src/com/itmill/toolkit/demo/BrowserDemo.java
+++ b/src/com/itmill/toolkit/demo/BrowserDemo.java
@@ -15,58 +15,59 @@ import com.itmill.toolkit.ui.Window;
* @see com.itmill.toolkit.ui.Window
*/
public class BrowserDemo extends com.itmill.toolkit.Application implements
- Select.ValueChangeListener {
+ Select.ValueChangeListener {
- // Default URL to open.
- private static final String DEFAULT_URL = "http://www.itmill.com";
+ // Default URL to open.
+ private static final String DEFAULT_URL = "http://www.itmill.com";
- // The embedded page
- Embedded emb = new Embedded();
+ // The embedded page
+ Embedded emb = new Embedded();
- public void init() {
- // Create and set main window
- Window browser = new Window("IT Mill Browser");
- setMainWindow(browser);
+ public void init() {
+ // Create and set main window
+ Window browser = new Window("IT Mill Browser");
+ setMainWindow(browser);
- // Use the expand layout to allow one component to use as much space as
- // possible.
- ExpandLayout exl = new ExpandLayout();
- browser.setLayout(exl);
- exl.setSizeFull();
+ // Use the expand layout to allow one component to use as much
+ // space as
+ // possible.
+ ExpandLayout exl = new ExpandLayout();
+ browser.setLayout(exl);
+ exl.setSizeFull();
- // create the address combobox
- Select select = new Select();
- // allow input
- select.setNewItemsAllowed(true);
- // no empty selection
- select.setNullSelectionAllowed(false);
- // no 'go' -button clicking necessary
- select.setImmediate(true);
- // add some pre-configured URLs
- select.addItem(DEFAULT_URL);
- select.addItem("http://www.google.com");
- select.addItem("http://toolkit.itmill.com/demo");
- // add to layout
- exl.addComponent(select);
- // add listener and select initial URL
- select.addListener(this);
- select.setValue(DEFAULT_URL);
+ // create the address combobox
+ Select select = new Select();
+ // allow input
+ select.setNewItemsAllowed(true);
+ // no empty selection
+ select.setNullSelectionAllowed(false);
+ // no 'go' -button clicking necessary
+ select.setImmediate(true);
+ // add some pre-configured URLs
+ select.addItem(DEFAULT_URL);
+ select.addItem("http://www.google.com");
+ select.addItem("http://toolkit.itmill.com/demo");
+ // add to layout
+ exl.addComponent(select);
+ // add listener and select initial URL
+ select.addListener(this);
+ select.setValue(DEFAULT_URL);
- // configure the embedded and add to layout
- emb.setType(Embedded.TYPE_BROWSER);
- exl.addComponent(emb);
- // make the embedded as large as possible
- exl.expand(emb);
+ // configure the embedded and add to layout
+ emb.setType(Embedded.TYPE_BROWSER);
+ exl.addComponent(emb);
+ // make the embedded as large as possible
+ exl.expand(emb);
- }
+ }
- public void valueChange(ValueChangeEvent event) {
- String url = (String) event.getProperty().getValue();
- if (url != null) {
- // the selected url has changed, let's go there
- emb.setSource(new ExternalResource(url));
- }
+ public void valueChange(ValueChangeEvent event) {
+ String url = (String) event.getProperty().getValue();
+ if (url != null) {
+ // the selected url has changed, let's go there
+ emb.setSource(new ExternalResource(url));
+ }
- }
+ }
}