Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Excerpt

FlamingoBuilder is a Groovy builder for the open source Flamingo Swing component suite

Description

Flamingo's goal is to provide a small and cohesive set of powerful UI components with functionality similar to or superseding that of Vista Explorer and Office 2007. FlamingoBuilder puts the Flamingo Swing Component Suite right at your fingertips with an easy-to-use DSL, this builder can be used with any other SwingBuilder based builder (such as SwingXBuilder and JideBuilder).

Download

flamingobuilder-0.5

Installing

Drop flamingobuilder-0.5 into $GROOVY_HOME/lib along with its dependencies

Maven

Code Block
    <repository>
      <id>codehaus-release</id>
      <name>Codehaus</name>
      <url>http://repository.codehaus.org</url>
    </repository>
    <repository>
      <id>sonatype-release</id>
      <name>Sonatype</name>
      <url>http://repository.sonatype.org/content/groups/public</url>
    </repository>

  <dependency>
    <groupId>org.codehaus.griffon</groupId>
    <artifactId>flamingobuilder</artifactId>
    <version>0.5</version>
  </dependency>

Gradle

Code Block
repositories {
    mavenRepo name: 'Codehaus', urls: 'http://repository.codehaus.org'
    mavenRepo name: 'Sonatype', urls: 'http://repository.sonatype.org/content/groups/public'
}

dependencies {
    compile 'org.codehaus.griffon:flamingobuilder:0.5'
}

All these dependencies can be downloaded from this directory too.

Warning
titleWarning

Flamingo and FlamingoBuilder require Jdk6 to be installed.

Pre-requisites

Groovy 1.8.6 is the required minimum version to run FlamingoBuilder 0.5
It is recommended that you upgrade to the 1.8.x series in order to take advantage of

  • @Bindable and ASTTransformations
  • short binding syntax
  • numerous enhancements made to SwingBuilder and FactoryBuilderSupport

Documentation

These are the nodes currently supported by FlamingoBuilder 0.5, they are listed in groups. Component groups are a good way to organize nodes, they also serve another purpose when used with Griffon's CompositeBuilder.

Info
titleProperties

The following table summarizes the properties required by the node factories, there are other properties that can be set on the built nodes, for example all buttons inherit properties from javax.swing.AbstractButton.

FlamingoBreadcrumb

 

 

 

 

 

 

Node

Property

Type

Default

Required

Bindable

Notes

breadcrumbBar
[JBreadcrumbBar]

callback

BreadcrumbBarCallBack

 

(tick)

(error)

 

fileBreadcrumbBar
[BreadcrumbfileSelector]

fileSystemView

FileSystemView

 

(error)

(error)

 

 

useNativeIcons

boolean

false

(error)

(tick)

 

treeBreadcrumbBar
[BreadcrumbTreeAdapterSelector]

tree

JTree

 

(tick)

(error)

may specify a treeAdapter too

 

treeModel

TreeModel

 

(tick)

(error)

must also specify treeAdapter

 

treeAdapter

BreadcrumbTreeAdapterSelector.TreeAdapter

 

(tick)

(error)

 

 

rootVisible

boolean

true

(tick)

(error)

only if treemodel and treeAdapter are specified

FlamingoCommand

 

 

 

 

 

Node

Property

Type

Default

Required

Bindable

Notes

commandButton
[JCommandButton]

icon

ResizableIcon

 

(tick)

(error)

 

 

text

String

 

(tick)

(tick)

 

commandButtonPanel
[JCommandButton]

groupName

String

 

(tick)

(error)

must be specified on child element

 

groupIndex

int

 

(tick)

(error)

must be specified on child element

commandButtonStrip
[JCommandButtonStrip]

stripOrientation

JCommandButtonStrip.StripOrientation

HORIZONTAL

(error)

(error)

 

commandMenuButton
[JCommandMenuButton]

icon

ResizableIcon

 

(tick)

(error)

 

 

text

String

 

(tick)

(tick)

 

