@Override
public Component getPreview ( final WebLookAndFeelDemo owner )
{
final WebLabel title = new WebLabel ( "You can drag, close and split tabs in this document pane", loadIcon ( "info.png" ) );
final WebDocumentPane pane = new WebDocumentPane ();
pane.setUndecorated ( false );
addDocuments ( pane );
final WebButton add = new WebButton ( loadIcon ( "add.png" ), new ActionListener ()
{
@Override
public void actionPerformed ( final ActionEvent e )
{
addDocuments ( pane );
}
} );
final WebButton clear = new WebButton ( loadIcon ( "clear.png" ), new ActionListener ()
{
@Override
public void actionPerformed ( final ActionEvent e )
{
pane.closeAll ();
}
} );
final WebButton restore = new WebButton ( loadIcon ( "restore.png" ), new ActionListener ()
{
@Override
public void actionPerformed ( final ActionEvent e )
{
pane.closeAll ();
addDocuments ( pane );
}
} );
final GroupPanel titlePanel = new GroupPanel ( GroupingType.fillFirst, 5, title, add, clear, restore );