// (c) MIT 2003.  All rights reserved.

// -*-Mode: Java -*- 
// TinyBrowserTest.java -- 
// Author: mark a. foltz <mfoltz@ai.mit.edu>
// Maintainer: mark a. foltz <mfoltz@ai.mit.edu>
// Copyright: Copyright (C) 2000 by mark a. foltz
// Created: <Thu Jan  6 08:57:14 2000> 
// Keywords: 

/**
 * 
 * @author mark a. foltz <mfoltz@ai.mit.edu>
 * @version $Id: TinyBrowserTest.java,v 1.2 2003/03/06 00:40:41 moltmans Exp $
 * */

package rec.tinybrowser;

import java.awt.*;

public class TinyBrowserTest {

  public static final void main(String args[]) {

    Frame f = new Frame("TinyBrowserTest");

    TinyBrowserPane pane = new TinyBrowserPane(200,200);
    
    f.setSize(200,200);
    f.add(pane);

    
    Content c = new Content();

    c.addText("The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.");

    c.addParagraph();

    c.setFont(new Font("SERIF",Font.BOLD,14));

    c.addLink(new Hyperlink("This is a hyperlink\n","Bongo","Ron Jeremy"));

    c.setColor(Color.blue);

    c.addText("vive la france");

    c.addParagraph();

    c.setFont(new Font("HELVETICA",Font.ITALIC,12));
    c.setColor(Color.red);
    c.setAlignment(Content.ALIGN_CENTER_OBJ);
    c.addText("The GraphicsEnvironment class describes the collection of GraphicsDevice objects and Font objects available to a Java(tm) application on a particular platform. The resources in this GraphicsEnvironment might be local or on a remote machine. GraphicsDevice objects can be screens, printers or image buffers and are the destination of Graphics2D drawing methods.  Each GraphicsDevice has a number of GraphicsConfiguration objects associated with it.  These objects specify the different configurations in which the GraphicsDevice can be used.");

    pane.display(c);

    f.show();

    String[] fonts = f.getToolkit().getFontList();
    for (int i = 0; i < fonts.length; i++) System.out.println("font: "+fonts[i]);
  }

}
    
