VNCj

gnu.vnc
Class VNCQueue

java.lang.Object
  |
  +--gnu.vnc.VNCQueue

public class VNCQueue
extends Object

Smart rectangle queue that converts inserted rectangles to as small a number of encoded RFB rectangles as possible within a specified clipping area.


Field Summary
private  RFBClients clients
           
 
Constructor Summary
VNCQueue(RFBClients clients)
           
 
Method Summary
 void addRectangle(int x, int y, int w, int h, PixelsOwner pixelsOwner)
           
 void addRectangle(PixelsOwner pixelsOwner)
           
 void addRectangle(Rectangle addition, PixelsOwner pixelsOwner)
           
private  void addRectangle(Vector queue, Rectangle addition)
           
 void frameBufferUpdate(RFBClient client, boolean incremental, int x, int y, int w, int h, PixelsOwner pixelsOwner)
           
private  Vector getQueue(RFBClient client)
           
private static Rectangle[] nonOverlappedUnion(Rectangle r1, Rectangle r2)
           
 Rectangle[] pop(RFBClient client, int x, int y, int w, int h)
           
 Rectangle[] pop(RFBClient client, Rectangle clip)
           
 Rect[] popEncoded(RFBClient client, int x, int y, int w, int h, int[] pixels, int scanline)
           
 Rect[] popEncoded(RFBClient client, Rectangle clip, int[] pixels, int scanline)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clients

private RFBClients clients
Constructor Detail

VNCQueue

public VNCQueue(RFBClients clients)
Method Detail

frameBufferUpdate

public void frameBufferUpdate(RFBClient client,
                              boolean incremental,
                              int x,
                              int y,
                              int w,
                              int h,
                              PixelsOwner pixelsOwner)
                       throws IOException
IOException

popEncoded

public Rect[] popEncoded(RFBClient client,
                         int x,
                         int y,
                         int w,
                         int h,
                         int[] pixels,
                         int scanline)
                  throws IOException
IOException

popEncoded

public Rect[] popEncoded(RFBClient client,
                         Rectangle clip,
                         int[] pixels,
                         int scanline)
                  throws IOException
IOException

addRectangle

public void addRectangle(int x,
                         int y,
                         int w,
                         int h,
                         PixelsOwner pixelsOwner)

addRectangle

public void addRectangle(Rectangle addition,
                         PixelsOwner pixelsOwner)

addRectangle

public void addRectangle(PixelsOwner pixelsOwner)

pop

public Rectangle[] pop(RFBClient client,
                       int x,
                       int y,
                       int w,
                       int h)

pop

public Rectangle[] pop(RFBClient client,
                       Rectangle clip)

getQueue

private Vector getQueue(RFBClient client)

addRectangle

private void addRectangle(Vector queue,
                          Rectangle addition)

nonOverlappedUnion

private static Rectangle[] nonOverlappedUnion(Rectangle r1,
                                              Rectangle r2)

VNCj