List of all members.
Detailed Description
The ScrollView class is the main class which gets started from the command line. It sets up LUA and handles the network processing.
- Author:
- wanke.nosp@m.@goo.nosp@m.gle.c.nosp@m.om
Definition at line 32 of file ScrollView.java.
Member Function Documentation
static void com.google.scrollview.ScrollView.addMessage |
( |
SVEvent |
e | ) |
|
|
inlinestatic |
Add a new message to the outgoing queue
Definition at line 60 of file ScrollView.java.
{
if (debugViewNetworkTraffic) {
System.out.println("(S->c) " + e.toString());
}
String str = e.toString();
try {
byte [] utf8 = str.getBytes("UTF8");
out.write(utf8, 0, utf8.length);
} catch (java.io.UnsupportedEncodingException ex) {
System.out.println("Oops... can't encode to UTF8... Exiting");
System.exit(0);
}
out.println();
boolean error = out.checkError();
if (error) {
System.out.println("Connection error. Quitting ScrollView Server...");
System.exit(0);
}
}
static void com.google.scrollview.ScrollView.exit |
( |
| ) |
|
|
inlinestatic |
Called from the client to make the server exit.
Definition at line 379 of file ScrollView.java.
static void com.google.scrollview.ScrollView.main |
( |
String[] |
args | ) |
|
|
inlinestatic |
The main function. Sets up LUA and the server connection and then calls the IOLoop.
Definition at line 387 of file ScrollView.java.
{
if (args.length > 0) {
}
windows = new ArrayList<SVWindow>(100);
intPattern = Pattern.compile("[0-9-][0-9]*");
floatPattern = Pattern.compile("[0-9-][0-9]*\\.[0-9]*");
try {
ServerSocket serverSocket =
new ServerSocket(
SERVER_PORT);
System.out.println(
"Socket started on port " +
SERVER_PORT);
socket = serverSocket.accept();
System.out.println("Client connected");
out = new PrintStream(socket.getOutputStream(), true);
new BufferedReader(new InputStreamReader(socket.getInputStream(),
"UTF8"));
} catch (IOException e) {
e.printStackTrace();
System.exit(1);
}
IOLoop();
}
static String com.google.scrollview.ScrollView.receiveMessage |
( |
| ) |
throws IOException |
|
inlinestatic |
Read one message from client (assuming there are any).
Definition at line 83 of file ScrollView.java.
Member Data Documentation
BufferedReader com.google.scrollview.ScrollView.in |
|
static |
int com.google.scrollview.ScrollView.polylineScanned |
|
static |
int com.google.scrollview.ScrollView.polylineSize |
|
static |
float com.google.scrollview.ScrollView.polylineXCoords[] |
|
static |
float com.google.scrollview.ScrollView.polylineYCoords[] |
|
static |
int com.google.scrollview.ScrollView.SERVER_PORT = 8461 |
|
static |
The documentation for this class was generated from the following file: