Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>Since the SwingXBuilder subclasses the SwingBuilder, the same operations apply to the SwingXBuilder.</p> <h2>New Features in SwingXBuilder</h2> <h3>Shortcutting/Aliasing attribute names</h3> <p>This has actually been around for a while but I only spoke about it to my mentors and not you guys.<br /> Sometimes attribute names are a bit long to type. In this example pulled from one of the unit tests, we can see how to add an alias for any property on a component. During builder parsing, the names are changed to their explicit forms.</p> <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> builder.addShortcut(CheckerboardPainter.class,"squareSize", "size") builder.addShortcut(CheckerboardPainter.class,"lightPaint", "light") builder.addShortcut(CheckerboardPainter.class,"darkPaint", "dark") def cp = builder.checkerboardPainter(size:40.0d, light:Color.WHITE, dark:Color.RED) </pre></td></tr></table> <p>Before you ask, I did play around a bit with the idea of aliasing the component names but that was a bit cumbersome.</p> <p>NOTE: Be careful when aliasing properties, making sure the alias doesn't already exist as a property name. For example, foreground and foregroundPainter exist for some components.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced