summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-10-12 13:06:32 +0300
committerLeif Åstrand <leif@vaadin.com>2012-10-12 13:06:32 +0300
commitf5166895cb4b1b5c5bc983bba9a1ab218b0cd82c (patch)
tree20fb1b32bf60a36685328bc9e85d221fe3150445 /server
parent2b0d4893c803c38159462cb4f815dcf33feed1d0 (diff)
downloadvaadin-framework-f5166895cb4b1b5c5bc983bba9a1ab218b0cd82c.tar.gz
vaadin-framework-f5166895cb4b1b5c5bc983bba9a1ab218b0cd82c.zip
Remove invalid constructors and fix setCaption exception (#9947)
Change-Id: I2d2a73ab4e421b873e401a1d05b81d968fd907a2
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/UI.java40
1 files changed, 5 insertions, 35 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 1ac4a6cba0..31a7446e96 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -114,7 +114,8 @@ public abstract class UI extends AbstractComponentContainer implements
* the caption of the window
*/
public LegacyWindow(String caption) {
- super(caption);
+ super();
+ setCaption(caption);
}
/**
@@ -124,7 +125,8 @@ public abstract class UI extends AbstractComponentContainer implements
* @param content
*/
public LegacyWindow(String caption, ComponentContainer content) {
- super(caption, content);
+ super(content);
+ setCaption(caption);
}
@Override
@@ -530,38 +532,6 @@ public abstract class UI extends AbstractComponentContainer implements
setContent(content);
}
- /**
- * Creates a new empty UI with the given caption. This UI will have a
- * {@link VerticalLayout} with margins enabled as its content.
- *
- * @param caption
- * the caption of the UI, used as the page title if there's
- * nothing but the application on the web page
- *
- * @see #setCaption(String)
- */
- public UI(String caption) {
- this((ComponentContainer) null);
- setCaption(caption);
- }
-
- /**
- * Creates a new UI with the given caption and content.
- *
- * @param caption
- * the caption of the UI, used as the page title if there's
- * nothing but the application on the web page
- * @param content
- * the content container to use as this UIs content.
- *
- * @see #setContent(ComponentContainer)
- * @see #setCaption(String)
- */
- public UI(String caption, ComponentContainer content) {
- this(content);
- setCaption(caption);
- }
-
@Override
protected UIState getState() {
return (UIState) super.getState();
@@ -1219,7 +1189,7 @@ public abstract class UI extends AbstractComponentContainer implements
@Override
@Deprecated
public void setCaption(String caption) {
- throw new IllegalStateException(
+ throw new UnsupportedOperationException(
"You can not set the title of a UI. To set the title of the HTML page, use Page.setTitle");
}