|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphicsViewer
Viewer for RasterGraphics
, VectorGraphics
etc. Typical implementation
uses some GUI object to [pre]view graphic results.
VectorGraphics
,
RasterGraphics
Nested Class Summary | |
---|---|
static class |
GraphicsViewer.PreviewThread
Preview thread for background repainting of attached GraphicsViewer instance. |
Field Summary | |
---|---|
static java.lang.String |
BLACK_BACKGROUND
Window-title property (String): title for frame window holding the graphic output. |
static java.lang.String |
WINDOW_TITLE
Window-title property (String): title for frame window holding the graphic output. |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Method Summary | |
---|---|
void |
addInputListener(InputListener list)
Adds input listener object. |
void |
addSemaphore(Semaphore s)
Adds a new semaphore - object which wants to be signaled after the viewer window is closed (by user interaction etc.). |
void |
destroy()
Destroys the preview window. |
void |
hudClear()
Removes all HUD primitives. |
int |
hudGetFreeId()
Returns id of any free HUD slot. |
void |
hudRemove(int id)
Removes existing HUD primitive. |
void |
hudSetLine(int id,
int x1,
int y1,
int x2,
int y2)
Replaces the given HUD primitive slot with line from [x1,y1] to [x2,y2] . |
void |
invalidate(int xMin,
int xMax,
int yMin,
int yMax)
Invalidates the given rectangular region of the graphics output. |
void |
removeInputListener(InputListener list)
Removes (previously added) input listener object. |
void |
removeSemaphore(Semaphore s)
Removes one of associated semaphores. |
void |
repaint()
Causes the instant repainting of actual invalid region of the graphic output. |
void |
repaintAll()
Causes the instant repainting of the whole graphic output (regardless of the actual invalid region). |
boolean |
repaintLoop()
Start (potentially) infinite repaint loop. |
boolean |
stopRepaintLoop()
Stops the running repaint loop. |
Methods inherited from interface cz.cuni.jagrlib.iface.Trigger |
---|
fire |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
static final java.lang.String WINDOW_TITLE
static final java.lang.String BLACK_BACKGROUND
Method Detail |
---|
boolean repaintLoop()
stopRepaintLoop()
call or by external user interaction (user break, window
close, ..).
stopRepaintLoop()
call.stopRepaintLoop()
boolean stopRepaintLoop()
repaintLoop()
void destroy()
void repaintAll()
Trigger.fire(int)
call has the same effect..
invalidate(int, int, int, int)
,
repaint()
,
Trigger.fire(int)
void invalidate(int xMin, int xMax, int yMin, int yMax)
repaint()
call...
xMin
- X coordinate of the upper left corner.xMax
- X coordinate of the lower right corner (outside pixel).yMin
- Y coordinate of the upper left corner.yMax
- Y coordinate of the upper left corner (outside pixel).repaint()
void repaint()
repaintAll()
,
invalidate(int, int, int, int)
void addSemaphore(Semaphore s)
s
- A new semaphore instance.removeSemaphore(cz.cuni.jagrlib.Semaphore)
void removeSemaphore(Semaphore s)
s
- Semaphore to be removed.addSemaphore(cz.cuni.jagrlib.Semaphore)
void addInputListener(InputListener list)
void removeInputListener(InputListener list)
void hudClear()
int hudGetFreeId()
void hudSetLine(int id, int x1, int y1, int x2, int y2)
[x1,y1]
to [x2,y2]
.
void hudRemove(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |