ca.odell.glazedlists.swt
Class GlazedListsSWT

java.lang.Object
  extended by ca.odell.glazedlists.swt.GlazedListsSWT

public final class GlazedListsSWT
extends Object

A factory for creating all sorts of objects to be used with Glazed Lists.

Author:
Jesse Wilson

Method Summary
static
<E> ItemFormat<E>
beanItemFormat(String property)
          Creates a new ItemFormat that uses the string value of a JavaBean property as the formatted value of a list element.
static
<E> ItemFormat<E>
beanItemFormat(String property, String valueForNullElement)
          Creates a new ItemFormat that uses the string value of a JavaBean property as the formatted value of a list element.
static
<E> DefaultEventComboViewer<E>
eventComboViewer(EventList<E> source, org.eclipse.swt.widgets.Combo combo)
          Binds the contents of a Combo component to an EventList source.
static
<E> DefaultEventComboViewer<E>
eventComboViewer(EventList<E> source, org.eclipse.swt.widgets.Combo combo, ItemFormat<? super E> itemFormat)
          Binds the contents of a Combo component to an EventList source.
static
<E> DefaultEventComboViewer<E>
eventComboViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.Combo combo)
          Binds the contents of a Combo component to an EventList source.
static
<E> DefaultEventComboViewer<E>
eventComboViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.Combo combo, ItemFormat<? super E> itemFormat)
          Binds the contents of a Combo component to an EventList source.
static
<E> DefaultEventListViewer<E>
eventListViewer(EventList<E> source, org.eclipse.swt.widgets.List list)
          Creates a new List that displays and responds to changes in the source list.
static
<E> DefaultEventListViewer<E>
eventListViewer(EventList<E> source, org.eclipse.swt.widgets.List list, ItemFormat<? super E> itemFormat)
          Creates a new List that displays and responds to changes in the source list.
static
<E> DefaultEventListViewer<E>
eventListViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.List list)
          Creates a new List that displays and responds to changes in the source list.
static
<E> DefaultEventListViewer<E>
eventListViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.List list, ItemFormat<? super E> itemFormat)
          Creates a new List that displays and responds to changes in the source list.
static
<E> DefaultEventTableViewer<E>
eventTableViewer(EventList<E> source, org.eclipse.swt.widgets.Table table, TableFormat<? super E> tableFormat)
          Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList.
static
<E> DefaultEventTableViewer<E>
eventTableViewer(EventList<E> source, org.eclipse.swt.widgets.Table table, TableFormat<? super E> tableFormat, TableItemConfigurer<? super E> tableItemConfigurer)
          Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList.
static
<E> DefaultEventTableViewer<E>
eventTableViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.Table table, TableFormat<? super E> tableFormat)
          Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList.
static
<E> DefaultEventTableViewer<E>
eventTableViewerWithThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.Table table, TableFormat<? super E> tableFormat, TableItemConfigurer<? super E> tableItemConfigurer)
          Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList.
static boolean isSWTThreadProxyList(EventList list)
          Returns true if list is an EventList that fires all of its update events from the SWT event dispatch thread.
static org.eclipse.swt.events.SelectionListener lowerThresholdViewer(ThresholdList thresholdList, org.eclipse.swt.widgets.Scale scale)
          Creates a viewer that manipulates the lower bound of the specified ThresholdList based on changes to Scale selection.
static org.eclipse.swt.events.SelectionListener lowerThresholdViewer(ThresholdList thresholdList, org.eclipse.swt.widgets.Slider slider)
          Creates a viewer that manipulates the lower bound of the specified ThresholdList based on changes to the Slider.
static
<E> TransformedList<E,E>
swtThreadProxyList(EventList<E> source, org.eclipse.swt.widgets.Display display)
          Wraps the source in an EventList that fires all of its update events from the SWT user interface thread.
static org.eclipse.swt.events.SelectionListener upperThresholdViewer(ThresholdList thresholdList, org.eclipse.swt.widgets.Scale scale)
          Creates a viewer that manipulates the upper bound of the specified ThresholdList based on changes to Scale selection.
static org.eclipse.swt.events.SelectionListener upperThresholdViewer(ThresholdList thresholdList, org.eclipse.swt.widgets.Slider slider)
          Creates a viewer that manipulates the upper bound of the specified ThresholdList based on changes to the Slider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

