|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.dataproviders.TextProvider
public class TextProvider
Provides access to the TextProvider object and allows the user to databind a text file to the Chart.
Chart FX can also read information stored in text files or text streams. Both Tab Separated Values (TSV) and Comma Separated Values (CSV) are valid and can be accessed by Chart FX by default, but other formats can also be used.
It is used through the DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
property of the DataSourceSettings
Class
as follows:
TextProvider txtProvider = new TextProvider("c:\\TextFile.txt");
chart1.getDataSourceSettings().setDataSource(txtProvider);
Constructor Summary | |
---|---|
TextProvider()
|
|
TextProvider(Reader reader)
|
|
TextProvider(String fileName)
|
Method Summary | |
---|---|
void |
close()
Used to close the connection to the text datasource linked to the TextProvider object. |
Locale |
getCulture()
Gets the Culture. |
String |
getDateFormat()
Gets the DateFormat. |
String |
getSeparators()
Gets the Separators. |
void |
open(Reader reader)
Used to open the connection to a text datasource linked to the TextProvider object. |
void |
open(String fileName)
Used to open the connection to a text datasource linked to the TextProvider object. |
void |
setCulture(Locale value)
Sets a value allowing you to localize the text provider for language and region specific data. |
void |
setDateFormat(String value)
Sets a value allowing you to customize the default date format of the TextProvider. |
void |
setSeparators(String value)
Sets a value specifying the delimiter character for the TextProvider. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextProvider()
public TextProvider(Reader reader)
public TextProvider(String fileName)
Method Detail |
---|
public void close()
Used to close the connection to the text datasource linked to the TextProvider object.
The DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
property should be called before the connection to the text datasource is closed.
DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
,
open(java.io.Reader)
,
DataSourceSettings
,
Chart
public Locale getCulture()
Gets the Culture. For more detail see setCulture(java.util.Locale)
.
public String getDateFormat()
Gets the DateFormat. For more detail see setDateFormat(java.lang.String)
.
public String getSeparators()
Gets the Separators. For more detail see setSeparators(java.lang.String)
.
public void open(Reader reader)
Used to open the connection to a text datasource linked to the TextProvider object.
The DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
property should be called before the connection to the text datasource is closed.
reader
- A TextReader object to be used as a datasource.DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
,
close()
,
DataSourceSettings
,
Chart
public void open(String fileName)
Used to open the connection to a text datasource linked to the TextProvider object.
The DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
property should be called before the connection to the text datasource is closed.
fileName
- A string specifying the path and/or filename of a text file used as a datasource.DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
,
close()
,
DataSourceSettings
,
Chart
public void setCulture(Locale value)
Sets a value allowing you to localize the text provider for language and region specific data.
If your text data is from a specific country that uses formatting that differs from "us-en", you need to set this property so ChartFX can understand the formatting of the text data.
When setting this property, you may need the Culture Name or Culture Identifier constants for the desired culture. These values as well as the CultureInfo type are documented in the Java API .
Chart.setCulture(java.util.Locale)
,
Chart
public void setDateFormat(String value)
Sets a value allowing you to customize the default date format of the TextProvider.
When dates are included in the text file in a format other than "mm/dd/yyyy" (which is the default format for Chart FX TextProvider), the DateFormat property must be used to create a mask that will instruct Chart FX how to understand the values.
setCulture(java.util.Locale)
,
setSeparators(java.lang.String)
,
Chart
public void setSeparators(String value)
Sets a value specifying the delimiter character for the TextProvider.
By default, Chart FX for Java 's TextProvider understands commas and tabs as separators. However, columns within the text file can be separated with many other characters, as long as they are always the same.
Axis.getDataFormat()
,
setCulture(java.util.Locale)
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |