Jump to: navigation, search

Difference between revisions of "Nebula Gallery Explained"

m (Renderers)
 
Line 22: Line 22:
 
The Gallery Widget supports drag and drop and provides a dedicated drag and drop effect.  
 
The Gallery Widget supports drag and drop and provides a dedicated drag and drop effect.  
 
GalleryDragSourceEffect
 
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.

Latest revision as of 07:20, 25 June 2009

The Nebula Gallery widget


Model

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).


Gallery-groups.png

Renderers

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.