summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJani Laakso <jani.laakso@itmill.com>2007-02-05 13:39:43 +0000
committerJani Laakso <jani.laakso@itmill.com>2007-02-05 13:39:43 +0000
commit08d20d97d3e5588cf5959d7d14d857f390b3ec35 (patch)
tree6da3266543f692021aa691c6a6a57ff0d8764b52 /src
parentf01ef1ce95b21a12d93bfe83098729c47d68d186 (diff)
downloadvaadin-framework-08d20d97d3e5588cf5959d7d14d857f390b3ec35.tar.gz
vaadin-framework-08d20d97d3e5588cf5959d7d14d857f390b3ec35.zip
Removed "root" panel from Feature Components.
Disabled "FrameWindow", not targeted for first public release (now). svn changeset:470/svn branch:toolkit
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/demo/features/Feature.java4
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureBrowser.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureButton.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java1
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureDateField.java4
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureForm.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java9
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureGridLayout.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureLabel.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureLink.java7
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureSelect.java5
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTabSheet.java7
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTextField.java4
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureTree.java7
-rw-r--r--src/com/itmill/toolkit/demo/features/FeatureWindow.java9
16 files changed, 24 insertions, 63 deletions
diff --git a/src/com/itmill/toolkit/demo/features/Feature.java b/src/com/itmill/toolkit/demo/features/Feature.java
index 6e4ae5d94a..e7d9083f12 100644
--- a/src/com/itmill/toolkit/demo/features/Feature.java
+++ b/src/com/itmill/toolkit/demo/features/Feature.java
@@ -32,7 +32,7 @@ import com.itmill.toolkit.terminal.ClassResource;
import com.itmill.toolkit.terminal.Resource;
import com.itmill.toolkit.ui.*;
-public class Feature extends CustomComponent {
+public abstract class Feature extends CustomComponent {
private OrderedLayout layout;
@@ -57,7 +57,7 @@ public class Feature extends CustomComponent {
public void attach() {
super.attach();
-
+
// Check if the feature is already initialized
if (initialized)
return;
diff --git a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
index 081f766225..22be444ade 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureBrowser.java
@@ -143,8 +143,9 @@ public class FeatureBrowser extends CustomComponent implements
registerFeature("/UI Components/Layouts/Tab Sheet",
new FeatureTabSheet());
registerFeature("/UI Components/Layouts/Window", new FeatureWindow());
- registerFeature("/UI Components/Layouts/Frame Window",
- new FeatureFrameWindow());
+ // Disabled for now
+// registerFeature("/UI Components/Layouts/Frame Window",
+// new FeatureFrameWindow());
registerFeature("/UI Components/Data handling/Embedded Objects",
new FeatureEmbedded());
registerFeature("/UI Components/Data handling/Upload",
diff --git a/src/com/itmill/toolkit/demo/features/FeatureButton.java b/src/com/itmill/toolkit/demo/features/FeatureButton.java
index 7b7514af1a..8a9e54ff61 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureButton.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureButton.java
@@ -40,11 +40,8 @@ public class FeatureButton extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("Button component");
Button b = new Button("Caption");
- show.addComponent(b);
- l.addComponent(show);
+ l.addComponent(b);
// Properties
propertyPanel = new PropertyPanel(b);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java b/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
index 4e182e2577..a53979c9a0 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureCustomLayout.java
@@ -68,6 +68,7 @@ public class FeatureCustomLayout extends Feature {
protected Component getDemoComponent() {
OrderedLayout l = new OrderedLayout();
+ // TODO doc change
l
.addComponent(new Label(
"<p>For demonstration, see GO-Game example application. All of the "
diff --git a/src/com/itmill/toolkit/demo/features/FeatureDateField.java b/src/com/itmill/toolkit/demo/features/FeatureDateField.java
index 234adfed13..d412fbe180 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureDateField.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureDateField.java
@@ -55,11 +55,9 @@ public class FeatureDateField extends Feature {
OrderedLayout l = new OrderedLayout();
// Example panel
- Panel show = new Panel("DateField component");
DateField df = new DateField();
df.setValue(new java.util.Date());
- show.addComponent(df);
- l.addComponent(show);
+ l.addComponent(df);
// Create locale selector
// TODO: see #244 (broken for AJAX mode), known issue exists
diff --git a/src/com/itmill/toolkit/demo/features/FeatureForm.java b/src/com/itmill/toolkit/demo/features/FeatureForm.java
index d02f9a7c73..ab3af0db55 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureForm.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureForm.java
@@ -61,13 +61,12 @@ public class FeatureForm extends Feature implements
demo.removeAllComponents();
// Test form
- Panel testPanel = new Panel("Form component");
if (formLayout == null)
test = new Form();
else
test = new Form(formLayout);
- testPanel.addComponent(test);
- demo.addComponent(testPanel);
+
+ demo.addComponent(test);
OrderedLayout actions = new OrderedLayout(
OrderedLayout.ORIENTATION_HORIZONTAL);
demo.addComponent(actions);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java b/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
index 2e68ae38f2..493ae4ecc8 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureFrameWindow.java
@@ -53,14 +53,9 @@ public class FeatureFrameWindow extends Feature implements Button.ClickListener
demoWindow.getFrameset()
.newFrame(createFrame(demoWindow.getFrameset()));
- // Example panel
- Panel show = new Panel("Test Window Control");
- ((OrderedLayout) show.getLayout())
- .setOrientation(OrderedLayout.ORIENTATION_HORIZONTAL);
- show.addComponent(addButton);
- show.addComponent(removeButton);
+ l.addComponent(addButton);
+ l.addComponent(removeButton);
updateWinStatus();
- l.addComponent(show);
// Properties
propertyPanel = new PropertyPanel(demoWindow);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java b/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
index db40c9e7bf..46f12821fa 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureGridLayout.java
@@ -42,16 +42,13 @@ public class FeatureGridLayout extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("GridLayout component");
GridLayout gl = new GridLayout(3, 3);
DateField cal = new DateField("Test component 1", new Date());
cal.setStyle("calendar");
gl.addComponent(cal, 1, 0, 2, 1);
for (int i = 2; i < 7; i++)
gl.addComponent(new TextField("Test component " + i));
- show.addComponent(gl);
- l.addComponent(show);
+ l.addComponent(gl);
// Properties
propertyPanel = new PropertyPanel(gl);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureLabel.java b/src/com/itmill/toolkit/demo/features/FeatureLabel.java
index 9fb75080ba..829318b57d 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureLabel.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureLabel.java
@@ -40,11 +40,8 @@ public class FeatureLabel extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("Label component");
Label lab = new Label("Label text");
- show.addComponent(lab);
- l.addComponent(show);
+ l.addComponent(lab);
// Properties
propertyPanel = new PropertyPanel(lab);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureLink.java b/src/com/itmill/toolkit/demo/features/FeatureLink.java
index a0fc52de32..bdcd9a40e6 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureLink.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureLink.java
@@ -40,13 +40,10 @@ public class FeatureLink extends Feature {
protected Component getDemoComponent() {
OrderedLayout l = new OrderedLayout();
-
- // Example panel
- Panel show = new Panel("Link component");
+
Link lnk = new Link("Link caption", new ExternalResource(
"http://www.itmill.com"));
- show.addComponent(lnk);
- l.addComponent(show);
+ l.addComponent(lnk);
// Properties
propertyPanel = new PropertyPanel(lnk);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java b/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
index cef6ea87d8..064bdaefee 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureOrderedLayout.java
@@ -40,13 +40,10 @@ public class FeatureOrderedLayout extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("OrderedLayout component");
OrderedLayout ol = new OrderedLayout();
for (int i = 1; i < 5; i++)
ol.addComponent(new TextField("Test component " + i));
- show.addComponent(ol);
- l.addComponent(show);
+ l.addComponent(ol);
// Properties
propertyPanel = new PropertyPanel(ol);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureSelect.java b/src/com/itmill/toolkit/demo/features/FeatureSelect.java
index 68d2aa8839..171abd1723 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureSelect.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureSelect.java
@@ -50,16 +50,13 @@ public class FeatureSelect extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("Select component");
Select s = new Select("Select Person");
for (int i = 0; i < 1000; i++)
s
.addItem(firstnames[(int) (Math.random() * (firstnames.length - 1))]
+ " "
+ lastnames[(int) (Math.random() * (lastnames.length - 1))]);
- show.addComponent(s);
- l.addComponent(show);
+ l.addComponent(s);
// Properties
propertyPanel = new PropertyPanel(s);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java b/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
index e5b76152a7..9cc5419ce8 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTabSheet.java
@@ -40,16 +40,11 @@ public class FeatureTabSheet extends Feature {
OrderedLayout l = new OrderedLayout();
- // Example panel
- Panel show = new Panel("TabSheet component");
-
TabSheet ts = new TabSheet();
ts.addTab(new Label("Tab 1 Body"), "Tab 1 caption", null);
ts.addTab(new Label("Tab 2 Body"), "Tab 2 caption", null);
ts.addTab(new Label("Tab 3 Body"), "Tab 3 caption", null);
-
- show.addComponent(ts);
- l.addComponent(show);
+ l.addComponent(ts);
// Properties
propertyPanel = new PropertyPanel(ts);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTextField.java b/src/com/itmill/toolkit/demo/features/FeatureTextField.java
index a92b155a62..4e8ded17b5 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTextField.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTextField.java
@@ -43,9 +43,7 @@ public class FeatureTextField extends Feature {
// Test component
TextField tf = new TextField("Caption");
- Panel test = new Panel("TextField Component Demo");
- test.addComponent(tf);
- l.addComponent(test);
+ l.addComponent(tf);
// Properties
propertyPanel = new PropertyPanel(tf);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureTree.java b/src/com/itmill/toolkit/demo/features/FeatureTree.java
index 4269b45a1d..8dff405a4b 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureTree.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureTree.java
@@ -81,8 +81,6 @@ public class FeatureTree extends Feature implements Action.Handler {
OrderedLayout l = new OrderedLayout();
- // Create names
- Panel show = new Panel("Tree component");
String[] names = new String[100];
for (int i = 0; i < names.length; i++)
names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))]
@@ -102,9 +100,8 @@ public class FeatureTree extends Feature implements Action.Handler {
for (int i = 0; i < 100; i++)
if (!t.hasChildren(names[i]))
t.setChildrenAllowed(names[i], false);
-
- show.addComponent(t);
- l.addComponent(show);
+
+ l.addComponent(t);
// Actions
l.addComponent(this.actionHandlerSwitch);
diff --git a/src/com/itmill/toolkit/demo/features/FeatureWindow.java b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
index d06e099b0b..a7e2e22381 100644
--- a/src/com/itmill/toolkit/demo/features/FeatureWindow.java
+++ b/src/com/itmill/toolkit/demo/features/FeatureWindow.java
@@ -48,14 +48,9 @@ public class FeatureWindow extends Feature {
OrderedLayout l = new OrderedLayout();
demoWindow = new Window("Feature Test Window");
- // Example panel
- Panel show = new Panel("Test Window Control");
- ((OrderedLayout) show.getLayout())
- .setOrientation(OrderedLayout.ORIENTATION_HORIZONTAL);
- show.addComponent(addButton);
- show.addComponent(removeButton);
+ l.addComponent(addButton);
+ l.addComponent(removeButton);
updateWinStatus();
- l.addComponent(show);
// Properties
propertyPanel = new PropertyPanel(demoWindow);