/*
 *  2004 - 2011 Frantisek Zboril jr.
 *  Faculty of Information Technology
 *  zborilf@fit.vutbr.cz
 *  http://www.fit.vutbr.cz/~zborilf
 *
 * (C) Brno University of Technology
 * Freeware licence VUT v Brně
 * https://wis.fit.vutbr.cz/FIT/db/dir.php/dr/VZ2007/externiInformace/softwareNaWebu/Priloha2_rozh23.pdf

 */

package jTMass;

import jTGUI.TBackgroundFrame;

public class TTerminal {

	private TBackgroundFrame PFrame;
	public static final int _CompilerMessage=0;
	public static final int _InterpreterMessage=1;
	public static final int _SystemMessage=1;
	public static final int _DebugMessage=0;
	private static int errorNumber=1;

        // ===== Terminal Services =====

	public void reportError(String message){
		PFrame.printlnToTextArea("Error no. "+errorNumber+" :"+message);
		errorNumber++;
	}
	
	public void printDebug(int messageType, String message){
		if(messageType==1) 
			PFrame.printToTextArea(message);			
	}
	
	public void printlnDebug(int messageType, String message){
		if(messageType==1) 
			PFrame.printlnToTextArea(message);
	}
	
	public void printDebug(String message){
		printlnDebug(_DebugMessage,message);
	}
	
	public void printlnDebug(String message){
		printlnDebug(_DebugMessage,message+"\n");
	}
	
	public void printSystemInfo(String message){
		PFrame.printToTextArea(message);
	}
	
	public void printlnSystemInfo(String message){
		PFrame.printlnToTextArea(message);
	}
	
	public TTerminal(TBackgroundFrame frame){
		PFrame=frame;
	}
}

