Skip to end of metadata
Go to start of metadata

Description

This plugin provides a coverflow component useful for displaying an image set. The component is based on Romain Guy's work explained at http://www.curious-creature.org/2005/07/09/a-music-shelf-in-java2d. In 2008 Kevin Long refactored the code to be more generic and component-like. See http://blog.codebeach.com/2008/02/imageflow-swing-component.html. Finally the components received another face lift in terms of observable properties and the usage of a ListModel to hold the items.

Installation

The current version of griffon-coverflow-plugin is 0.5
To install just issue the following command

Usage

The following nodes will become available on a View script upon installing this plugin

Node

Property

Type

Default

Required

Bindable

Notes

stackLayout
[StackLayout]

 

 

 

 

 

exposes BOTTOM and TOP as constraints

gradientPanel
[GradientPanel]

gradientStart

Color

Color(110, 110, 110)

(error)

(tick)

 

 

gradientEnd

Color

Color(0, 0, 0)

(error)

(tick)

 

imageFlow
[ImageFlow]

items

ImageFlowItem[]

 

(error)

(error)

alternate values may be of type List<ImageFlowItem>, ListModel or ImageFlow

 

amount

int

5

(error)

(tick)

 

 

sigma

double

 

(error)

(tick)

 

 

itemFont

Font

Font("Dialog", Font.PLAIN, 24)

(error)

(tick)

 

 

itemTextColor

Color

Color.WHITE

(error)

(tick)

 

 

itemSpacing

double

0.4

(error)

(tick)

 

imageFlowItem
[ImageFlowItem]

file

File

 

(error)

(error)

value can be a String. Alternate to url:, image:, inputStream:, resource:

 

url

URL

 

(error)

(error)

value can be a String. Alternate to file:, image:, inputStream:, resource:

 

image

Image

 

(error)

(error)

value can be a String. Alternate to file:, url:, inputStream:, resource:

 

inputStream

InputStream

 

(error)

(error)

Alternate to file:, url:, image:, resource:

 

resource

String

 

(error)

(error)

Alternate to file:, url:, image:, inputStream:

imageFlowItem can be nested inside imageFlow if and only if the model is mutable.

ImageFlow exposes the following methods to help you navigate and keep track of the current selection:

  • previous() - navigates one step backward.
  • next() - navigates one step forward.
  • getMinSelectionIndex() - returns the smallest selected cell index.
  • getMaxSelectionIndex() - returns the largest selected cell index.
  • getSelectedIndex() - returns the first selected index; returns -1 if there is no selected item.
  • getSelectedValue() - returns the first selected value, or null if the selection is empty.
  • isSelectedIndex(int) - returns true if the specified index is selected.
  • setSelectedIndex(int) - selects a single cell.
  • addListSelectionListener(ListSelectionListener) - adds a listener to the list that's notified each time a change to the selection occur.
  • removeListSelectionListener(ListSelectionListener) - removes a listener to the list that's notified each time a change to the selection occur.

The following view script shows a basic usage. Not that imageFlow allows nesting of imageFlowItem given that its defualt model is mutable.

History

Version

Date

Notes

0.5

02-25-11

Automatic reload when dataModel changes

0.4

02-09-11

Fixes GRIFFON-321

0.3

07-22-10

Release sync with Griffon 0.9

0.2

03-01-10

Upgraded to Griffon 0.3

0.1

10-17-09

first release

  • No labels