Nebula Gallery Explained
The Nebula Gallery widget
Gallery is the main widget, which can contain 2 levels of items (GalleryItem). First level ones are called groups and are drawn by the GroupRenderer. Others are items and drawn by the Item Renderer.
The widget draws group one after another, either vertically or horizontally (and never both).
The Gallery widget comes with 4 renderers :
Groups renderers : DefaultGroupRenderer, NoGroupRenderer Item renderers : DefaultItemRenderer, ListItemRenderer
New renderers can easily be created to add new behaviors and styles.
Drag and Drop
The Gallery Widget supports drag and drop and provides a dedicated drag and drop effect. GalleryDragSourceEffect
Colors and Font
Colors and font can be defined at different levels :
- Gallery#setBackground(), setForeground(), setFont() : Globally (groups AND items)
- Group render : fonts and colors can be set for all groups and override Gallery settings. Note that a group render can offer more settings than the Gallery/GalleryItem API.
- Item render : fonts and colors can be set for all items and override Gallery settings. Note that an item render can offer more settings than the Gallery/GalleryItem API.
- GalleryItem : font and colors can be overriden at the item level.