aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-12-28 07:48:08 +0000
committerMarc Englund <marc.englund@itmill.com>2007-12-28 07:48:08 +0000
commitf762a82549f2fd7fdab08444f4fc93f6ddfea564 (patch)
treee924dec00ba5cc3e41df20f6998b695dc9837f00 /src
parent8a442f087ab75f285cb84921e71d15d3c7a25bbd (diff)
downloadvaadin-framework-f762a82549f2fd7fdab08444f4fc93f6ddfea564.tar.gz
vaadin-framework-f762a82549f2fd7fdab08444f4fc93f6ddfea564.zip
Made it easier to find the "editable grid" (table in editmode)
svn changeset:3321/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java10
-rw-r--r--src/com/itmill/toolkit/demo/featurebrowser/TableExample.java9
2 files changed, 15 insertions, 4 deletions
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
index 744d415702..81cd281ae2 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
@@ -79,8 +79,10 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
{ "Wrangling data", "ComboBox", "ComboBox - the swiss army select",
ComboBoxExample.class },
// Wrangling data: Table
- { "Wrangling data", "Table",
- "A dynamic Table with bells, whistles and actions",
+ {
+ "Wrangling data",
+ "Table (\"grid\")",
+ "Table with bells, whistles, editmode and actions (contextmenu)",
TableExample.class },
// Wrangling data: Tree
{ "Wrangling data", "Tree", "A hierarchy of things",
@@ -198,7 +200,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
if (Layout.class.isAssignableFrom(component.getClass())) {
w.setLayout((Layout) component);
} else {
- //w.getLayout().getSize().setSizeFull();
+ // w.getLayout().getSize().setSizeFull();
w.addComponent(component);
}
getMainWindow().addWindow(w);
@@ -225,7 +227,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
if (Layout.class.isAssignableFrom(component.getClass())) {
w.setLayout((Layout) component);
} else {
- //w.getLayout().getSize().setSizeFull();
+ // w.getLayout().getSize().setSizeFull();
w.addComponent(component);
}
addWindow(w);
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/TableExample.java b/src/com/itmill/toolkit/demo/featurebrowser/TableExample.java
index e42d50bebb..94674ace8c 100644
--- a/src/com/itmill/toolkit/demo/featurebrowser/TableExample.java
+++ b/src/com/itmill/toolkit/demo/featurebrowser/TableExample.java
@@ -88,6 +88,15 @@ public class TableExample extends CustomComponent implements Action.Handler,
deselect.setStyleName(Button.STYLE_LINK);
deselect.addListener(this);
horiz.addComponent(deselect);
+ final CheckBox editmode = new CheckBox("Editmode ");
+ editmode.addListener(new CheckBox.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ source.setEditable(((Boolean) event.getButton().getValue())
+ .booleanValue());
+ }
+ });
+ editmode.setImmediate(true);
+ horiz.addComponent(editmode);
// "saved" table, minimalistic
saved = new Table("Saved creatures");