java.lang.Object
org.eclipse.swt.widgets.IconBar.DefaultRenderer
- All Implemented Interfaces:
- IIconBarRenderer
- Enclosing class:
- IconBar
- public class IconBar.DefaultRenderer
- extends java.lang.Object
- implements IIconBarRenderer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
IconBar.DefaultRenderer
public IconBar.DefaultRenderer()
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.