DefaultGalleryItemRenderer
, ListItemRenderer
public abstract class AbstractGalleryItemRenderer
extends java.lang.Object
Base class used to implement a custom gallery item renderer.
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
OVERLAY_BOTTOM_LEFT |
Id for decorators located at the bottom left of the item image
Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT
,
|
static java.lang.String |
OVERLAY_BOTTOM_RIGHT |
Id for decorators located at the bottom right of the item image
Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT
,
|
static java.lang.String |
OVERLAY_TOP_LEFT |
Id for decorators located at the top left of the item image
Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT
,
|
static java.lang.String |
OVERLAY_TOP_RIGHT |
Id for decorators located at the top right of the item image
Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT
,
|
Constructor | Description |
---|---|
AbstractGalleryItemRenderer() |
Modifier and Type | Method | Description |
---|---|---|
abstract void |
dispose() |
|
abstract void |
draw(org.eclipse.swt.graphics.GC gc,
GalleryItem item,
int index,
int x,
int y,
int width,
int height) |
Draws an item.
|
Gallery |
getGallery() |
Get current gallery.
|
boolean |
isSelected() |
true is the current item is selected
|
void |
postDraw(org.eclipse.swt.graphics.GC gc) |
This method is called after drawing the last item.
|
void |
preDraw(org.eclipse.swt.graphics.GC gc) |
This method is called before drawing the first item.
|
void |
setGallery(Gallery gallery) |
Set the current gallery.
|
void |
setSelected(boolean selected) |
public static final java.lang.String OVERLAY_BOTTOM_RIGHT
public static final java.lang.String OVERLAY_BOTTOM_LEFT
public static final java.lang.String OVERLAY_TOP_RIGHT
public static final java.lang.String OVERLAY_TOP_LEFT
public boolean isSelected()
public void setSelected(boolean selected)
public abstract void draw(org.eclipse.swt.graphics.GC gc, GalleryItem item, int index, int x, int y, int width, int height)
gc
- item
- index
- x
- y
- width
- height
- public abstract void dispose()
public void preDraw(org.eclipse.swt.graphics.GC gc)
gc
- public void postDraw(org.eclipse.swt.graphics.GC gc)
gc
- public Gallery getGallery()
public void setGallery(Gallery gallery)
Gallery.setItemRenderer(AbstractGalleryItemRenderer)
. There is
not need to call it from user code.gallery
-