swtThreadProxyList

public static <E> TransformedList<E,E> swtThreadProxyList(EventList<E> source,
                                                          org.eclipse.swt.widgets.Display display)
Wraps the source in an EventList that fires all of its update events from the SWT user interface thread.


isSWTThreadProxyList

public static boolean isSWTThreadProxyList(EventList list)
Returns true if list is an EventList that fires all of its update events from the SWT event dispatch thread.


beanItemFormat

public static <E> ItemFormat<E> beanItemFormat(String property)
Creates a new ItemFormat that uses the string value of a JavaBean property as the formatted value of a list element. If the list element or the propery value is null, the emtpy string is returned.

Parameters:
property - the JavaBean property name

beanItemFormat

public static <E> ItemFormat<E> beanItemFormat(String property,
                                               String valueForNullElement)
Creates a new ItemFormat that uses the string value of a JavaBean property as the formatted value of a list element. If the list element or the propery value is null, the given value is returned.

Parameters:
property - the JavaBean property name
valueForNullElement - string value to be used for a null element or property value

lowerThresholdViewer

public static org.eclipse.swt.events.SelectionListener lowerThresholdViewer(ThresholdList thresholdList,
                                                                            org.eclipse.swt.widgets.Slider slider)
Creates a viewer that manipulates the lower bound of the specified ThresholdList based on changes to the Slider. The ThresholdList linked to this viewer type will contain a range of Objects between the results of getSelection() and getMaximum() on the Slider.


lowerThresholdViewer

public static org.eclipse.swt.events.SelectionListener lowerThresholdViewer(ThresholdList thresholdList,
                                                                            org.eclipse.swt.widgets.Scale scale)
Creates a viewer that manipulates the lower bound of the specified ThresholdList based on changes to Scale selection. The ThresholdList linked to this viewer type will contain a range of Objects between the results of getSelection() and getMaximum() on the Scale.


upperThresholdViewer

public static org.eclipse.swt.events.SelectionListener upperThresholdViewer(ThresholdList thresholdList,
                                                                            org.eclipse.swt.widgets.Slider slider)
Creates a viewer that manipulates the upper bound of the specified ThresholdList based on changes to the Slider. The ThresholdList linked to this model type will contain a range of Objects between the results of getMinimum() and getSelection() on the Slider.


upperThresholdViewer

public static org.eclipse.swt.events.SelectionListener upperThresholdViewer(ThresholdList thresholdList,
                                                                            org.eclipse.swt.widgets.Scale scale)
Creates a viewer that manipulates the upper bound of the specified ThresholdList based on changes to Scale selection. The ThresholdList linked to this viewer type will contain a range of Objects between the results of getMinimum() and getSelection() on the Scale.


eventTableViewer

public static <E> DefaultEventTableViewer<E> eventTableViewer(EventList<E> source,
                                                              org.eclipse.swt.widgets.Table table,
                                                              TableFormat<? super E> tableFormat)
Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList. The Table is formatted with the specified TableFormat.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the row objects
table - the Table viewing the source objects
tableFormat - the object responsible for extracting column data from the row objects

eventTableViewer

public static <E> DefaultEventTableViewer<E> eventTableViewer(EventList<E> source,
                                                              org.eclipse.swt.widgets.Table table,
                                                              TableFormat<? super E> tableFormat,
                                                              TableItemConfigurer<? super E> tableItemConfigurer)
Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList. The Table is formatted with the specified TableFormat.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the row objects
table - the Table viewing the source objects
tableFormat - the object responsible for extracting column data from the row objects
tableItemConfigurer - responsible for configuring table items

eventTableViewerWithThreadProxyList

public static <E> DefaultEventTableViewer<E> eventTableViewerWithThreadProxyList(EventList<E> source,
                                                                                 org.eclipse.swt.widgets.Table table,
                                                                                 TableFormat<? super E> tableFormat)
Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList. The Table is formatted with the specified TableFormat. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the row objects
table - the Table viewing the source objects
tableFormat - the object responsible for extracting column data from the row objects

eventTableViewerWithThreadProxyList

public static <E> DefaultEventTableViewer<E> eventTableViewerWithThreadProxyList(EventList<E> source,
                                                                                 org.eclipse.swt.widgets.Table table,
                                                                                 TableFormat<? super E> tableFormat,
                                                                                 TableItemConfigurer<? super E> tableItemConfigurer)
