use of org.netxms.nebula.widgets.gallery.DefaultGalleryGroupRenderer in project netxms by netxms.
the class ImageSelectionDialog method createDialogArea.
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
final FillLayout layout = new FillLayout();
dialogArea.setLayout(layout);
gallery = new Gallery(dialogArea, SWT.V_SCROLL);
DefaultGalleryGroupRenderer galleryGroupRenderer = new DefaultGalleryGroupRenderer();
galleryGroupRenderer.setMinMargin(2);
galleryGroupRenderer.setItemHeight(48);
galleryGroupRenderer.setItemWidth(48);
galleryGroupRenderer.setAutoMargin(true);
galleryGroupRenderer.setAlwaysExpanded(true);
gallery.setGroupRenderer(galleryGroupRenderer);
DefaultGalleryItemRenderer itemRenderer = new DefaultGalleryItemRenderer();
gallery.setItemRenderer(itemRenderer);
gallery.addSelectionListener(this);
gallery.addMouseListener(this);
ImageProvider.getInstance(getShell().getDisplay()).addUpdateListener(this);
refreshImages();
return dialogArea;
}
Aggregations