From: Marc Englund Date: Fri, 28 Dec 2007 07:48:08 +0000 (+0000) Subject: Made it easier to find the "editable grid" (table in editmode) X-Git-Tag: 6.7.0.beta1~5184 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f762a82549f2fd7fdab08444f4fc93f6ddfea564;p=vaadin-framework.git Made it easier to find the "editable grid" (table in editmode) svn changeset:3321/svn branch:trunk --- 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");