/* Auteur: Nicolas JANEY          */
/* nicolas.janey@univ-fcomte.fr   */
/* Fevrier 2005                   */

import java.io.*;
import java.awt.*;
import java.awt.event.*;

public class ConsolePrinter {
  public FrameConsole fc;

  public ConsolePrinter(FrameConsole fc) {
    this.fc = fc;
    if ( !fc.open )
      fc.ouvre();
  }

  public void printSurConsole(String s) {
    Console.setKeyListeners();
    fc.print(s);
  }

  public void print(String s) {
    printSurConsole(s);
  }

  public void print(Object o) {
    print(o.toString());
  }

  public void println(String s) {
    print(s+"\n");
  }

  public void println() {
    print("\n");
  }

  public void println(Object o) {
    println(o.toString());
  }

  public void print(int i) {
    print(i+"");
  }

  public void println(int i) {
    print(i+"\n");
  }

  public void print(short i) {
    print(i+"");
  }

  public void println(short i) {
    print(i+"\n");
  }

  public void print(long i) {
    print(i+"");
  }

  public void println(long i) {
    print(i+"\n");
  }

  public void print(float i) {
    print(i+"");
  }

  public void println(float i) {
    print(i+"\n");
  }

  public void print(double i) {
    print(i+"");
  }

  public void println(double i) {
    print(i+"\n");
  }

  public void print(char i) {
    print(i+"");
  }

  public void println(char i) {
    print(i+"\n");
  }

  public void print(byte i) {
    print(i+"");
  }

  public void println(byte i) {
    print(i+"\n");
  }

  public void print(boolean i) {
    print(i+"");
  }

  public void println(boolean i) {
    print(i+"\n");
  }
	
	public void format(String sf,Object... s) {
    print(String.format(sf,s));
    }
}