String
representations of AWT and Swing Component
s.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
JComboBox es. |
JFileChooserFormatter |
Formatter for
JFileChooser s. |
JListFormatter |
Formatter for
JList s. |
JOptionPaneFormatter |
Formatter for
JOptionPane s. |
JTabbedPaneFormatter |
Formatter for
JTabbedPane s. |
JTableFormatter |
Formatter for
JTable s. |
JTreeFormatter |
Formatter for
JTree s. |
Formatters that create better and shorter String
representations of AWT and Swing Component
s.
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.