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

Installing

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

Maven

    <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>swingxtrasbuilder</artifactId>
    <version>0.4</version>
  </dependency>

Gradle

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:swingxtrasbuilder:0.4'
}

All these dependencies can be downloaded from this directory too.

SwingxtrasBuilder requires Jdk5 to be installed.

Pre-requisites

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

Documentation

These are the nodes currently supported by SwingxtrasBuilder 0.4, 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.

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

 

(tick)

(tick)

can be set as the node's value if component: is present

 

component

JComponent

 

(tick)

(error)

can be set as the node's value if text: is present

 

style

BalloonStyle

 

(error)

(tick)

 

 

positioner

BalloonTipPositioner

 

(error)

(tick)

 

 

alignment

BalloonTip.Orientation

BalloonTip.Orientation

(error)

(error)

 

 

attachLocation

BalloonTip.AttachLocation

ALIGNED

(error)

(error)

 

 

horizontalOffset

int

16

(error)

(error)

 

 

verticalOffset

int

20

(error)

(error)

 

 

useCloseButton

boolean

true

(error)

(error)

 

 

 

 

 

 

 

accepts nested BallonStyles

customBalloonTip
[CustomBalloonTip]

text

String

 

(tick)

(tick)

can be set as the node's value if component: is present

 

component

JComponent

 

(tick)

(error)

can be set as the node's value if text: is present

 

offset

Rectangle

 

(tick)

(error)

can also be a List of 4 ints

 

style

BalloonStyle

 

(error)

(tick)

 

 

positioner

BalloonTipPositioner

 

(error)

(tick)

 

 

alignment

BalloonTip.Orientation

BalloonTip.Orientation

(error)

(error)

 

 

attachLocation

BalloonTip.AttachLocation

ALIGNED

(error)

(error)

 

 

horizontalOffset

int

16

(error)

(error)

 

 

verticalOffset

int

20

(error)

(error)

 

 

useCloseButton

boolean

true

(error)

(error)

 

 

 

 

 

 

 

accepts nested BallonStyles

tablecellBalloonTip
[TablecellBalloonTip]

text

String

 

(tick)

(tick)

can be set as the node's value if component: is present

 

component

JComponent

 

(tick)

(error)

can be set as the node's value if text: is present

 

row

int

 

(tick)

(error)

 

 

column

int

 

(tick)

(error)

 

 

style

BalloonStyle

 

(error)

(tick)

 

 

positioner

BalloonTipPositioner

 

(error)

(tick)

 

 

alignment

BalloonTip.Orientation

BalloonTip.Orientation

(error)

(error)

 

 

attachLocation

BalloonTip.AttachLocation

ALIGNED

(error)

(error)

 

 

horizontalOffset

int

16

(error)

(error)

 

 

verticalOffset

int

20

(error)

(error)

 

 

useCloseButton

boolean

true

(error)

(error)

 

 

 

 

 

 

 

accepts nested BallonStyles

edgedBalloonStyle
[EdgedBalloonStyle]

fillColor

Color

Color.WHITE

(error)

(error)

 

 

borderColor

Color

Color.BLACK

(error)

(error)

 

minimalBalloonStyle
[MinimalBalloonStyle]

fillColor

Color

Color.WHITE

(error)

(error)

 

 

arcWidth

int

5

(error)

(error)

 

modernBalloonStyle
[ModernBalloonStyle]

topColor

Color

Color.WHITE

(error)

(error)

 

 

bottomColor

Color

Color.LIGHT_GRAY

(error)

(error)

 

 

borderColor

Color

Color.BLACK

(error)

(error)

 

 

arcWidth

int

5

(error)

(error)

 

 

arcHeight

int

5

(error)

(error)

 

roundedBalloonStyle
[RoundedBalloonStyle]

fillColor

Color

Color.WHITE

(error)

(error)

 

 

borderColor

Color

Color.BLACK

(error)

(error)

 

 

arcWidth

int

5

(error)

(error)

 

 

arcHeight

int

5

(error)

(error)

 

texturedBalloonStyle
[TexturedBalloonStyle]

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.

 

borderColor

Color

Color.BLACK

(error)

(error)

 

 

arcWidth

int

5

(error)

(error)

 

 

arcHeight

int

5

(error)

(error)

 

 

 

 

 

 

 

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

 

(tick)

(error)

can also be set as the node's value

buddySupport

textField

JTextField

 

(tick)

(error)

can also be set as the node's value

L2fprod

 

 

 

 

 

 

Node

Property

Type

Default

Required

Bindable

Notes

jbannerPanel
[JBannerPanel]

 

 

 

 

 

 

jbuttonBar
[JButtonBar]

ui

String

 

(error)

(error)

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[]

 

(error)

(error)

filters which properties can be displayed

 

excludes

String[]

 

(error)

(error)

filters which properties can be displayed

 

skipSetup

boolean

 

(error)

(error)

skips registering all properties, you must specify nested properties then

 

 

 

 

 

 

requires a bean as value

propertySheetTable
[PropertySheetTable]

includes

String[]

 

(error)

(error)

filters which properties can be displayed

 

excludes

String[]

 

(error)

(error)

filters which properties can be displayed

propertySheetTableModel
[PropertySheetTableModel]

 

 

 

 

 

 

property
[MutableProperty]

name

String

 

(error)

(tick)

 

 

displayName

String

 

(error)

(tick)

 

 

shortDescription

String

 

(error)

(tick)

 

 

type

Class

 

(error)

(tick)

 

 

 

 

 

 

 

requires a bean as value

 

 

 

 

 

 

can be nested inside propertySheetPanel, propertySheetTable and property

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

Source Control

https://github.com/griffon/swingxtrasbuilder

Building

SwingxtrasBuilder 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