/* * BLabelDemo class */ /* * Copyright (C) 2004 by Francois Guillet * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. */ import java.awt.*; import buoy.event.*; import buoy.widget.*; import javax.swing.ImageIcon; /** * BLabel demo * *@author François Guillet *@created 2004/05/28 */ public class BLabelDemo extends BFrame { /** * Constructor for the BLabelDemo object */ public BLabelDemo() { super( "BLabelDemo" ); BorderContainer bc = new BorderContainer(); FormContainer fc = new FormContainer( 3, 3 ); ImageIcon icon = new ImageIcon( "icon.png" ); fc.add( new BLabel( "North", icon, BLabel.CENTER, BLabel.NORTH ), 1, 0, new LayoutInfo( LayoutInfo.SOUTH, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "East", icon, BLabel.CENTER, BLabel.EAST ), 2, 1, new LayoutInfo( LayoutInfo.WEST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "West", icon, BLabel.CENTER, BLabel.WEST ), 0, 1, new LayoutInfo( LayoutInfo.EAST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "South", icon, BLabel.CENTER, BLabel.SOUTH ), 1, 2, new LayoutInfo( LayoutInfo.NORTH, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "Center", icon, BLabel.CENTER, BLabel.CENTER ), 1, 1, new LayoutInfo( LayoutInfo.CENTER, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "NorthEast", icon, BLabel.CENTER, BLabel.NORTHEAST ), 2, 0, new LayoutInfo( LayoutInfo.SOUTHWEST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "NorthWest", icon, BLabel.CENTER, BLabel.NORTHWEST ), 0, 0, new LayoutInfo( LayoutInfo.SOUTHEAST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "SouthEast", icon, BLabel.CENTER, BLabel.SOUTHEAST ), 2, 2, new LayoutInfo( LayoutInfo.NORTHWEST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); fc.add( new BLabel( "SouthWest", icon, BLabel.CENTER, BLabel.SOUTHWEST ), 0, 2, new LayoutInfo( LayoutInfo.NORTHEAST, LayoutInfo.NONE, new Insets( 0, 0, 0, 0 ), null ) ); bc.add( fc, BorderContainer.WEST ); String htmlCode = "
Some piece of text " + " | " + " | |
" + " | etc... | |
"
+ ""
+ "Another piece of text (courrier bold) " + " |