Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.widgets
Class IconBar.DefaultRenderer  view IconBar.DefaultRenderer download IconBar.DefaultRenderer.java

java.lang.Object
  extended byorg.eclipse.swt.widgets.IconBar.DefaultRenderer
All Implemented Interfaces:
IIconBarRenderer
Enclosing class:
IconBar

public class IconBar.DefaultRenderer
extends java.lang.Object
implements IIconBarRenderer


Field Summary
private  org.eclipse.swt.graphics.Image fBuffer
           
private  org.eclipse.swt.graphics.GC fGC
           
private static java.lang.String NAME
           
 
Constructor Summary
IconBar.DefaultRenderer()
           
 
Method Summary
 void destroy()
           
 boolean isValidItem(java.lang.Object a)
           
 void paintBuffer(boolean flush)
           
 void paintBuffer(org.eclipse.swt.graphics.GC gc, int x, int y, int w, int h, boolean flush)
          Redraw the specified region in the Canvas back buffer.
 void paintCell(int n, boolean flush)
           
 void paintCell(int c, int r, boolean flush)
          Repaint the specified cell in the back buffer and canvas.
 void setBackBuffer(org.eclipse.swt.graphics.Image image)
           
 void setEnabled(int i, boolean enabled)
          Enable/disable specified item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

fBuffer

private org.eclipse.swt.graphics.Image fBuffer

fGC

private org.eclipse.swt.graphics.GC fGC
Constructor Detail

IconBar.DefaultRenderer

public IconBar.DefaultRenderer()
Method Detail

isValidItem

public boolean isValidItem(java.lang.Object a)
Specified by:
isValidItem in interface IIconBarRenderer

destroy

public void destroy()
Specified by:
destroy in interface IIconBarRenderer

setBackBuffer

public void setBackBuffer(org.eclipse.swt.graphics.Image image)
Specified by:
setBackBuffer in interface IIconBarRenderer

setEnabled

public void setEnabled(int i,
                       boolean enabled)
Enable/disable specified item.

Specified by:
setEnabled in interface IIconBarRenderer

paintBuffer

public void paintBuffer(boolean flush)
Specified by:
paintBuffer in interface IIconBarRenderer

paintCell

public void paintCell(int n,
                      boolean flush)
Specified by:
paintCell in interface IIconBarRenderer

paintCell

public void paintCell(int c,
                      int r,
                      boolean flush)
Repaint the specified cell in the back buffer and canvas. This is used to update a particular cell eg. when enable state changed.

Specified by:
paintCell in interface IIconBarRenderer

paintBuffer

public void paintBuffer(org.eclipse.swt.graphics.GC gc,
                        int x,
                        int y,
                        int w,
                        int h,
                        boolean flush)
Redraw the specified region in the Canvas back buffer. //FIXME: For now, redraw the whole images again. Doesn't cost much since it is painted only once when new buffer is allocated. //FIXME: Create a GC for the image as a class variable, so that we don't have to create and dispose the GC every time.