public class Formatting extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Component c)
Returns a
String representation of the given AWT or Swing Component. |
static String |
inEdtFormat(Component c)
Returns a
String representation of the given AWT or Swing Component. |
static void |
register(ComponentFormatter formatter)
Registers the given
ComponentFormatter, replacing any other one previously registered for the same
supported component type. |
public static void register(@Nonnull ComponentFormatter formatter)
ComponentFormatter, replacing any other one previously registered for the same
supported component type.formatter - the formatter to register.@RunsInEDT @Nonnull public static String inEdtFormat(@Nonnull Component c)
String representation of the given AWT or Swing Component. This method is invoked in the
event dispatch thread (EDT.)c - the given Component.String representation of the given Component.@RunsInCurrentThread @Nonnull public static String format(@Nullable Component c)
Returns a String representation of the given AWT or Swing Component.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
c - the given Component.String representation of the given Component.Copyright © 2014 AssertJ. All rights reserved.