Skip to: Site menu | Main content

A Grails-like Rich Internet Framework

SwingxtrasBuilder Print

SwingxtrasBuilder is a Groovy builder for an heterogeneous collection of Swing components

Description

SwingxtrasBuilder is a Groovy builder for an heterogeneous collection of Swing components. Those components are not packaged on a suite or their suite is too small to warrant a builder of their own.

Download

swingxtrasbuilder-0.1

Installing

Drop swingxtrasbuilder-0.1 into $GROOVY_HOME/lib along with its dependencies

All these dependencies can be downloaded from this directory too.

Warning

SwingxtrasBuilder requires Jdk5 to be installed.

Pre-requisites

Groovy 1.6.0 is the required minimum version to run SwingxtrasBuilder 0.1

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 SwingxtrasBuilder 0.1, they are listed in alphabetic order according the group that contains them. 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 text components inherit properties from javax.swing.JTextComponent.

BalloonTip            
Node Property Type Default Required Bindable Notes
balloontip

[BalloonTip]
text String   can be set as the node's value if component: is present
  component JComponent   can be set as the node's value if text: is present
  style BalloonStyle    
  positioner BalloonTipPositioner    
  alignment BalloonTip.Orientation BalloonTip.Orientation  
  attachLocation BalloonTip.AttachLocation ALIGNED  
  horizontalOffset int 16  
  verticalOffset int 20  
  useCloseButton boolean true  
            accepts nested BallonStyles
customBalloonTip

[CustomBalloonTip]
text String   can be set as the node's value if component: is present
  component JComponent   can be set as the node's value if text: is present
  offset Rectangle   can also be a List of 4 ints
  style BalloonStyle    
  positioner BalloonTipPositioner    
  alignment BalloonTip.Orientation BalloonTip.Orientation  
  attachLocation BalloonTip.AttachLocation ALIGNED  
  horizontalOffset int 16  
  verticalOffset int 20  
  useCloseButton boolean true  
            accepts nested BallonStyles
tablecellBalloonTip

[TablecellBalloonTip]
text String   can be set as the node's value if component: is present
  component JComponent   can be set as the node's value if text: is present
  row int    
  column int    
  style BalloonStyle    
  positioner BalloonTipPositioner    
  alignment BalloonTip.Orientation BalloonTip.Orientation  
  attachLocation BalloonTip.AttachLocation ALIGNED  
  horizontalOffset int 16  
  verticalOffset int 20  
  useCloseButton boolean true  
            accepts nested BallonStyles
edgedBalloonStyle

[EdgedBalloonStyle]
fillColor Color Color.WHITE  
  borderColor Color Color.BLACK  
minimalBalloonStyle

[MinimalBalloonStyle]
fillColor Color Color.WHITE  
  arcWidth int 5  
modernBalloonStyle

[ModernBalloonStyle]
topColor Color Color.WHITE  
  bottomColor Color Color.LIGHT_GRAY  
  borderColor Color Color.BLACK  
  arcWidth int 5  
  arcHeight int 5  
roundedBalloonStyle

[RoundedBalloonStyle]
fillColor Color Color.WHITE  
  borderColor Color Color.BLACK  
  arcWidth int 5  
  arcHeight int 5  
texturedBalloonStyle

[TexturedBalloonStyle]
image Image    
  url URL    
  file File   can also be a String
  inputStream InputStream    
  resource String    
  class Class   only required if resource is specified.
  borderColor Color Color.BLACK  
  arcWidth int 5  
  arcHeight int 5  
            specify one of image, url, file, inputStream, resource.
XSwingX            
Node Property Type Default Required Bindable Notes
searchField

[JXSearchField]
           
promptArea

[JXTextArea]
          this is not the same JXTextArea from SwingX
promptField

[JXTextField]
          this is not the same JXTextField from SwingX
promptFormattedField

[JXFormattedTextField]
          this is not the same JXFormattedTextField from SwingX
promptSupport component JComponent   can also be set as the node's value
buddySupport textField JTextField   can also be set as the node's value
L2fprod            
Node Property Type Default Required Bindable Notes
jbannerPanel

[JBannerPanel]
           
jbuttonBar

[JButtonBar]
ui String   values must be one of [blue, mozilla, icon packager]
linkButton

[JLinkButton]
           
jtipOfTheDay

[JTipOfTheDay]
           
jdefaultTipModel

[DefaultIpModel]
           
jdefaultTip

[DefaultTip]
           
jtaskPaneGroup

[JTaskPaneGroup]
           
jtaskPane

[JTaskPane]
           
outlookBar

[OutlookBar]
          same properties as a tabbedPane
directoryChooser

[JDirectoryChooser]
           
fontChooser

[JFontChooser]
           
percentLayout

[PercentLayout]
           
propertySheetPanel

[PropertySheetPanel]
includes String[]   filters which properties can be displayed
  excludes String[]   filters which properties can be displayed
  skipSetup boolean   skips registering all properties, you must specify nested properties then
            requires a bean as value
propertySheetTable

[PropertySheetTable]
includes String[]   filters which properties can be displayed
  excludes String[]   filters which properties can be displayed
propertySheetTableModel

[PropertySheetTableModel]
           
property

[MutableProperty]
name String    
  displayName String    
  shortDescription String    
  type Class    
            requires a bean as value
            can be nested inside propertySheetPanel, propertySheetTable and property
Additional properties on Window/JFrame

The following properties are now enabled to every Window/JFrame

installRepaintListener boolean useful for SourceLists and ITunesTable to properly update their visible state.
makeLeopardStyle boolean make your JFrame look native.

Developers

Andres Almiray

Building

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

build your own version of SwingxtrasBuilder 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.