commandToggleButton
[JCommandToggleButton]

icon

ResizableIcon

 

(tick)

(error)

 

 

text

String

 

(tick)

(tick)

 

commandToggleButtonGroup
[CommandToggleButtonGroup]

buttonGroup

String

 

(tick)

(error)

must be specified on child element
child element must be a JCommandToggleButton

FlamingoIcons

 

 

 

 

 

Node

Property

Type

Default

Required

Bindable

Notes

arrowIcon

direction

int

SwingConstants.EAST

(error)

(error)

accepts SwingConstants.[EAST,WEST,NORTH,SOUTH] or literals

 

initialDim

Dimension

[48,48]

(error)

(error)

can also be a positive int value

 

doubleHeaded

boolean

false

(error)

(error)

direction has no effect, will always be SOUTH

decoratedIcon
[DecoratedResizableIcon]

icon

ResizableIcon

 

(tick)

(error)

 

 

decorators

IconDecorator[]

[]

(error)

(error)

 

emptyIcon
[emptyResizableIcon]

initialDim

Dimension

[48,48]

(error)

(error)

can also be a positive int value

filteredIcon
[FilteredResizableIcon]

icon

ResizableIcon

 

(tick)

(error)

 

 

filter

BufferedImageOp

 

(tick)

(error)

 

iconDeck
[IconDeckResizableIcon]

icons

ResizableIcon[]

 

(tick)

(error)

 

FlamingoSlider

 

 

 

 

 

svgIcon
[SvgBatikResizableIcon]

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

initialDim

Dimension

[48,48]

(error)

(error)

can also be a positive int value

 

zip

boolean

false

(error)

(error)

if the source is in svgz format

 

 

 

 

 

 

specify one of url, file, inputStream, resource or use a String as node value

wrapperIcon
[ImageWrapperResizableIcon]
[IcoWrapperResizableIcon]

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

initialDim

Dimension

[48,48]

(error)

(error)

can also be a positive int value

 

type

String

 

(tick)

(error)

value in ['ico','image'], must be used if inputStream is specified

 

 

 

 

 

 

specify one of url, file, inputStream, resource or use a String as node value

FlamingoSlider

 

 

 

 

 

Node

Property

Type

Default

Required

Bindable

Notes

flexiSlider
[JFlexiSlider]

 

 

 

 

 

must define at least 2 ranges and 1 controlPoint

range
[FlexiRangeModel.Range]

name

String

 

(error)

(error)

 

 

discrete

boolean

false

(error)

(error)

 

 

weight

Number

0.0

(error)

(error)

 

 

startingValue

Number

 

(error)

(error)

marks this range as the starting value of the slider. Value must be in [0..1]

controlPoint

icon

Icon

 

(tick)

(error)

 

 

text

String

 

(tick)

(error)

 

FlamingoRibbon

 

 

 

 

 

ribbonFrame
[JRibbonFrame]

 

 

 

 

 

same properties as frame()

ribbon
[JRibbon]

 

 

 

 

 

accepts nested ribbonTask, ribbonBand, ribbonFlowBand, ribbonContextualTaskGroup and ribbonApplicationMenu

 

 

 

 

 

 

any other nested component will be added to this ribbon's taskBar

ribbonTask
[JRibbonTask]

title

String

 

(error)

(error)

or set a String as the node's value

 

selected

boolean

 

(error)

(error)

 

 

 

 

 

 

 

