Draw2d
3.9.0.201305060205

org.eclipse.draw2d
Class NativeGraphicsSource

java.lang.Object
  extended by org.eclipse.draw2d.NativeGraphicsSource
All Implemented Interfaces:
GraphicsSource

public final class NativeGraphicsSource
extends java.lang.Object
implements GraphicsSource

A graphics source that posts a paint request to the control rather than constructing GC on it directly. This allows the OS's native painting mechanism to be used directly, including any double-buffering that the OS may provide for free.

Since:
3.2

Constructor Summary
NativeGraphicsSource(Control canvas)
          Constructs a new graphics source on the given control.
 
Method Summary
 void flushGraphics(Rectangle region)
          Does nothing.
 Graphics getGraphics(Rectangle r)
          Always returns null, because
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeGraphicsSource

public NativeGraphicsSource(Control canvas)
Constructs a new graphics source on the given control.

Parameters:
canvas - the control
Since:
3.2
Method Detail

getGraphics

public Graphics getGraphics(Rectangle r)
Always returns null, because

Specified by:
getGraphics in interface GraphicsSource
Parameters:
r - The rectangular region
Returns:
A new Graphics object for the given region
See Also:
GraphicsSource.getGraphics(Rectangle)

flushGraphics

public void flushGraphics(Rectangle region)
Does nothing.

Specified by:
flushGraphics in interface GraphicsSource
Parameters:
region - The rectangular region that that no longer needs the Graphics
See Also:
GraphicsSource.flushGraphics(Rectangle)

Draw2d
3.9.0.201305060205

Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.