Description
Mac Widgets for Java are a collection of widgets seen in OS X applications, offered in a Java API. These widgets help Java developers create more Mac-like applications. There usage is not restricted to Mac though, as they will render across platforms. This builder follows the same principles as SwingBuilder and can be combined with other SwingBuilder based builders or used in a standalone fashion.
Download
Installing
Drop macwidgetsbuilder-0.5 into $GROOVY_HOME/lib along with its dependencies
Maven
Gradle
All these dependencies can be downloaded from this directory too.
| Warning MacWidgets and MacWidgetsBuilder require Jdk5 to be installed. |
Pre-requisites
Groovy 1.8.6 is the required minimum version to run MacWidgetsBuilder 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 MacWidgetsBuilder 0.5, 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 buttons inherit properties from |
MacWidgets |
|
|
|
|
|
|
Node | Property | Type | Default | Required | Bindable | Notes |
|---|---|---|---|---|---|---|
bottomBar | size | BottomBarSize | BottomBarSize.SMALL |
|
|
|
| locationOnBar | int |
|
|
| one of SwingConstants.[LEFT,CENTER,RIGHT] or its literal equivalent. Must be specified on children elements. |
| spacer | int |
|
|
| Add a |
componentStatusBar | locationOnBar | int |
|
|
| one of SwingConstants.[LEFT,CENTER,RIGHT] or its literal equivalent. Must be specified on children elements. |
componentTopBar | locationOnBar | int |
|
|
| one of SwingConstants.[LEFT,CENTER,RIGHT] or its literal equivalent. Must be specified on children elements. |
| spacer | int |
|
|
| Add a |
emphasizedLabel | text | String |
|
|
| may also specify a |
| focusedColor | Color |
|
|
| must set two other color properties. |
| unfocusedColor | Color |
|
|
| must set two other color properties. |
| emphasisColor | Color |
|
|
| must set two other color properties. |
hudWindow |
|
|
|
|
| proxies all properties that can be set on a |
hudLabel |
|
|
|
|
| nest it inside |
hudButton |
|
|
|
|
| nest it inside |
hudTextField |
|
|
|
|
| nest it inside |
hudCheckBox |
|
|
|
|
| nest it inside |
hudComboBox |
|
|
|
|
| nest it inside |
iappScrollPane |
|
|
|
|
| same as a |
imageButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| mask | Icon |
|
|
|
|
|
|
|
|
|
| specify one of |
itunesTable |
|
|
|
|
| same as |
labeledComponentGroup | text | String |
|
|
| alternatively specify a String as value. |
| label | String |
|
|
| alias for |
macGradientButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| actionListener | ActionListener |
|
|
|
|
| actionPerformed | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
macGradientPopdownButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| popupMenuCustomizer | PopupMenuCustomizer |
|
|
|
|
| customizePopup | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
macButtonAddItem16 | segmentedPosition | String |
|
|
|
|
macButtonAddItem18 | segmentedPosition | String |
|
|
|
|
macButtonRemoveItem16 | segmentedPosition | String |
|
|
|
|
macButtonRemoveItem18 | segmentedPosition | String |
|
|
|
|
macButtonLock | segmentedPosition | String |
|
|
|
|
macButtonSourceViewNormal | segmentedPosition | String |
|
|
|
|
preferencesTab | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| text | String |
|
|
|
|
| actionListener | ActionListener |
|
|
|
|
| actionPerformed | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
preferencesTabBar | unified | boolean | false |
|
|
|
sourceList | sourceListCategoryClicked | Closure |
|
|
| will promote it to a |
| sourceListItemClicked | Closure |
|
|
| will promote it to a |
| sourceListItemSelected | Closure |
|
|
| will promote it to a |
sourceListCategory |
|
|
|
|
| value must be a String. |
sourceListItem | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| text | String |
|
|
|
|
|
|
|
|
|
| specify one of |
sourceListControlBar |
|
|
|
|
|
|
sourceListSplitPane |
|
|
|
|
| requires a |
sourceListContextMenuProvider | listContextMenu | Closure |
|
|
| must specify as a child closure. Accepts a |
| categoryContextMenu | Closure |
|
|
| must specify as a child closure. Accepts |
| itemContextMenu | Closure |
|
|
| must specify as a child closure. Accepts |
controlBarButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| actionListener | ActionListener |
|
|
|
|
| actionPerformed | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
controlBarPopdownButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| popupMenuCustomizer | PopupMenuCustomizer |
|
|
|
|
| customizePopup | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
spacer | width | int | 0 |
|
|
|
| height | int | 0 |
|
|
|
unifiedToolBar | locationOnBar | int |
|
|
| one of SwingConstants.[LEFT,CENTER,RIGHT] or its literal equivalent. Must be specified on children elements. |
| spacer | int |
|
|
| Add a |
preferencesBarButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| button | AbstractButton |
|
|
|
|
| actionListener | ActionListener |
|
|
|
|
| actionPerformed | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
unifiedToolBarButton | url | URL |
|
|
|
|
| file | File |
|
|
| can also be a |
| inputStream | InputStream |
|
|
|
|
| resource | String |
|
|
|
|
| class | Class |
|
|
| only required if |
| icon | Icon |
|
|
|
|
| button | AbstractButton |
|
|
|
|
| actionListener | ActionListener |
|
|
|
|
| actionPerformed | Closure |
|
|
| alternative to |
|
|
|
|
|
| specify one of |
| Additional properties on Window/JFrame The following properties are now enabled to every
|
Developers
Andres Almiray
Source Control
https://github.com/griffon/macwidgetsbuilder
Building
MAcwidgetsBuilder 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