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
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
<img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD0zfGluZGVudD0wcHh9&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="indent=0px|maxLevel=3"> <p>(Automatically generated from BeanInfo)</p> <h3>Generated Object</h3> <p>A javax.swing.JOptionPane is returned, unless the user passes in a subclass of JOptionPane as the value argument, in which case the value argument is returned.</p> <h3>Attributes</h3> <h4>Declared in javax.swing.JOptionPane</h4> <ul> <li><strong>UI</strong> <OptionPaneUI> The UI object that implements the optionpane's LookAndFeel</li> <li><strong>icon</strong> <Icon> The option pane's type icon.</li> <li><strong>initialSelectionValue</strong> <Object> The option pane's initial selection value object.</li> <li><strong>initialValue</strong> <Object> The option pane's initial value object.</li> <li><strong>inputValue</strong> <Object> The option pane's input value object.</li> <li><strong>message</strong> <Object> The optionpane's message object.</li> <li><strong>messageType</strong> <int> The option pane's message type.</li> <li><strong>optionType</strong> <int> The option pane's option type.</li> <li><strong>options</strong> <Object[]> The option pane's options objects.</li> <li><strong>selectionValues</strong> <Object[]> The option pane's selection values.</li> <li><strong>value</strong> <Object> The option pane's value object.</li> <li><strong>wantsInput</strong> <boolean> Flag which allows the user to input a value.</li> </ul> <ul> <li><strong>maxCharactersPerLineCount</strong> <int></li> </ul> <h4>Declared in javax.swing.JComponent</h4> <ul> <li><strong>autoscrolls</strong> <boolean> Determines if this component automatically scrolls its contents when dragged.</li> <li><strong>border</strong> <Border> The component's border.</li> <li><strong>componentPopupMenu</strong> <JPopupMenu> Popup to show</li> <li><strong>debugGraphicsOptions</strong> <int> Diagnostic options for graphics operations.</li> <li><strong>inheritsPopupMenu</strong> <boolean> Whether or not the JPopupMenu is inherited</li> <li><strong>inputVerifier</strong> <InputVerifier> The component's input verifier.</li> <li><strong>opaque</strong> <boolean> The component's opacity</li> <li><strong>toolTipText</strong> <String> The text to display in a tool tip.</li> <li><strong>transferHandler</strong> <TransferHandler> Mechanism for transfer of data to and from the component</li> <li><strong>verifyInputWhenFocusTarget</strong> <boolean> Whether the Component verifies input before accepting focus.</li> </ul> <ul> <li><strong>UIClassID</strong> <String></li> <li><strong>accessibleContext</strong> <AccessibleContext></li> <li><strong>actionMap</strong> <ActionMap></li> <li><strong>doubleBuffered</strong> <boolean></li> <li><strong>graphics</strong> <Graphics></li> <li><strong>height</strong> <int></li> <li><strong>managingFocus</strong> <boolean></li> <li><strong>nextFocusableComponent</strong> <Component></li> <li><strong>optimizedDrawingEnabled</strong> <boolean></li> <li><strong>paintingTile</strong> <boolean></li> <li><strong>registeredKeyStrokes</strong> <KeyStroke[]></li> <li><strong>requestFocusEnabled</strong> <boolean></li> <li><strong>rootPane</strong> <JRootPane></li> <li><strong>topLevelAncestor</strong> <Container></li> <li><strong>validateRoot</strong> <boolean></li> <li><strong>visibleRect</strong> <Rectangle></li> <li><strong>width</strong> <int></li> <li><strong>x</strong> <int></li> <li><strong>y</strong> <int></li> </ul> <h4>Declared in java.awt.Container</h4> <ul> <li><strong>alignmentX</strong> <float></li> <li><strong>alignmentY</strong> <float></li> <li><strong>componentCount</strong> <int></li> <li><strong>components</strong> <Component[]></li> <li><strong>focusCycleRoot</strong> <boolean></li> <li><strong>focusTraversalPolicy</strong> <FocusTraversalPolicy></li> <li><strong>focusTraversalPolicyProvider</strong> <boolean></li> <li><strong>focusTraversalPolicySet</strong> <boolean></li> <li><strong>insets</strong> <Insets></li> <li><strong>layout</strong> <LayoutManager></li> <li><strong>maximumSize</strong> <Dimension></li> <li><strong>minimumSize</strong> <Dimension></li> <li><strong>preferredSize</strong> <Dimension></li> </ul> <h4>Declared in java.awt.Component</h4> <ul> <li><strong>background</strong> <Color></li> <li><strong>enabled</strong> <boolean></li> <li><strong>focusable</strong> <boolean></li> <li><strong>font</strong> <Font></li> <li><strong>foreground</strong> <Color></li> <li><strong>name</strong> <String></li> <li><strong>visible</strong> <boolean></li> </ul> <h3>Events</h3> <h4>Declared in javax.swing.JComponent</h4> <ul> <li><strong>vetoableChange</strong> (PropertyChangeEvent) - part of VetoableChangeListener</li> <li><strong>ancestorMoved</strong> (AncestorEvent) - part of AncestorListener</li> <li><strong>ancestorAdded</strong> (AncestorEvent) - part of AncestorListener</li> <li><strong>ancestorRemoved</strong> (AncestorEvent) - part of AncestorListener</li> </ul> <h4>Declared in java.awt.Container</h4> <ul> <li><strong>componentAdded</strong> (ContainerEvent) - part of ContainerListener</li> <li><strong>componentRemoved</strong> (ContainerEvent) - part of ContainerListener</li> </ul> <h4>Declared in java.awt.Component</h4> <ul> <li><strong>keyPressed</strong> (KeyEvent) - part of KeyListener</li> <li><strong>keyReleased</strong> (KeyEvent) - part of KeyListener</li> <li><strong>keyTyped</strong> (KeyEvent) - part of KeyListener</li> <li><strong>componentHidden</strong> (ComponentEvent) - part of ComponentListener</li> <li><strong>componentMoved</strong> (ComponentEvent) - part of ComponentListener</li> <li><strong>componentResized</strong> (ComponentEvent) - part of ComponentListener</li> <li><strong>componentShown</strong> (ComponentEvent) - part of ComponentListener</li> <li><strong>hierarchyChanged</strong> (HierarchyEvent) - part of HierarchyListener</li> <li><strong>mouseClicked</strong> (MouseEvent) - part of MouseListener</li> <li><strong>mouseEntered</strong> (MouseEvent) - part of MouseListener</li> <li><strong>mouseExited</strong> (MouseEvent) - part of MouseListener</li> <li><strong>mousePressed</strong> (MouseEvent) - part of MouseListener</li> <li><strong>mouseReleased</strong> (MouseEvent) - part of MouseListener</li> <li><strong>mouseDragged</strong> (MouseEvent) - part of MouseMotionListener</li> <li><strong>mouseMoved</strong> (MouseEvent) - part of MouseMotionListener</li> <li><strong>propertyChange</strong> (PropertyChangeEvent) - part of PropertyChangeListener</li> <li><strong>ancestorMoved</strong> (HierarchyEvent) - part of HierarchyBoundsListener</li> <li><strong>ancestorResized</strong> (HierarchyEvent) - part of HierarchyBoundsListener</li> <li><strong>focusGained</strong> (FocusEvent) - part of FocusListener</li> <li><strong>focusLost</strong> (FocusEvent) - part of FocusListener</li> <li><strong>mouseWheelMoved</strong> (MouseWheelEvent) - part of MouseWheelListener</li> <li><strong>caretPositionChanged</strong> (InputMethodEvent) - part of InputMethodListener</li> <li><strong>inputMethodTextChanged</strong> (InputMethodEvent) - part of InputMethodListener</li> </ul> <h3>Content</h3> <h3>Usage</h3> <h3>Examples</h3> <p><br class="atl-forced-newline" /></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> import groovy.swing.SwingBuilder import javax.swing.* def swingBuilder = new SwingBuilder() def options = ['1995', '2003', '2007'] def pane = swingBuilder.optionPane(message:'Groovy starts in ', selectionValues:options, optionType:JOptionPane.CLOSED_OPTION) def dialog = pane.createDialog(null, 'worthless message') dialog.show() pane = swingBuilder.optionPane( message:'Are you sure that Groovy starts in ', selectionValues:options, initialSelectionValue:pane.getInputValue(), messageType:JOptionPane.QUESTION_MESSAGE, optionType:JOptionPane.OK_CANCEL_OPTION) dialog = pane.createDialog(null, 'worthless message') dialog.show() def choice def lastPane = swingBuilder.optionPane() choice = lastPane.showOptionDialog( null, 'worthless message', 'Last chance : Groovy starts in ', JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options as Object[], pane.getInputValue()) println options[choice] </pre></td></tr></table> <p><br class="atl-forced-newline" /></p> <h3>Observable Attributes</h3> <ul> <li>UI</li> <li>alignmentX</li> <li>alignmentY</li> <li>background</li> <li>border</li> <li>component</li> <li>componentCount</li> <li>componentPopupMenu</li> <li>components</li> <li>containerListeners</li> <li>enabled</li> <li>focusCycleRoot</li> <li>focusTraversalKeys</li> <li>focusTraversalPolicy</li> <li>focusTraversalPolicyProvider</li> <li>focusTraversalPolicySet</li> <li>focusable</li> <li>font</li> <li>foreground</li> <li>icon</li> <li>inheritsPopupMenu</li> <li>initialSelectionValue</li> <li>initialValue</li> <li>inputValue</li> <li>inputVerifier</li> <li>insets</li> <li>layout</li> <li>maximumSize</li> <li>message</li> <li>messageType</li> <li>minimumSize</li> <li>opaque</li> <li>optionType</li> <li>options</li> <li>preferredSize</li> <li>selectionValues</li> <li>transferHandler</li> <li>value</li> <li>verifyInputWhenFocusTarget</li> <li>wantsInput</li> </ul>
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