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
<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> // require(url:'jgoodies.com', jar:'animation', version:'1.2.0') // require(url:'jgoodies.com', jar:'forms', version:'1.1.0') // Based on the jgoodies animation tutorial class: // com.jgoodies.animation.tutorial.intro.BasicTextLabelIntro import static java.awt.Color.* import java.awt.Font import javax.swing.* import static com.jgoodies.animation.Animations.* import static com.jgoodies.animation.animations.BasicTextAnimation.defaultFade as fadeText import static com.jgoodies.animation.animations.BasicTextAnimations.defaultFade as fadeTexts import com.jgoodies.animation.* import com.jgoodies.animation.components.BasicTextLabel import com.jgoodies.forms.builder.PanelBuilder import com.jgoodies.forms.layout.CellConstraints import com.jgoodies.forms.layout.FormLayout class AnimateAction extends AbstractAction { def animation void actionPerformed(java.awt.event.ActionEvent e) { animation.addAnimationListener([ animationStarted: { ae -> enabled = false }, animationStopped: { ae -> enabled = true } ] as AnimationListener) new Animator(animation, 30 /*fps*/).start() } } def buildPanel(labels) { def layout = new FormLayout('fill:pref:grow', 'fill:pref:grow, p, p') def builder = new PanelBuilder(layout) def cc = new CellConstraints() builder.add(buildPreviewPanel(labels), cc.xy(1, 1)) builder.addSeparator('', cc.xy(1, 2)) builder.add(buildToolsPanel(labels), cc.xy(1, 3)) return builder.panel } def buildPreviewPanel(labels) { def layout = new FormLayout('fill:200dlu:grow', 'fill:100dlu:grow') def panel = new JPanel(layout) def cc = new CellConstraints() panel.background = WHITE panel.add(labels[0], cc.xy(1, 1)) panel.add(labels[1], cc.xy(1, 1)) return panel } def buildToolsPanel(labels) { def layout = new FormLayout('right:pref:grow', 'pref') def builder = new PanelBuilder(layout) builder.setDefaultDialogBorder() def cc = new CellConstraints() def action = new AnimateAction(animation:createAnimation(labels)) action.putValue('Name', 'Animate') builder.add(new JButton(action), cc.xy(1, 1)) return builder.panel } def createAnimation(labels) { Animation[] animations = [ pause(1000), fadeText(labels[0], 2500, 'Welcome To', DARK_GRAY), pause(1000), fadeText(labels[0], 3000, 'JGoodies Animation', DARK_GRAY), pause(1000), fadeTexts(labels[0], labels[1], 2000, -100, 'An open source framework|for time-based|' + 'real-time animations|in Java and Groovy.', DARK_GRAY), pause(1000), fadeTexts(labels[0], labels[1], 3000, 500, 'Main Features:', DARK_GRAY), pause(1000), fadeTexts(labels[0], labels[1], 1750, 0, 'Seamless|flexible|and powerful integration|' + 'with Java and Groovy.|Small library size.', DARK_GRAY), pause(1500) ] sequential(animations) } def buildLabel(font) { def label = new BasicTextLabel(' ') label.font = font label.opaque = false return label } def centerOnScreen(component) { def paneSize = component.size def screenSize = component.toolkit.screenSize int x = (screenSize.width - paneSize.width) / 2 int y = (screenSize.height - paneSize.height) * 0.45 component.setLocation(x, y) } def font = new Font('Tahoma', Font.BOLD, 18) def label1 = buildLabel(font) def label2 = buildLabel(font) def frame = new JFrame() frame.title = 'Groovy/JGoodies Animation Demo' frame.defaultCloseOperation = WindowConstants.EXIT_ON_CLOSE def panel = buildPanel([label1, label2]) frame.contentPane.add(panel) frame.pack() centerOnScreen(frame) frame.visible = true </pre></td></tr></table>
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