public class VncCanvas
extends java.awt.Canvas
implements java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Modifier and Type | Field and Description |
---|---|
int |
bytesPixel |
(package private) java.awt.image.ColorModel |
cm24 |
(package private) java.awt.image.ColorModel |
cm8 |
(package private) java.awt.Color[] |
colors |
protected int |
cursorHeight |
protected int |
cursorWidth |
protected int |
cursorX |
protected int |
cursorY |
private java.awt.Color |
hextile_bg |
private java.awt.Color |
hextile_fg |
protected int |
hotX |
protected int |
hotY |
(package private) boolean |
inputEnabled |
(package private) java.awt.Rectangle |
jpegRect |
(package private) int |
maxHeight |
(package private) int |
maxWidth |
protected java.awt.Graphics |
memGraphics |
protected java.awt.Image |
memImage |
(package private) int |
origCursorHeight |
(package private) int |
origCursorWidth |
(package private) int |
origHotX |
(package private) int |
origHotY |
(package private) int[] |
pixels24 |
(package private) byte[] |
pixels8 |
(package private) java.awt.image.MemoryImageSource |
pixelsSource |
(package private) java.awt.Image |
rawPixelsImage |
protected RfbProto |
rfb |
protected int |
scaledHeight |
protected int |
scaledWidth |
(package private) int |
scalingFactor |
protected boolean |
showSoftCursor |
protected java.awt.Image |
softCursor |
(package private) java.awt.image.MemoryImageSource |
softCursorSource |
protected int |
statNumBytesDecoded |
protected int |
statNumBytesEncoded |
protected int |
statNumPixelRects |
protected int |
statNumRectsCopy |
protected int |
statNumRectsHextile |
protected int |
statNumRectsRaw |
protected int |
statNumRectsTight |
protected int |
statNumRectsTightJPEG |
protected int |
statNumRectsZRLE |
protected int |
statNumTotalRects |
protected int |
statNumUpdates |
protected long |
statStartTime |
(package private) java.util.zip.Inflater[] |
tightInflaters |
(package private) static int |
tightZlibBufferSize |
protected VncViewer |
viewer |
(package private) byte[] |
zlibBuf |
(package private) int |
zlibBufLen |
(package private) java.util.zip.Inflater |
zlibInflater |
(package private) byte[] |
zrleBuf |
(package private) int |
zrleBufLen |
(package private) ZlibInStream |
zrleInStream |
(package private) boolean |
zrleRecWarningShown |
(package private) int[] |
zrleTilePixels24 |
(package private) byte[] |
zrleTilePixels8 |
Constructor and Description |
---|
VncCanvas(VncViewer v) |
VncCanvas(VncViewer v,
int maxWidth_,
int maxHeight_) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
createSoftCursor() |
(package private) java.awt.image.MemoryImageSource |
decodeCursorShape(int encodingType,
int width,
int height) |
(package private) void |
decodeGradientData(int x,
int y,
int w,
int h,
byte[] buf) |
(package private) void |
decodeMonoData(int x,
int y,
int w,
int h,
byte[] src,
byte[] palette) |
(package private) void |
decodeMonoData(int x,
int y,
int w,
int h,
byte[] src,
int[] palette) |
void |
enableInput(boolean enable) |
java.awt.Dimension |
getMaximumSize() |
java.awt.Dimension |
getMinimumSize() |
java.awt.Dimension |
getPreferredSize() |
void |
handleCopyRect(int x,
int y,
int w,
int h) |
void |
handleCoRRERect(int x,
int y,
int w,
int h) |
void |
handleCursorShapeUpdate(int encodingType,
int xhot,
int yhot,
int width,
int height) |
void |
handleHextileRect(int x,
int y,
int w,
int h) |
void |
handleHextileSubrect(int tx,
int ty,
int tw,
int th) |
void |
handleRawRect(int x,
int y,
int w,
int h) |
void |
handleRawRect(int x,
int y,
int w,
int h,
boolean paint) |
void |
handleRRERect(int x,
int y,
int w,
int h) |
void |
handleTightRect(int x,
int y,
int w,
int h) |
void |
handleUpdatedPixels(int x,
int y,
int w,
int h) |
void |
handleUpdatedZrleTile(int x,
int y,
int w,
int h) |
void |
handleZlibRect(int x,
int y,
int w,
int h) |
void |
handleZRLERect(int x,
int y,
int w,
int h) |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height) |
void |
keyPressed(java.awt.event.KeyEvent evt) |
void |
keyReleased(java.awt.event.KeyEvent evt) |
void |
keyTyped(java.awt.event.KeyEvent evt) |
void |
mouseClicked(java.awt.event.MouseEvent evt) |
void |
mouseDragged(java.awt.event.MouseEvent evt) |
void |
mouseEntered(java.awt.event.MouseEvent evt) |
void |
mouseExited(java.awt.event.MouseEvent evt) |
void |
mouseMoved(java.awt.event.MouseEvent evt) |
void |
mousePressed(java.awt.event.MouseEvent evt) |
void |
mouseReleased(java.awt.event.MouseEvent evt) |
void |
paint(java.awt.Graphics g) |
void |
paintScaledFrameBuffer(java.awt.Graphics g) |
void |
processLocalKeyEvent(java.awt.event.KeyEvent evt) |
void |
processLocalMouseEvent(java.awt.event.MouseEvent evt,
boolean moved) |
void |
processNormalProtocol() |
(package private) int |
readPixel(InStream is) |
(package private) void |
readPixels(InStream is,
int[] dst,
int count) |
(package private) void |
readZrlePackedPixels(int tw,
int th,
int[] palette,
int palSize) |
(package private) void |
readZrlePackedRLEPixels(int tw,
int th,
int[] palette) |
(package private) void |
readZrlePalette(int[] palette,
int palSize) |
(package private) void |
readZrlePlainRLEPixels(int tw,
int th) |
(package private) void |
readZrleRawPixels(int tw,
int th) |
protected void |
resetStats() |
void |
resizeDesktopFrame() |
protected void |
scheduleRepaint(int x,
int y,
int w,
int h) |
void |
setPixelFormat() |
void |
softCursorFree() |
void |
softCursorMove(int x,
int y) |
void |
update(java.awt.Graphics g) |
protected void |
updateFramebufferSize() |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
protected VncViewer viewer
protected RfbProto rfb
java.awt.image.ColorModel cm8
java.awt.image.ColorModel cm24
java.awt.Color[] colors
public int bytesPixel
int maxWidth
int maxHeight
int scalingFactor
protected int scaledWidth
protected int scaledHeight
protected java.awt.Image memImage
protected java.awt.Graphics memGraphics
java.awt.Image rawPixelsImage
java.awt.image.MemoryImageSource pixelsSource
byte[] pixels8
int[] pixels24
protected long statStartTime
protected int statNumUpdates
protected int statNumTotalRects
protected int statNumPixelRects
protected int statNumRectsTight
protected int statNumRectsTightJPEG
protected int statNumRectsZRLE
protected int statNumRectsHextile
protected int statNumRectsRaw
protected int statNumRectsCopy
protected int statNumBytesEncoded
protected int statNumBytesDecoded
byte[] zrleBuf
int zrleBufLen
byte[] zrleTilePixels8
int[] zrleTilePixels24
ZlibInStream zrleInStream
boolean zrleRecWarningShown
byte[] zlibBuf
int zlibBufLen
java.util.zip.Inflater zlibInflater
static final int tightZlibBufferSize
java.util.zip.Inflater[] tightInflaters
java.awt.Rectangle jpegRect
boolean inputEnabled
private java.awt.Color hextile_bg
private java.awt.Color hextile_fg
protected boolean showSoftCursor
java.awt.image.MemoryImageSource softCursorSource
protected java.awt.Image softCursor
protected int cursorX
protected int cursorY
protected int cursorWidth
protected int cursorHeight
int origCursorWidth
int origCursorHeight
protected int hotX
protected int hotY
int origHotX
int origHotY
public VncCanvas(VncViewer v) throws java.io.IOException
java.io.IOException
public VncCanvas(VncViewer v, int maxWidth_, int maxHeight_) throws java.io.IOException
java.io.IOException
void createSoftCursor()
java.awt.image.MemoryImageSource decodeCursorShape(int encodingType, int width, int height) throws java.io.IOException
java.io.IOException
void decodeGradientData(int x, int y, int w, int h, byte[] buf)
void decodeMonoData(int x, int y, int w, int h, byte[] src, byte[] palette)
void decodeMonoData(int x, int y, int w, int h, byte[] src, int[] palette)
public void enableInput(boolean enable)
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class java.awt.Component
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public void handleCopyRect(int x, int y, int w, int h) throws java.io.IOException
java.io.IOException
public void handleCoRRERect(int x, int y, int w, int h) throws java.io.IOException
java.io.IOException
public void handleCursorShapeUpdate(int encodingType, int xhot, int yhot, int width, int height) throws java.io.IOException
java.io.IOException
public void handleHextileRect(int x, int y, int w, int h) throws java.io.IOException
java.io.IOException
public void handleHextileSubrect(int tx, int ty, int tw, int th) throws java.io.IOException
java.io.IOException
public void handleRawRect(int x, int y, int w, int h) throws java.io.IOException
java.io.IOException
public void handleRawRect(int x, int y, int w, int h, boolean paint) throws java.io.IOException
java.io.IOException
public void handleRRERect(int x, int y, int w, int h) throws java.io.IOException
java.io.IOException
public void handleTightRect(int x, int y, int w, int h) throws java.lang.Exception
java.lang.Exception
public void handleUpdatedPixels(int x, int y, int w, int h)
public void handleUpdatedZrleTile(int x, int y, int w, int h)
public void handleZlibRect(int x, int y, int w, int h) throws java.lang.Exception
java.lang.Exception
public void handleZRLERect(int x, int y, int w, int h) throws java.lang.Exception
java.lang.Exception
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
imageUpdate
in class java.awt.Component
public void keyPressed(java.awt.event.KeyEvent evt)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent evt)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent evt)
keyTyped
in interface java.awt.event.KeyListener
public void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent evt)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
public void paintScaledFrameBuffer(java.awt.Graphics g)
public void processLocalKeyEvent(java.awt.event.KeyEvent evt)
public void processLocalMouseEvent(java.awt.event.MouseEvent evt, boolean moved)
public void processNormalProtocol() throws java.lang.Exception
java.lang.Exception
int readPixel(InStream is) throws java.lang.Exception
java.lang.Exception
void readPixels(InStream is, int[] dst, int count) throws java.lang.Exception
java.lang.Exception
void readZrlePackedPixels(int tw, int th, int[] palette, int palSize) throws java.lang.Exception
java.lang.Exception
void readZrlePackedRLEPixels(int tw, int th, int[] palette) throws java.lang.Exception
java.lang.Exception
void readZrlePalette(int[] palette, int palSize) throws java.lang.Exception
java.lang.Exception
void readZrlePlainRLEPixels(int tw, int th) throws java.lang.Exception
java.lang.Exception
void readZrleRawPixels(int tw, int th) throws java.lang.Exception
java.lang.Exception
protected void resetStats()
public void resizeDesktopFrame()
protected void scheduleRepaint(int x, int y, int w, int h)
public void setPixelFormat() throws java.io.IOException
java.io.IOException
public void softCursorFree()
public void softCursorMove(int x, int y)
public void update(java.awt.Graphics g)
update
in class java.awt.Canvas
protected void updateFramebufferSize()