String representations of AWT and Swing Components.See: Description
| Interface | Description |
|---|---|
| ComponentFormatter |
Returns a
String representation of a given AWT or Swing Component. |
| Class | Description |
|---|---|
| ComponentFormatterTemplate |
Template for implementations of
ComponentFormatter. |
| Formatting |
Utility methods related to formatting.
|
| IntrospectionComponentFormatter |
Formatter that uses introspection to display property values of an AWT or Swing
Component. |
| JComboBoxFormatter |
Formatter for
JComboBoxes. |
| JFileChooserFormatter |
Formatter for
JFileChoosers. |
| JListFormatter |
Formatter for
JLists. |
| JOptionPaneFormatter |
Formatter for
JOptionPanes. |
| JTabbedPaneFormatter |
Formatter for
JTabbedPanes. |
| JTableFormatter |
Formatter for
JTables. |
| JTreeFormatter |
Formatter for
JTrees. |
Formatters that create better and shorter String representations of AWT and Swing Components.
AssertJ-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.assertj.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]
Copyright © 2014–2019 AssertJ. All rights reserved.