|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.pen.PenInput edu.stanford.hci.r3.pen.Pen
public class Pen
This class represents a single, physical digital pen. A pen has an identity, so you should be able to distinguish them. Pens can batch data for later upload. Alternatively, they can stream live data when connected in a streaming mode.
The Pen object abstracts the lower level connections with the streaming server/client, and dealing with batched ink input. It also interfaces with event handling in the system.
This software is distributed under the BSD License.
Field Summary | |
---|---|
static COMPort |
DEFAULT_COM_PORT
PenStreamingConnection uses this to determine which COM port to connect to when looking for pen data. |
Fields inherited from class edu.stanford.hci.r3.pen.PenInput |
---|
liveMode, penListenersToAdd |
Constructor Summary | |
---|---|
Pen()
Can't use this constructor more than once, because you can only have ONE physical pen connected to the localhost's pen server. |
|
Pen(java.lang.String name)
|
|
Pen(java.lang.String name,
java.lang.String penServerHostName)
|
Method Summary | |
---|---|
void |
addLivePenListener(PenListener penListener)
Adds a low-level pen data listener to the live pen. |
void |
removeLivePenListener(PenListener penListener)
Removes the pen listener from the live pen. |
void |
setLocalComPort(COMPort port)
Customize the COM port, before going live... |
void |
setPenServerPort(int tcpipPort)
Customize the port with which you will connect to the PenServer. |
void |
startLiveMode()
Connects to the pen connection on the local machine, with the default com port. |
void |
startLiveMode(java.lang.String hostDomainNameOrIPAddr)
Set up connection to the pen server. |
void |
stopLiveMode()
Exit live mode. |
Methods inherited from class edu.stanford.hci.r3.pen.PenInput |
---|
getName, isLive, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final COMPort DEFAULT_COM_PORT
Constructor Detail |
---|
public Pen()
public Pen(java.lang.String name)
name
- for debugging purposes, so you can identify pens by namepublic Pen(java.lang.String name, java.lang.String penServerHostName)
name
- name the pen so you can identify it laterpenServerHostName
- Method Detail |
---|
public void addLivePenListener(PenListener penListener)
PenInput
addLivePenListener
in class PenInput
public void removeLivePenListener(PenListener penListener)
PenInput
removeLivePenListener
in class PenInput
public void setLocalComPort(COMPort port)
port
- public void setPenServerPort(int tcpipPort)
tcpipPort
- public void startLiveMode()
startLiveMode
in class PenInput
public void startLiveMode(java.lang.String hostDomainNameOrIPAddr)
hostDomainNameOrIPAddr
- public void stopLiveMode()
stopLiveMode
in class PenInput
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |