Tesseract
3.02
|
Inherits JFrame.
Public Member Functions | |
void | brush (int red, int green, int blue) |
void | brush (int red, int green, int blue, int alpha) |
void | clear () |
void | createImage (String internalName, int width, int height, int bitsPerPixel) |
void | createPolyline (int length) |
void | drawPolyline () |
SVWindow (String name, int hash, int posX, int posY, int sizeX, int sizeY, int canvasSizeX, int canvasSizeY) | |
void | addMessageBox () |
void | setStrokeWidth (float width) |
void | drawEllipse (int x, int y, int width, int height) |
void | drawImage (String internalName, int x_pos, int y_pos) |
void | drawLine (int x1, int y1, int x2, int y2) |
void | drawRectangle (int x1, int y1, int x2, int y2) |
void | drawText (int x, int y, String text) |
void | pen (int red, int green, int blue) |
void | pen (int red, int green, int blue, int alpha) |
void | textAttributes (String font, int pixelSize, boolean bold, boolean italic, boolean underlined) |
void | zoomRectangle (int x1, int y1, int x2, int y2) |
void | update () |
void | addMenuBarItem (String parent, String name, int id, boolean checked) |
void | addMenuBarItem (String parent, String name) |
void | addMenuBarItem (String parent, String name, int id) |
void | addMessage (String message) |
void | showInputDialog (String msg, String def, int id, SVEventType evtype) |
void | showInputDialog (String msg) |
void | showYesNoDialog (String msg) |
void | addPopupMenuItem (String parent, String name) |
void | addPopupMenuItem (String parent, String name, int cmdEvent, String value, String desc) |
void | destroy () |
void | openImage (String filename) |
Public Attributes | |
int | hash |
SVPopupMenu | svPuMenu = null |
PCanvas | canvas |
Static Public Attributes | |
static final double | SCALING_FACTOR = 2 |
static int | nrWindows = 0 |
The SVWindow is the top-level ui class. It should get instantiated whenever the user intends to create a new window. It contains helper functions to draw on the canvas, add new menu items, show modal dialogs etc.
Definition at line 54 of file SVWindow.java.
|
inline |
Construct a new SVWindow and set it visible.
name | Title of the window. |
hash | Unique internal representation. This has to be the same as defined by the client, as they use this to refer to the windows. |
posX | X position of where to draw the window (upper left). |
posY | Y position of where to draw the window (upper left). |
sizeX | The width of the window. |
sizeY | The height of the window. |
canvasSizeX | The canvas width of the window. |
canvasSizeY | The canvas height of the window. |
Definition at line 193 of file SVWindow.java.
|
inline |
Adds a checkbox entry to the menubar, c.f. SVMenubar.add(...)
Definition at line 493 of file SVWindow.java.
|
inline |
Adds a submenu to the menubar, c.f. SVMenubar.add(...)
Definition at line 499 of file SVWindow.java.
|
inline |
Adds a new entry to the menubar, c.f. SVMenubar.add(...)
Definition at line 504 of file SVWindow.java.
|
inline |
Add a message to the message box.
Definition at line 513 of file SVWindow.java.
|
inline |
Convenience function to add a message box to the window which can be used to output debug information.
Definition at line 286 of file SVWindow.java.
|
inline |
Adds a submenu to the popup menu, c.f. SVPopupMenu.add(...)
Definition at line 609 of file SVWindow.java.
|
inline |
Adds a new menu entry to the popup menu, c.f. SVPopupMenu.add(...)
Definition at line 617 of file SVWindow.java.
|
inline |
Set the brush to an RGB color
Definition at line 120 of file SVWindow.java.
|
inline |
Set the brush to an RGBA color
Definition at line 125 of file SVWindow.java.
|
inline |
Erase all content from the window, but do not destroy it.
Definition at line 135 of file SVWindow.java.
|
inline |
Start setting up a new image. The server will now expect image data until the image is complete.
internalName | The unique name of the new image |
width | Image width |
height | Image height |
bitsPerPixel | The bit depth (currently supported: 1 (binary) and 32 (ARGB)) |
Definition at line 149 of file SVWindow.java.
|
inline |
Start setting up a new polyline. The server will now expect polyline data until the polyline is complete.
length | number of coordinate pairs |
Definition at line 160 of file SVWindow.java.
|
inline |
Destroys a window.
Definition at line 626 of file SVWindow.java.
|
inline |
Draw an ellipse at (x,y) with given width and height, using the current stroke, the current brush color to fill it and the current pen color for the outline.
Definition at line 313 of file SVWindow.java.
|
inline |
Draw the image with the given name at (x,y). Any image loaded stays in memory, so if you intend to redraw an image, you do not have to use createImage again.
Definition at line 326 of file SVWindow.java.
|
inline |
Draw a line from (x1,y1) to (x2,y2) using the current pen color and stroke.
Definition at line 336 of file SVWindow.java.
|
inline |
Draw the now complete polyline.
Definition at line 170 of file SVWindow.java.
|
inline |
Draw a rectangle given the two points (x1,y1) and (x2,y2) using the current stroke, pen color for the border and the brush to fill the interior.
Definition at line 351 of file SVWindow.java.
|
inline |
Draw some text at (x,y) using the current pen color and text attributes. If the current font does NOT support at least one character, it tries to find a font which is capable of displaying it and use that to render the text. Note: If the font says it can render a glyph, but in reality it turns out to be crap, there is nothing we can do about it.
Definition at line 378 of file SVWindow.java.
|
inline |
Open an image from a given file location and store it in memory. Pro: Faster than createImage. Con: Works only on the local file system.
filename | The path to the image. |
Definition at line 639 of file SVWindow.java.
|
inline |
Set the pen color to an RGB value
Definition at line 415 of file SVWindow.java.
|
inline |
Set the pen color to an RGBA value
Definition at line 420 of file SVWindow.java.
|
inline |
Allows you to specify the thickness with which to draw lines, recantgles and ellipses.
width | The new thickness. |
Definition at line 302 of file SVWindow.java.
|
inline |
Show a modal input dialog. The answer by the dialog is then send to the client, together with the associated menu id, as SVET_POPUP
msg | The text that is displayed in the dialog. |
def | The default value of the dialog. |
id | The associated commandId |
evtype | The event this is associated with (usually SVET_MENU or SVET_POPUP) |
Definition at line 561 of file SVWindow.java.
|
inline |
Shows a modal input dialog to the user. The return value is automatically sent to the client as SVET_INPUT event (with command id -1).
msg | The text of the dialog. |
Definition at line 583 of file SVWindow.java.
|
inline |
Shows a dialog presenting "Yes" and "No" as answers and returns either a "y" or "n" to the client.
msg | The text that is displayed in the dialog. |
Definition at line 593 of file SVWindow.java.
|
inline |
Define how to display text. Note: underlined is not currently not supported
Definition at line 427 of file SVWindow.java.
|
inline |
Flush buffers and update display.
Only actually reacts if there are no more messages in the stack, to prevent the canvas from flickering.
Definition at line 475 of file SVWindow.java.
|
inline |
Zoom the window to the rectangle given the two points (x1,y1) and (x2,y2), which must be greater than (x1,y1).
Definition at line 449 of file SVWindow.java.
PCanvas com.google.scrollview.ui.SVWindow.canvas |
Definition at line 115 of file SVWindow.java.
int com.google.scrollview.ui.SVWindow.hash |
A unique representation for the window, also known by the client. It is used when sending messages from server to client to identify him.
Definition at line 99 of file SVWindow.java.
|
static |
The total number of created Windows. If this ever reaches 0 (apart from the beginning), quit the server.
Definition at line 105 of file SVWindow.java.
|
static |
Constant defining the "speed" at which to zoom in and out.
Definition at line 65 of file SVWindow.java.
SVPopupMenu com.google.scrollview.ui.SVWindow.svPuMenu = null |
Definition at line 114 of file SVWindow.java.