Creates a new viewer for the given Table that updates the table contents in response to changes on the specified EventList. The Table is formatted with the specified TableFormat. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the row objects
table - the Table viewing the source objects
tableFormat - the object responsible for extracting column data from the row objects
tableItemConfigurer - responsible for configuring table items

eventListViewer

public static <E> DefaultEventListViewer<E> eventListViewer(EventList<E> source,
                                                            org.eclipse.swt.widgets.List list)
Creates a new List that displays and responds to changes in the source list. List elements will simply be displayed as the result of calling toString() on the contents of the source list.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the elements
list - the list

eventListViewer

public static <E> DefaultEventListViewer<E> eventListViewer(EventList<E> source,
                                                            org.eclipse.swt.widgets.List list,
                                                            ItemFormat<? super E> itemFormat)
Creates a new List that displays and responds to changes in the source list. List elements are formatted using the provided ItemFormat.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the elements
list - the list
itemFormat - an ItemFormat for formatting the displayed values

eventListViewerWithThreadProxyList

public static <E> DefaultEventListViewer<E> eventListViewerWithThreadProxyList(EventList<E> source,
                                                                               org.eclipse.swt.widgets.List list)
Creates a new List that displays and responds to changes in the source list. List elements will simply be displayed as the result of calling toString() on the contents of the source list. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the elements
list - the list

eventListViewerWithThreadProxyList

public static <E> DefaultEventListViewer<E> eventListViewerWithThreadProxyList(EventList<E> source,
                                                                               org.eclipse.swt.widgets.List list,
                                                                               ItemFormat<? super E> itemFormat)
Creates a new List that displays and responds to changes in the source list. List elements are formatted using the provided ItemFormat. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the elements
list - the list
itemFormat - an ItemFormat for formatting the displayed values

eventComboViewer

public static <E> DefaultEventComboViewer<E> eventComboViewer(EventList<E> source,
                                                              org.eclipse.swt.widgets.Combo combo)
Binds the contents of a Combo component to an EventList source. This allows the selection choices in a Combo to change dynamically to reflect chances to the source EventList. The String values displayed in the Combo compoment will be the result of calling toString() on the Objects found in source.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the elements
combo - the combo box

eventComboViewer

public static <E> DefaultEventComboViewer<E> eventComboViewer(EventList<E> source,
                                                              org.eclipse.swt.widgets.Combo combo,
                                                              ItemFormat<? super E> itemFormat)
Binds the contents of a Combo component to an EventList source. This allows the selection choices in a Combo to change dynamically to reflect chances to the source EventList. The String values displayed in the Combo component will be formatted using the provided ItemFormat.

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread. To do this programmatically, use Display.syncExec(Runnable) and wrap the source list (or some part of the source list's pipeline) using swtThreadProxyList(EventList, Display).

Parameters:
source - the EventList that provides the elements
combo - the combo box
itemFormat - an ItemFormat for formatting the displayed values

eventComboViewerWithThreadProxyList

public static <E> DefaultEventComboViewer<E> eventComboViewerWithThreadProxyList(EventList<E> source,
                                                                                 org.eclipse.swt.widgets.Combo combo)
Binds the contents of a Combo component to an EventList source. This allows the selection choices in a Combo to change dynamically to reflect chances to the source EventList. The String values displayed in the Combo compoment will be the result of calling toString() on the Objects found in source. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the elements
combo - the combo box

eventComboViewerWithThreadProxyList

public static <E> DefaultEventComboViewer<E> eventComboViewerWithThreadProxyList(EventList<E> source,
                                                                                 org.eclipse.swt.widgets.Combo combo,
                                                                                 ItemFormat<? super E> itemFormat)
Binds the contents of a Combo component to an EventList source. This allows the selection choices in a Combo to change dynamically to reflect chances to the source EventList. The String values displayed in the Combo component will be formatted using the provided ItemFormat. While holding a read lock, this method wraps the source list using swtThreadProxyList(EventList, Display).

The returned viewer is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the SWT event handler thread.

Parameters:
source - the EventList that provides the elements
combo - the combo box
itemFormat - an ItemFormat for formatting the displayed values


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58