Skip to: Site menu | Main content

A Grails-like Rich Internet Framework

FlamingoBuilder Print

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

Installing

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

All these dependencies can be downloaded from this directory too.

Warning

Flamingo and FlamingoBuilder require Jdk6 to be installed.

Pre-requisites

Groovy 1.6.0 is the required minimum version to run FlamingoBuilder 0.2

It is recommended that you upgrade to the 1.6.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.2, 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.

Properties

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    
fileBreadcrumbBar

[BreadcrumbfileSelector]
fileSystemView FileSystemView    
  useNativeIcons boolean false  
treeBreadcrumbBar

[BreadcrumbTreeAdapterSelector]
tree JTree   may specify a treeAdapter too
  treeModel TreeModel   must also specify treeAdapter
  treeAdapter BreadcrumbTreeAdapterSelector.TreeAdapter    
  rootVisible boolean true only if treemodel and treeAdapter are specified
FlamingoCommand          
Node Property Type Default Required Bindable Notes
commandButton

[JCommandButton]
icon ResizableIcon    
  text String    
commandButtonPanel

[JCommandButton]
groupName String   must be specified on child element
  groupIndex int   must be specified on child element
commandButtonStrip

[JCommandButtonStrip]
stripOrientation JCommandButtonStrip.StripOrientation HORIZONTAL  
commandMenuButton

[JCommandMenuButton]
icon ResizableIcon    
  text String    
commandToggleButton

[JCommandToggleButton]
icon ResizableIcon    
  text String    
commandToggleButtonGroup

[CommandToggleButtonGroup]
buttonGroup String   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 accepts SwingConstants.[EAST,WEST,NORTH,SOUTH] or literals
  initialDim Dimension [48,48] can also be a positive int value
  doubleHeaded boolean false direction has no effect, will always be SOUTH
decoratedIcon

[DecoratedResizableIcon]
icon ResizableIcon    
  decorators IconDecorator[] []  
emptyIcon

[emptyResizableIcon]
initialDim Dimension [48,48] can also be a positive int value
filteredIcon

[FilteredResizableIcon]
icon ResizableIcon    
  filter BufferedImageOp    
iconDeck

[IconDeckResizableIcon]
icons ResizableIcon[]    
FlamingoSlider          
svgIcon

[SvgBatikResizableIcon]
url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
  initialDim Dimension [48,48] can also be a positive int value
  zip boolean false 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    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
  initialDim Dimension [48,48] can also be a positive int value
  type String   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    
  discrete boolean false  
  weight Number 0.0  
  startingValue Number   marks this range as the starting value of the slider. Value must be in [0..1]
controlPoint icon Icon    
  text String    
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   or set a String as the node's value
  selected boolean    
            nest it inside ribbonFrame, ribbon} or {{ribbonContextualTaskGroup
ribbonContextualTaskGroup

[RibbonContextualTaskGroup]
title String   or set a String as the node's value
  hueColor Color    
            nest it inside ribbonFrame or {{ribbon}
ribbonBand

[JRibbonBand]
title String   or set a String as the node's value
            nest it inside ribbonFrame, ribbon} or {{ribbonTask
  expandActionListener ActionListener    
  actionPerformed Closure    
            specify one of expandActionListener or actionPerformed
  task JRibbonTask   specify this if not nested inside a JRibbonTask
  icon Icon    
  image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
            specify one of icon, image, url, file, inputStream, resource/class
  ribbonElementPriority RibbonElementPriority   must be specified on child element
            any other nested component will be added as a RibbonComponent
ribbonFlowBand

[JFlowRibbonBand]
title String   or set a String as the node's value
            nest it inside ribbonFrame, ribbon} or {{ribbonTask
  expandActionListener ActionListener    
  actionPerformed Closure    
            specify one of expandActionListener or actionPerformed
  task JRibbonTask   specify this if not nested inside a JRibbonTask
  icon Icon    
  image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
            specify one of icon, image, url, file, inputStream, resource/class
  ribbonElementPriority RibbonElementPriority   must be specified on child element
            any other nested component will be added as a FlowComponent
ribbonComponent

[JRibbonComponent]
component JComponent   or set a JComponent as the node's value
  caption String    
  icon Icon    
  image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   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   or set a String as the node's value
  mainActionListener ActionListener    
  actionPerformed Closure    
            specify one of mainActionListener or actionPerformed
  entryKind JCommandButton.CommandButtonKind    
  icon Icon    
  image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
            specify one of icon, image, url, file, inputStream, resource/class
ribbonApplicationMenuEntryFooter

[RibbonApplicationMenuEntryFooter]
text String   or set a String as the node's value
  mainActionListener ActionListener    
  actionPerformed Closure    
            specify one of mainActionListener or actionPerformed
  icon Icon    
  image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified
            specify one of icon, image, url, file, inputStream, resource/class

Developers

Andres Almiray

Building

FlamingoBuilder uses Ant as its build tool, which means that if you want to

build your own version of FlamingoBuilder from source you'll need to have it

installed. Follow the instructions at http://ant.apache.org

Contributing

Please contact the Griffon team members by e-mail.