aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Laakso <jani.laakso@itmill.com>2007-03-10 07:34:23 +0000
committerJani Laakso <jani.laakso@itmill.com>2007-03-10 07:34:23 +0000
commitbe376e9d33384042daa4192712563eae603de6c2 (patch)
tree23924bdb2e4d742a45d6fe3e4321fd2457b5592c
parent6fcece6172951b8cd20433f81ea1981c505ed0c7 (diff)
downloadvaadin-framework-be376e9d33384042daa4192712563eae603de6c2.tar.gz
vaadin-framework-be376e9d33384042daa4192712563eae603de6c2.zip
Fixed 391 (Featurebrowser: Move propertytable to tabsheet).
svn changeset:841/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/demo/features/Feature.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/PropertyPanel.java21
2 files changed, 11 insertions, 15 deletions
diff --git a/src/com/itmill/toolkit/demo/features/Feature.java b/src/com/itmill/toolkit/demo/features/Feature.java
index 235ca6366e..dd4cfeae79 100644
--- a/src/com/itmill/toolkit/demo/features/Feature.java
+++ b/src/com/itmill/toolkit/demo/features/Feature.java
@@ -117,6 +117,9 @@ public abstract class Feature extends CustomComponent {
ts.addTab(mainLayout, "Description", null);
}
+
+ // Properties table tab
+ ts.addTab(getPropertyPanel().getAllProperties(), "Properties", null);
// Javadoc tab
if (!javadoc.getValue().equals(""))
@@ -134,7 +137,7 @@ public abstract class Feature extends CustomComponent {
Label.CONTENT_PREFORMATTED));
ts.addTab(l, "Code Sample", null);
}
-
+
layout.addComponent(ts);
}
diff --git a/src/com/itmill/toolkit/demo/features/PropertyPanel.java b/src/com/itmill/toolkit/demo/features/PropertyPanel.java
index e59f838f5d..759d30de0e 100644
--- a/src/com/itmill/toolkit/demo/features/PropertyPanel.java
+++ b/src/com/itmill/toolkit/demo/features/PropertyPanel.java
@@ -55,10 +55,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
private Button setButton = new Button("Set", this);
private Button discardButton = new Button("Discard changes", this);
-
- private Button showAllProperties = new Button("List of All Properties",
- this);
-
+
private Table allProperties = new Table();
private Object objectToConfigure;
@@ -79,7 +76,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
// Control buttons
OrderedLayout buttons = new OrderedLayout(
- OrderedLayout.ORIENTATION_VERTICAL);
+ OrderedLayout.ORIENTATION_HORIZONTAL);
buttons.addComponent(setButton);
buttons.addComponent(discardButton);
addComponent(buttons);
@@ -96,9 +93,6 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
addComponentContainerProperties();
// The list of all properties
- addComponent(showAllProperties);
- showAllProperties.setSwitchMode(true);
- allProperties.setVisible(false);
allProperties.addContainerProperty("Name", String.class, "");
allProperties.addContainerProperty("Type", String.class, "");
allProperties.addContainerProperty("R/W", String.class, "");
@@ -106,8 +100,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
allProperties.setColumnAlignments(new String[] { Table.ALIGN_LEFT,
Table.ALIGN_LEFT, Table.ALIGN_CENTER, Table.ALIGN_CENTER });
allProperties.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_ID);
+ allProperties.setPageLength(0);
updatePropertyList();
- addComponent(allProperties);
}
/** Add a formful of properties to property panel */
@@ -146,11 +140,6 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
((Form) i.next()).discard();
}
- // Show property list
- if (event.getButton() == showAllProperties) {
- allProperties.setVisible(((Boolean) showAllProperties.getValue())
- .booleanValue());
- }
}
/** Recreate property list contents */
@@ -464,4 +453,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
}
return null;
}
+
+ public Table getAllProperties() {
+ return allProperties;
+ }
}