Chart FX for Java 6.5

SoftwareFX.ChartFX
Class ListProvider

java.lang.Object
  extended by SoftwareFX.ChartFX.ListProvider
All Implemented Interfaces:
IDataProvider

public final class ListProvider
extends java.lang.Object
implements IDataProvider

Provides access to the ListProvider object.

In many situations, the data is contained in a Lists, 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.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.setDataSource(lstProvider);


Constructor Summary
ListProvider()
           
ListProvider(java.util.List list)
           
ListProvider(java.lang.Object array)
           
 
Method Summary
 void add(java.util.List list)
          Appends the specified element to the ListProvider.
 void add(java.lang.Object array)
          Appends the specified element to the ListProvider.
 void add(java.lang.String colName, java.util.List list)
          Appends the specified element to the ListProvider.
 void add(java.lang.String colName, java.lang.Object array)
          Appends the specified element to the ListProvider.
 java.util.List getList()
          Gets the List.
 void setList(java.util.List list)
          Allows you to access the CollectionBase members used 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(java.lang.Object array)

ListProvider

public ListProvider(java.util.List list)
Method Detail

add

public void add(java.lang.Object array)

Appends the specified element to the ListProvider.

Parameters:
array - Array to add to the ListProvider.

add

public void add(java.util.List list)

Appends the specified element to the ListProvider.

Parameters:
list - List to add to the ListProvider.

add

public void add(java.lang.String colName,
                java.lang.Object array)

Appends the specified element to the ListProvider.

Parameters:
colName - ????
array - Array to add to the ListProvider.

add

public void add(java.lang.String colName,
                java.util.List list)

Appends the specified element to the ListProvider.

Parameters:
colName - ????
list - List to add to the ListProvider.

getList

public java.util.List getList()

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


setList

public void setList(java.util.List list)

Allows you to access the CollectionBase members used 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(SoftwareFX.ChartFX.IDataProvider) property.

  • See Also:
    DataSourceSettings.setDataSource(SoftwareFX.ChartFX.IDataProvider), DataSourceSettings.getDataType(int)

    http://www.softwarefx.com

    2007 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.