* the caption of the window
*/
public LegacyWindow(String caption) {
- super(caption);
+ super();
+ setCaption(caption);
}
/**
* @param content
*/
public LegacyWindow(String caption, ComponentContainer content) {
- super(caption, content);
+ super(content);
+ setCaption(caption);
}
@Override
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();
@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");
}