
package polarDust.calculator;

/*
 * Copyright (c) 1996 Sorin Lazareanu, All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for NON-COMMERCIAL purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies.
 *
 */

import java.awt.*;

/**
 * PrinterPanel01 is a holder for a Printer01 object.
 *
 * <br><br><a href=../source/polarDust/calculator/PrinterPanel01.java>
 * The source code.</a>
 *
 * @version 0.9, 1996.06.04
 * @author Sorin Lazareanu
 */

public class PrinterPanel01
	extends Panel
	implements CalcConstants {
	Printer01 printer;

	/**
	* Creates a new instance of a PrinterPanel01 object.
	*/
	public PrinterPanel01() {
		super();

		printer = new Printer01();
		configure();
	}

	/**
	* Configure the panel's layout.
	*/ 
	public void configure() {
		GridBagLayout gridBag = new GridBagLayout();
		GridBagConstraints c = new GridBagConstraints();
		GridBagLayoutHelper aHelper;

		setLayout(gridBag);
		setFont(new Font(COURIER, Font.BOLD, 14));
		c.fill = GridBagConstraints.BOTH;
		c.anchor = GridBagConstraints.CENTER;
		c.insets = new Insets(2, 2, 2, 2);
		aHelper = new GridBagLayoutHelper(this, gridBag, c, 1, 1);

		aHelper.addComponent(0, 0, 1, 1, printer);
	}

	/**
	* @see Printer01#showResult
	*/
	void showResult(String aResult) {
		printer.showResult(aResult);
	}

	/**
	* @see Printer01#showOp
	*/
	void showOp(String anOperator) {
		printer.showOp(anOperator);
	}

}


