Class NoGroupRenderer
- java.lang.Object
-
- org.eclipse.nebula.widgets.gallery.AbstractGalleryGroupRenderer
-
- org.eclipse.nebula.widgets.gallery.AbstractGridGroupRenderer
-
- org.eclipse.nebula.widgets.gallery.NoGroupRenderer
-
public class NoGroupRenderer extends AbstractGridGroupRenderer
Alternate group renderer for the Gallery widget. This group renderer does not draw group titles. Only items are displayed. All groups are considered as expanded.
The visual aspect is the same as the first version of the gallery widget.
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
OFFSET
-
Fields inherited from class org.eclipse.nebula.widgets.gallery.AbstractGridGroupRenderer
autoMargin, DEFAULT_SIZE, EMPTY_STRING, H_COUNT, itemHeight, itemWidth, margin, minMargin, V_COUNT
-
Fields inherited from class org.eclipse.nebula.widgets.gallery.AbstractGalleryGroupRenderer
expanded, gallery
-
-
Constructor Summary
Constructors Constructor Description NoGroupRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.org.eclipse.swt.graphics.Rectangle
getSize(GalleryItem item)
Returns the size of a group.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.widgets.Event e, org.eclipse.swt.graphics.Point coords)
This method can be implemented to handle mouse down events at the group level.-
Methods inherited from class org.eclipse.nebula.widgets.gallery.AbstractGridGroupRenderer
calculateMargins, dispose, drawItem, getItem, getItemHeight, getItemWidth, getLayoutData, getMinMargin, getNextItem, getSize, getSize, getVisibleItems, gridLayout, isAlwaysExpanded, isAutoMargin, isGroupExpanded, mouseDown, preLayout, setAlwaysExpanded, setAutoMargin, setItemHeight, setItemSize, setItemWidth, setMinMargin
-
Methods inherited from class org.eclipse.nebula.widgets.gallery.AbstractGalleryGroupRenderer
getBackground, getFont, getForeground, getGallery, getGroupPosition, getGroupSize, getScrollBarIncrement, isDebugMode, isExpanded, notifyTreeListeners, postDraw, postLayout, preDraw, setExpanded, setGallery, setGroupSize, updateScrollBarsProperties, updateStructuralValues
-
-
-
-
Method Detail
-
draw
public void draw(org.eclipse.swt.graphics.GC gc, GalleryItem group, int x, int y, int clipX, int clipY, int clipWidth, int clipHeight)
Description copied from class:AbstractGalleryGroupRenderer
Group size informations can be retrieved from group. Clipping informations
-
layout
public void layout(org.eclipse.swt.graphics.GC gc, GalleryItem group)
Description copied from class:AbstractGalleryGroupRenderer
This method is called on each root item when the Gallery changes (resize, item addition or removal) in order to update the gallery size. The implementation must update the item internal size (px) using setGroupSize(item, size); before returning.
-
getItem
public GalleryItem getItem(GalleryItem group, org.eclipse.swt.graphics.Point coords)
Description copied from class:AbstractGalleryGroupRenderer
Returns the item at coords relative to the parent group.- Overrides:
getItem
in classAbstractGridGroupRenderer
- Returns:
- See Also:
AbstractGridGroupRenderer.getItem( org.eclipse.nebula.widgets.gallery.GalleryItem, org.eclipse.swt.graphics.Point)
-
mouseDown
public boolean mouseDown(GalleryItem group, org.eclipse.swt.widgets.Event e, org.eclipse.swt.graphics.Point coords)
Description copied from class:AbstractGalleryGroupRenderer
This method can be implemented to handle mouse down events at the group level. Usually to interact with custom group UI.- Specified by:
mouseDown
in classAbstractGalleryGroupRenderer
- Parameters:
group
- The group on which the mouse click occurede
- The original mouse eventcoords
- The pointer coordinates relative to the group- Returns:
- false if event was handled by the group renderer and Gallery should not try to handle this event as a click on a GalleryItem.
- See Also:
AbstractGalleryGroupRenderer.mouseDown(org.eclipse.nebula.widgets.gallery.GalleryItem, org.eclipse.swt.widgets.Event, org.eclipse.swt.graphics.Point)
-
getSize
public org.eclipse.swt.graphics.Rectangle getSize(GalleryItem item)
Description copied from class:AbstractGalleryGroupRenderer
Returns the size of a group.- Overrides:
getSize
in classAbstractGridGroupRenderer
- Returns:
- See Also:
AbstractGridGroupRenderer.getSize( org.eclipse.nebula.widgets.gallery.GalleryItem)
-
-