@Override
public Component getPreview ( final WebLookAndFeelDemo owner )
{
final WebPanel container = new WebPanel ( new TexturePainter ( loadIcon ( "bg1.png" ) ) );
final WebPanel panel = new WebPanel ( new ToolbarLayout ( 0, 0, ToolbarLayout.VERTICAL ) );
panel.setPainter ( new ShadeBackgroundPainter ( ImageUtils.getBufferedImage ( loadIcon ( "bg2.png" ) ) ) );
container.add ( panel );
final WebLabel titleLabel = new WebLabel ( "Custom-styled label" )
{
@Override
protected void paintComponent ( final Graphics g )
{
super.paintComponent ( g );
DebugUtils.paintBorderDebugInfo ( g, this );
}
};
titleLabel.setBoldFont ();
titleLabel.setForeground ( Color.WHITE );
titleLabel.setHorizontalAlignment ( SwingConstants.CENTER );
panel.add ( titleLabel, ToolbarLayout.START );
final WebPanel innerPanel = new WebPanel ( new VerticalFlowLayout ( 15, 15 ) )
{
@Override
protected void paintComponent ( final Graphics g )
{
super.paintComponent ( g );
DebugUtils.paintBorderDebugInfo ( g, this );
}
};
innerPanel.setPainter ( new ShadeBackgroundPainter ( null ) );
panel.add ( innerPanel, ToolbarLayout.END );
innerPanel.add ( new WebLabel ( "Card", loadIcon ( "type1.png" ) ) );
innerPanel.add ( new WebLabel ( "Document", loadIcon ( "type2.png" ) ) );
innerPanel.add ( new WebLabel ( "Folder", loadIcon ( "type3.png" ) ) );
final WebPanel ppp = new WebPanel ( new ToolbarLayout ( 0, 0, ToolbarLayout.VERTICAL ) );
ppp.setPainter ( new ShadeBackgroundPainter ( null ) );
ppp.setShadeWidth ( 20 );
ppp.add ( new WebLabel ( "123" ) );
ppp.add ( new WebLabel ( "345" )
{