A container acting as a dialog or window.
Functionality
A Window is a {@link Table} that can be moved around by touching and dragging its titlebar.It can housemultiple {@link Actor} instances in a table-layout. The difference to a pure Container is that the Window will automaticallyset the padding of the layout to respect the width and height of the border patches of its background NinePatch. See {@link Table} for more information on how Actor instances are laid out when using this class.A Window can also be set to be modal via a call to {@link #setModal(boolean)}, in which case all touch input will go to that window no matter where the user touched the screen.
Layout
The (preferred) width and height are determined by the values given in the constructor of this class. Please consult the {@link Table} documentation on how the width and height will be manipulated if the Window is contained in anotherContainer, a not so common use case. Additionally you can set the (preferred) width and height via a call to {@link TableLayout#size(int,int)}.
Style
A Window is a {@link Table} displaying a background {@link NinePatch} and its child Actors, clipped to theWindow's area, taking into account the padding as described in the functionality section. Additionally the window will render a title string in its top border patches. The style is defined via an instance of {@link WindowStyle}, which can be either done programmatically or via a {@link Skin}. A Pane's style definition in a skin XML file should look like this:
{@code }
- The
name
attribute defines the name of the style which you can later use with {@link Skin#newWindow(String,Stage,String,int,int,String)}. - The
titleFont
attribute references a {@link BitmapFont} by name, to be used to render the title string. * - The
titleFontColor
attribute references a {@link Color} by name, to be used to render the title string. - The
background
attribute references a {@link NinePatch} by name, to be used as the Window's background.
@author mzechner