Chart FX 7 for Java Server

com.softwarefx.chartfx.server.dataproviders
Class ListProvider

java.lang.Object
  extended by com.softwarefx.chartfx.server.dataproviders.ListProvider
All Implemented Interfaces:
IDataSource

public class ListProvider
extends Object
implements IDataSource

Provides access to the ListProvider object.

In many situations, the data is contained in a List, Collections or Arrays. Although you can use the Chart FX API to loop through array elements, read and populate the chart, you can do so in an easier way.

The ListProvider allows you to populate the chart from List and Arrays:

int[] valArray = {12, 15, 10, 7, 5};
ListProvider lstProvider = new ListProvider(valArray);
chart1.getDataSourceSettings().setDataSource(lstProvider);

You also load data from more than one array:

int[] series1 = {12, 15, 10};
int[] series2 = {20, 25, 7};
string[] labels = {"Yes", "No", "Don't know"};
ListProvider lstProvider = new ListProvider();
lstProvider.add(series1);
lstProvider.add(series2);
lstProvider.add(labels);
chart1.getDataSourceSettings().setDataSource(lstProvider);


Constructor Summary
ListProvider()
           
ListProvider(List<Object> list)
           
ListProvider(Object array)
           
 
Method Summary
 void add(List<Object> list)
          Appends the specified element to the ListProvider collection.
 void add(Object array)
          Appends the specified element to the ListProvider collection.
 void add(String colName, List<Object> list)
          Appends the specified element to the ListProvider collection.
 void add(String colName, Object array)
          Appends the specified element to the ListProvider collection.
 List<Object> getList()
          Gets the List.
 void setList(List<Object> list)
          Sets an IList object providing access to CollectionBase members used to modify the ListProvider list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListProvider

public ListProvider()

ListProvider

public ListProvider(Object array)

ListProvider

public ListProvider(List<Object> list)
Method Detail

add

public void add(Object array)

Appends the specified element to the ListProvider collection.

Parameters:
array - The array to add to the ListProvider collection.

add

public void add(List<Object> list)

Appends the specified element to the ListProvider collection.

Parameters:
list - The list to add to the ListProvider collection.

add

public void add(String colName,
                Object array)

Appends the specified element to the ListProvider collection.

Parameters:
colName - The colName to add to the ListProvider collection.
array - The array to add to the ListProvider collection.

add

public void add(String colName,
                List<Object> list)

Appends the specified element to the ListProvider collection.

Parameters:
colName - The colName to add to the ListProvider collection.
list - The list to add to the ListProvider collection.

getList

public List<Object> getList()

Gets the List. For more detail see setList(java.util.List).


setList

public void setList(List<Object> list)

Sets an IList object providing access to CollectionBase members used to modify the ListProvider list.

Remarks:
  • Using this property, you will have access to add and remove items from the ListProvider. You will also have access to count, insert and copy items as well as other supported properties and methods.

  • This property is used to modify ListProvider objects. Once a ListProvider has been created, this property may be used to access methods used to populate and administer the data object.

  • Once the ListProvider object has been configured with the desired data, you may assign the object to the chart using the DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource) property.

  • See Also:
    DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource), DataSourceSettings

    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.