jcontrol.comm
Class DisplayConsole

java.lang.Object
  extended byjcontrol.comm.DisplayConsole
All Implemented Interfaces:
jcontrol.io.BasicOutputStream, jcontrol.comm.ConsoleOutputStream

public class DisplayConsole
extends java.lang.Object
implements jcontrol.comm.ConsoleOutputStream

Implements a ConsoleOutputStream on the JControl Display.

Author:
boehme
Available on JControl Devices:
lib

Field Summary
 int pos
          Contains the current pixel position in the current line
 
Fields inherited from interface jcontrol.comm.ConsoleOutputStream
STD_LF
 
Constructor Summary
DisplayConsole()
          Constructs a new DisplayConsole using the default Display.
DisplayConsole(jcontrol.io.Display lcd)
          Constructs a new DisplayConsole using a specified Display.
 
Method Summary
 void close()
          Closes the DisplayConsole
 void print(java.lang.String buffer)
          Writes a String to the Display.
 void println()
          Moves the cursor to the beginning of the next line.
 void println(java.lang.String buffer)
          Writes a String to the Display.
 int write(byte[] b, int start, int length)
          Writes a character sequence to the Display.
 void write(char c)
          Writes a single charater to the Display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 

Field Detail

pos

public int pos
Contains the current pixel position in the current line

Constructor Detail

DisplayConsole

public DisplayConsole()
Constructs a new DisplayConsole using the default Display.


DisplayConsole

public DisplayConsole(jcontrol.io.Display lcd)
Constructs a new DisplayConsole using a specified Display.

Parameters:
lcd - Display to use (full screen)
Method Detail

close

public void close()
Closes the DisplayConsole

Specified by:
close in interface jcontrol.io.BasicOutputStream

print

public void print(java.lang.String buffer)
Writes a String to the Display. The cursor is moved to the end of the characters drawn.

Specified by:
print in interface jcontrol.comm.ConsoleOutputStream
Parameters:
buffer - the String to write

println

public void println()
Moves the cursor to the beginning of the next line. If needed, the display contents is scrolled up.

Specified by:
println in interface jcontrol.comm.ConsoleOutputStream

println

public void println(java.lang.String buffer)
Writes a String to the Display. The cursor is moved to the beginning of the next line. If needed, the display contents is scrolled up.

Specified by:
println in interface jcontrol.comm.ConsoleOutputStream
Parameters:
buffer - the String to write

write

public int write(byte[] b,
                 int start,
                 int length)
Writes a character sequence to the Display. (Not implemented)

Specified by:
write in interface jcontrol.io.BasicOutputStream
Parameters:
b - a byte array containing charaters to write (using 8859-1 encoding)
start - index in b
length - number of bytes

write

public void write(char c)
           throws java.io.IOException
Writes a single charater to the Display. The cursor is moved one character to the right.

Specified by:
write in interface jcontrol.io.BasicOutputStream
Parameters:
c - the character to write (8859-1 encoding)
Throws:
java.io.IOException