Package org.fest.swing.format
package org.fest.swing.format
Component formatters that create a
String
representation of GUI components.
FEST-Swing provides default component
formatters for all the Swing components in the JDK. Unlike the 'toString
' method
in Swing components, the provided component formatters display only the information that can help developers
solve problems in functional tests, excluding any information related to the
appearance of GUI components (e.g. colors, layouts, sizes, etc.)
The following are some examples of the output of the some of the provided component formatters.
org.fest.swing.test.TestFrame[name='frame', title='FormattingTest', enabled=true, showing=true]
javax.swing.JButton[name='button', text='A button', enabled=false]
javax.swing.JList[name='list', selectedValues=['One', 2], contents=['One', 2, 'Three', 4], selectionMode=MULTIPLE_INTERVAL_SELECTION, enabled=true]
javax.swing.JOptionPane[message='A message', messageType=ERROR_MESSAGE, optionType=DEFAULT_OPTION, enabled=true, showing=false]
javax.swing.JTabbedPane[name='tabbedPane', selectedTabIndex=1, selectedTabTitle='Second', tabCount=2, tabTitles=['First', 'Second'], enabled=true]
:
-
ClassDescriptionUnderstands a formatter that returns a
String
representation of a given
.Component
Understands a template for implementations of
.ComponentFormatter
Understands utility methods related to formatting.Understands a workaround to obtain aString
representation of anint
enumeration.Understands a formatter that uses introspection to display property values of a
.Component
Understands a formatter for
es.JComboBox
Understands a formatter for
s.JFileChooser
Understands a formatter for
s.JList
Understands a formatter for
s.JOptionPane
Understands a formatter for
s.JTabbedPane
Understands a formatter for
s.JTable
Understands a formatter for
s.JTree
Understands common Swingint
enumerations.