};
/**
- * Creates a new empty panel. A VerticalLayout is used as content.
+ * Creates a new empty panel.
*/
public Panel() {
this((ComponentContainer) null);
}
/**
- * Creates a new empty panel which contains the given content. The content
- * cannot be null.
+ * Creates a new empty panel which contains the given content.
*
* @param content
* the content for the panel.
*/
- public Panel(ComponentContainer content) {
+ public Panel(Component content) {
registerRpc(rpc);
setContent(content);
setWidth(100, Unit.PERCENTAGE);
}
/**
- * Creates a new empty panel with caption. Default layout is used.
+ * Creates a new empty panel with caption.
*
* @param caption
* the caption used in the panel (HTML).
* @param content
* the content used in the panel.
*/
- public Panel(String caption, ComponentContainer content) {
+ public Panel(String caption, Component content) {
this(content);
setCaption(caption);
}
* {@link UI}. A window is added to a {@code UI} using
* {@link UI#addWindow(Window)}. </p>
* <p>
- * The contents of a window is set using {@link #setContent(ComponentContainer)}
- * or by using the {@link #Window(String, ComponentContainer)} constructor. The
- * contents can in turn contain other components. By default, a
- * {@link VerticalLayout} is used as content.
+ * The contents of a window is set using {@link #setContent(Component)} or by
+ * using the {@link #Window(String, Component)} constructor.
* </p>
* <p>
* A window can be positioned on the screen using absolute coordinates (pixels)
};
/**
- * Creates a new unnamed window with a default layout.
+ * Creates a new, empty sub window
*/
public Window() {
this("", null);
}
/**
- * Creates a new unnamed window with a default layout and given title.
+ * Creates a new, empty sub window with a given title.
*
* @param caption
* the title of the window.
}
/**
- * Creates a new unnamed window with the given content and title.
+ * Creates a new, empty sub window with the given content and title.
*
* @param caption
* the title of the window.
* @param content
* the contents of the window
*/
- public Window(String caption, ComponentContainer content) {
+ public Window(String caption, Component content) {
super(caption, content);
registerRpc(rpc);
setSizeUndefined();