DefaultGalleryGroupRenderer
, NoGroupRenderer
public abstract class AbstractGridGroupRenderer extends AbstractGalleryGroupRenderer
Abstract class which provides low-level support for a grid-based group. renderer.
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
H_COUNT |
|
static java.lang.String |
V_COUNT |
Constructor | Description |
---|---|
AbstractGridGroupRenderer() |
Modifier and Type | Method | Description |
---|---|---|
void |
dispose() |
|
void |
draw(org.eclipse.swt.graphics.GC gc,
GalleryItem group,
int x,
int y,
int clipX,
int clipY,
int clipWidth,
int clipHeight) |
Group size informations can be retrieved from group.
|
GalleryItem |
getItem(GalleryItem group,
org.eclipse.swt.graphics.Point coords) |
Returns the item at coords relative to the parent group.
|
int |
getItemHeight() |
|
int |
getItemWidth() |
|
int |
getMinMargin() |
|
GalleryItem |
getNextItem(GalleryItem item,
int key) |
Returns the item that should be selected when the current item is 'item'
and the 'key' is pressed
|
org.eclipse.swt.graphics.Rectangle |
getSize(GalleryItem item) |
Returns the size of a group.
|
boolean |
isAlwaysExpanded() |
If true, groups are always expanded and toggle button is not displayed
|
boolean |
isAutoMargin() |
|
void |
layout(org.eclipse.swt.graphics.GC gc,
GalleryItem group) |
This method is called on each root item when the Gallery changes (resize,
item addition or removal) in order to update the gallery size.
|
boolean |
mouseDown(GalleryItem group,
org.eclipse.swt.events.MouseEvent e,
org.eclipse.swt.graphics.Point coords) |
This method can be implemented to handle mouse down events at the group
level.
|
void |
preLayout(org.eclipse.swt.graphics.GC gc) |
This method is called before the layout of the first item.
|
void |
setAlwaysExpanded(boolean alwaysExpanded) |
If true, groups are always expanded and toggle button is not displayed if
false, expand status depends on each item.
|
void |
setAutoMargin(boolean autoMargin) |
|
void |
setItemHeight(int itemHeight) |
|
void |
setItemSize(int width,
int height) |
|
void |
setItemWidth(int itemWidth) |
|
void |
setMinMargin(int minMargin) |
getGallery, getScrollBarIncrement, isExpanded, postDraw, postLayout, preDraw, setExpanded, setGallery
public static final java.lang.String H_COUNT
public static final java.lang.String V_COUNT
public void draw(org.eclipse.swt.graphics.GC gc, GalleryItem group, int x, int y, int clipX, int clipY, int clipWidth, int clipHeight)
AbstractGalleryGroupRenderer
draw
in class AbstractGalleryGroupRenderer
public GalleryItem getItem(GalleryItem group, org.eclipse.swt.graphics.Point coords)
AbstractGalleryGroupRenderer
getItem
in class AbstractGalleryGroupRenderer
public org.eclipse.swt.graphics.Rectangle getSize(GalleryItem item)
AbstractGalleryGroupRenderer
getSize
in class AbstractGalleryGroupRenderer
public void layout(org.eclipse.swt.graphics.GC gc, GalleryItem group)
AbstractGalleryGroupRenderer
layout
in class AbstractGalleryGroupRenderer
public boolean isAlwaysExpanded()
public void setAlwaysExpanded(boolean alwaysExpanded)
alwaysExpanded
- public int getMinMargin()
public int getItemWidth()
public void setItemWidth(int itemWidth)
public int getItemHeight()
public void setItemHeight(int itemHeight)
public void setItemSize(int width, int height)
public void setMinMargin(int minMargin)
public boolean isAutoMargin()
public void setAutoMargin(boolean autoMargin)
public void dispose()
dispose
in class AbstractGalleryGroupRenderer
public boolean mouseDown(GalleryItem group, org.eclipse.swt.events.MouseEvent e, org.eclipse.swt.graphics.Point coords)
AbstractGalleryGroupRenderer
mouseDown
in class AbstractGalleryGroupRenderer
group
- The group on which the mouse click occurede
- The original mouse eventcoords
- The pointer coordinates relative to the grouppublic void preLayout(org.eclipse.swt.graphics.GC gc)
AbstractGalleryGroupRenderer
preLayout
in class AbstractGalleryGroupRenderer
public GalleryItem getNextItem(GalleryItem item, int key)
AbstractGalleryGroupRenderer
getNextItem
in class AbstractGalleryGroupRenderer