ca.odell.glazedlists.swing
Class CalculationsSwing

java.lang.Object
  extended by ca.odell.glazedlists.swing.CalculationsSwing

public final class CalculationsSwing
extends Object


Method Summary
static void bind(JLabel label, Calculation<?> calculation)
          Updates the given label with the latest value of a Calculation each time it reports a change.
static void bind(JLabel label, Calculation<?> calculation, Format formatter)
          Updates the given label with the latest value of a Calculation each time it reports a change.
static boolean isSwingThreadProxyCalculation(Calculation calc)
          Returns true if calc is a Calculation that fires all of its update events from the Swing event dispatch thread.
static
<E> Calculation<E>
swingThreadProxyCalculation(Calculation<? extends E> source)
          Wraps the source in a Calculation that fires all of its update events from the Swing event dispatch thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

swingThreadProxyCalculation

public static <E> Calculation<E> swingThreadProxyCalculation(Calculation<? extends E> source)
Wraps the source in a Calculation that fires all of its update events from the Swing event dispatch thread.


isSwingThreadProxyCalculation

public static boolean isSwingThreadProxyCalculation(Calculation calc)
Returns true if calc is a Calculation that fires all of its update events from the Swing event dispatch thread.


bind

public static void bind(JLabel label,
                        Calculation<?> calculation)
Updates the given label with the latest value of a Calculation each time it reports a change.

Parameters:
label - the JLabel displaying the value of the calculation
calculation - a source of a value that changes over time

bind

public static void bind(JLabel label,
                        Calculation<?> calculation,
                        Format formatter)
Updates the given label with the latest value of a Calculation each time it reports a change.

Parameters:
label - the JLabel displaying the value of the calculation
calculation - a source of a value that changes over time
formatter - used to format the raw value of the calculation into pretty display text


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58