nest it inside ribbonFrame, ribbon} or {{ribbonContextualTaskGroup

ribbonContextualTaskGroup
[RibbonContextualTaskGroup]

title

String

 

(error)

(error)

or set a String as the node's value

 

hueColor

Color

 

(error)

(error)

 

 

 

 

 

 

 

nest it inside ribbonFrame or {{ribbon}

ribbonBand
[JRibbonBand]

title

String

 

(error)

(error)

or set a String as the node's value

 

 

 

 

 

 

nest it inside ribbonFrame, ribbon} or {{ribbonTask

 

expandActionListener

ActionListener

 

(error)

(error)

 

 

actionPerformed

Closure

 

(error)

(error)

 

 

 

 

 

 

 

specify one of expandActionListener or actionPerformed

 

task

JRibbonTask

 

(error)

(error)

specify this if not nested inside a JRibbonTask

 

icon

Icon

 

(tick)

(error)

 

 

image

Image

 

(tick)

(error)

 

 

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

 

 

 

 

 

specify one of icon, image, url, file, inputStream, resource/class

 

ribbonElementPriority

RibbonElementPriority

 

(error)

(error)

must be specified on child element

 

 

 

 

 

 

any other nested component will be added as a RibbonComponent

ribbonFlowBand
[JFlowRibbonBand]

title

String

 

(error)

(error)

or set a String as the node's value

 

 

 

 

 

 

nest it inside ribbonFrame, ribbon} or {{ribbonTask

 

expandActionListener

ActionListener

 

(error)

(error)

 

 

actionPerformed

Closure

 

(error)

(error)

 

 

 

 

 

 

 

specify one of expandActionListener or actionPerformed

 

task

JRibbonTask

 

(error)

(error)

specify this if not nested inside a JRibbonTask

 

icon

Icon

 

(tick)

(error)

 

 

image

Image

 

(tick)

(error)

 

 

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

 

 

 

 

 

specify one of icon, image, url, file, inputStream, resource/class

 

ribbonElementPriority

RibbonElementPriority

 

(error)

(error)

must be specified on child element

 

 

 

 

 

 

any other nested component will be added as a FlowComponent

ribbonComponent
[JRibbonComponent]

component

JComponent

 

(tick)

(error)

or set a JComponent as the node's value

 

caption

String

 

(error)

(error)

 

 

icon

Icon

 

(tick)

(error)

 

 

image

Image

 

(tick)

(error)

 

 

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

 

 

 

 

 

specify one of icon, image, url, file, inputStream, resource/class

ribbonApplicationMenu
[RibbonApplicationMenu]

 

 

 

 

 

nest it inside ribbonFrame or {{ribbon}

ribbonApplicationMenuEntryPrimary
[RibbonApplicationMenuEntryPrimary]

text

String

 

(error)

(error)

or set a String as the node's value

 

mainActionListener

ActionListener

 

(error)

(error)

 

 

actionPerformed

Closure

 

(error)

(error)

 

 

 

 

 

 

 

specify one of mainActionListener or actionPerformed

 

entryKind

JCommandButton.CommandButtonKind

 

(tick)

(error)

 

 

icon

Icon

 

(tick)

(error)

 

 

image

Image

 

(tick)

(error)

 

 

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

 

 

 

 

 

specify one of icon, image, url, file, inputStream, resource/class

ribbonApplicationMenuEntryFooter
[RibbonApplicationMenuEntryFooter]

text

String

 

(error)

(error)

or set a String as the node's value

 

mainActionListener

ActionListener

 

(error)

(error)

 

 

actionPerformed

Closure

 

(error)

(error)

 

 

 

 

 

 

 

specify one of mainActionListener or actionPerformed

 

icon

Icon

 

(tick)

(error)

 

 

image

Image

 

(tick)

(error)

 

 

url

URL

 

(tick)

(error)

 

 

file

File

 

(tick)

(error)

can also be a String

 

inputStream

InputStream

 

(tick)

(error)

 

 

resource

String

 

(tick)

(error)

 

 

class

Class

 

(tick)

(error)

only required if resource is specified

 

 

 

 

 

 

specify one of icon, image, url, file, inputStream, resource/class

Developers

Andres Almiray

Source Control

https://github.com/griffon/flamingobuilder

Building

FlamingoBuilder uses Gradle as its build tool.

Contributing

Please contact the Griffon team members by e-mail.

Mailing List(s)

http://griffon.codehaus.org/Mailing+Lists

Issue tracker

http://jira.codehaus.org/browse/GRIFFON