summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/ui/Accordion.java18
-rw-r--r--server/src/com/vaadin/ui/HorizontalSplitPanel.java18
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java14
-rw-r--r--server/src/com/vaadin/ui/VerticalSplitPanel.java14
4 files changed, 63 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Accordion.java b/server/src/com/vaadin/ui/Accordion.java
index c31bfe8840..c6683faa15 100644
--- a/server/src/com/vaadin/ui/Accordion.java
+++ b/server/src/com/vaadin/ui/Accordion.java
@@ -27,5 +27,23 @@ package com.vaadin.ui;
* @see TabSheet
*/
public class Accordion extends TabSheet {
+ /**
+ * Creates an empty accordion.
+ */
+ public Accordion() {
+ super();
+ }
+
+ /**
+ * Constructs a new accordion containing the given components.
+ *
+ * @param components
+ * The components to add to the accordion. Each component will be
+ * added to a separate tab.
+ */
+ public Accordion(Component... components) {
+ this();
+ addComponents(components);
+ }
}
diff --git a/server/src/com/vaadin/ui/HorizontalSplitPanel.java b/server/src/com/vaadin/ui/HorizontalSplitPanel.java
index 017234d62d..1e5ae83d72 100644
--- a/server/src/com/vaadin/ui/HorizontalSplitPanel.java
+++ b/server/src/com/vaadin/ui/HorizontalSplitPanel.java
@@ -37,8 +37,26 @@ package com.vaadin.ui;
* @since 6.5
*/
public class HorizontalSplitPanel extends AbstractSplitPanel {
+ /**
+ * Creates an empty horizontal split panel
+ */
public HorizontalSplitPanel() {
super();
setSizeFull();
}
+
+ /**
+ * Creates a horizontal split panel containing the given components
+ *
+ * @param firstComponent
+ * The component to be placed to the left of the splitter
+ * @param secondComponent
+ * The component to be placed to the right of the splitter
+ */
+ public HorizontalSplitPanel(Component firstComponent,
+ Component secondComponent) {
+ this();
+ setFirstComponent(firstComponent);
+ setSecondComponent(secondComponent);
+ }
}
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 995db5092e..5553bf64f8 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -108,7 +108,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
private int tabIndex;
/**
- * Constructs a new Tabsheet. Tabsheet is immediate by default, and the
+ * Constructs a new TabSheet. A TabSheet is immediate by default, and the
* default close handler removes the tab being closed.
*/
public TabSheet() {
@@ -126,6 +126,18 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
}
/**
+ * Constructs a new TabSheet containing the given components.
+ *
+ * @param components
+ * The components to add to the tab sheet. Each component will be
+ * added to a separate tab.
+ */
+ public TabSheet(Component... components) {
+ this();
+ addComponents(components);
+ }
+
+ /**
* Gets the component container iterator for going through all the
* components (tab contents).
*
diff --git a/server/src/com/vaadin/ui/VerticalSplitPanel.java b/server/src/com/vaadin/ui/VerticalSplitPanel.java
index 813401c4a0..1378e466d8 100644
--- a/server/src/com/vaadin/ui/VerticalSplitPanel.java
+++ b/server/src/com/vaadin/ui/VerticalSplitPanel.java
@@ -39,4 +39,18 @@ public class VerticalSplitPanel extends AbstractSplitPanel {
setSizeFull();
}
+ /**
+ * Creates a horizontal split panel containing the given components
+ *
+ * @param firstComponent
+ * The component to be placed above the splitter
+ * @param secondComponent
+ * The component to be placed below of the splitter
+ */
+ public VerticalSplitPanel(Component firstComponent,
+ Component secondComponent) {
+ this();
+ setFirstComponent(firstComponent);
+ setSecondComponent(secondComponent);
+ }
}