|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
eTextReader.tabletpc.InkAnnotationWindow
public class InkAnnotationWindow
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) InkCallback |
callback
Callback object to call when messages are received |
static int |
CHANGE_DISPLAY_TYPE
|
(package private) DBClient |
client
A DBClient object that we can use to communicate with the database; this is only used to retrieve the notation data |
static int |
CLOSE_ANNOTATION
|
static int |
DELETE_ANNOTATION
|
(package private) java.io.DataInputStream |
fromWindows
A stream to receive data from the windows process |
private static java.lang.String |
INK_THREADGROUP_NAME
The name of the thread group used to store InkAnnotationWindow threads |
private static java.lang.ThreadGroup |
inkAnnotationThreads
Contains references to each of the InkAnnotationWindow threads |
static int |
ISF
Constant used to indicate retrieval of ISF data |
(package private) byte[] |
isfData
Holds the annotation data in Ink Serialized Format |
static int |
LOAD_ANNOTATION
|
private static int |
newInkAnnotations
Keeps a count of the number of new ink annotation windows; used to generate a unique name for the threads |
(package private) Notation |
notation
Holds information about the Notation object this window is editing |
(package private) java.awt.Dimension |
parentSize
The size of the opening window before this window was opened |
static int |
PNG
Constant used to indicate retrieval of PNG data |
(package private) byte[] |
pngData
Holds the annotation data in Portable Network Graphic format |
static int |
RESIZE_WINDOW
constants used to identify messages between this object and the windows process |
static int |
SAVE_ANNOTATION
|
(package private) java.net.ServerSocket |
server
A socket used by this object to receive commands from the windows process |
static int |
SHARE_ANNOTATION
|
static int |
SHOW_DETAILS
|
(package private) java.lang.String |
subject
Holds the subject of the annotation entered by the user |
static int |
TABLET_ANNOTATION_PORT
the port number used on tablet PC to communicate with the windows annotation server |
(package private) java.io.DataOutputStream |
toWindows
A stream to write data to the windows process |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
InkAnnotationWindow(InkCallback callback,
Notation notation,
DBClient client,
int x,
int y,
int width,
int height,
java.awt.Dimension parentSize)
creates a new InkAnnotationWindow object, working on the given notation |
Method Summary | |
---|---|
void |
close()
Closes this window |
static void |
closeAllInkThreads()
|
byte[] |
getAnnotationData(int type)
retrieves the annotation data in the specified format |
java.lang.String |
getSubject()
returns the annotation subject entered by the user |
static java.lang.String |
getThreadName(Notation n)
Create a unique thread name for a new ink annotation |
void |
run()
|
private void |
saveAnnotation()
called when the user requests the ink annotation be saved. |
private void |
sendNotationData()
loads the notation data from the database, and then sends it to the windows process |
protected void |
setupInkAnnotation(int width,
int height,
int x,
int y)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ISF
public static final int PNG
public static final int TABLET_ANNOTATION_PORT
public static final int RESIZE_WINDOW
public static final int SAVE_ANNOTATION
public static final int LOAD_ANNOTATION
public static final int CLOSE_ANNOTATION
public static final int DELETE_ANNOTATION
public static final int SHARE_ANNOTATION
public static final int SHOW_DETAILS
public static final int CHANGE_DISPLAY_TYPE
InkCallback callback
byte[] isfData
byte[] pngData
java.lang.String subject
Notation notation
DBClient client
java.awt.Dimension parentSize
java.net.ServerSocket server
java.io.DataInputStream fromWindows
java.io.DataOutputStream toWindows
private static java.lang.ThreadGroup inkAnnotationThreads
private static int newInkAnnotations
private static java.lang.String INK_THREADGROUP_NAME
Constructor Detail |
---|
public InkAnnotationWindow(InkCallback callback, Notation notation, DBClient client, int x, int y, int width, int height, java.awt.Dimension parentSize)
callback:
- an InkCallback object that this window
will notify when various events occurnotation:
- the notation object to load when the
window is opened. Note this should always be the notation
describing the PNG version of the data, not the ISF version.client:
- a DBClient object that can be used to
retrieve the notation data from the database. If the value of
client is null, a new DBClient object will be
constructedx
- the x coordinate where the window should be openedy
- the y coordinate where the window should be openedwidth
- the width of the window when openedheight
- the height of the window when openedparentSize
- the size of the parent window before
this window is opened. This value is passed back to the callback
object as part of the callback methodsMethod Detail |
---|
public static java.lang.String getThreadName(Notation n)
public static void closeAllInkThreads()
protected void setupInkAnnotation(int width, int height, int x, int y)
public java.lang.String getSubject()
public byte[] getAnnotationData(int type)
public void close()
private void saveAnnotation() throws java.io.IOException
java.io.IOException
private void sendNotationData()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |