/*
 *  LayoutInfoDemo4 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.Insets;
import buoy.event.*;
import buoy.widget.*;


/**
 *  LayoutInfo demo 4
 *
 *@author     François Guillet
 *@created    2004/05/28
 */
public class LayoutInfoDemo4
         extends BFrame
{

    /**
     *  Constructor for the BButtonDemo object
     */
    public LayoutInfoDemo4()
    {
        super( "LayoutInfoDemo4" );

        GridContainer gc = new GridContainer( 3, 3 );

        gc.add( new BButton( "North" ), 1, 0,
                new LayoutInfo( LayoutInfo.NORTH, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "East" ), 2, 1,
                new LayoutInfo( LayoutInfo.EAST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "West" ), 0, 1,
                new LayoutInfo( LayoutInfo.WEST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "South" ), 1, 2,
                new LayoutInfo( LayoutInfo.SOUTH, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );

        gc.add( new BButton( "Center" ), 1, 1,
                new LayoutInfo( LayoutInfo.CENTER, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );

        gc.add( new BButton( "NorthEast" ), 2, 0,
                new LayoutInfo( LayoutInfo.NORTHEAST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "NorthWest" ), 0, 0,
                new LayoutInfo( LayoutInfo.NORTHWEST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "SouthEast" ), 2, 2,
                new LayoutInfo( LayoutInfo.SOUTHEAST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );
        gc.add( new BButton( "SouthWest" ), 0, 2,
                new LayoutInfo( LayoutInfo.SOUTHWEST, LayoutInfo.BOTH, new Insets( 3, 3, 3, 3 ), null ) );

        setContent( gc );

        addEventLink( WindowClosingEvent.class, this, "doQuit" );

        pack();
        setVisible( true );

    }


    /**
     *  Quit
     */
    private void doQuit()
    {
        System.exit( 0 );
    }


    /**
     *  Main
     *
     *@param  args  The command line arguments
     */
    public static void main( String[] args )
    {
        new LayoutInfoDemo4();
    }
}


