org.fest.swing.format
Class Formatting

java.lang.Object
  extended by org.fest.swing.format.Formatting

public class Formatting
extends Object

Understands utility methods related to formatting.

Author:
Alex Ruiz, Yvonne Wang

Method Summary
static String format(Component c)
          Returns a String representation of the given Component.
static String inEdtFormat(Component c)
          Returns a String representation of the given Component.
static void register(ComponentFormatter formatter)
          Registers the given formatter, replacing any other one previously registered for the same supported component type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public static void register(ComponentFormatter formatter)
Registers the given formatter, replacing any other one previously registered for the same supported component type.

Parameters:
formatter - the formatter to register.

inEdtFormat

@RunsInEDT
public static String inEdtFormat(Component c)
Returns a String representation of the given Component. This method is invoked in the event dispatch thread.

Parameters:
c - the given Component.
Returns:
a String representation of the given Component.

format

@RunsInCurrentThread
public static String format(Component c)
Returns a String representation of the given Component.

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
c - the given Component.
Returns:
a String representation of the given Component.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.