public class FieldMap
extends java.lang.Object
Allows you to bind a specific field of the ResultSet to the Chart.
The FieldMap
class allows you to configure how a specific field of the ResultSet will be bound to the Chart. The FieldMap objects are stored in the FieldMapCollection which can be accessed throught the Fields method of the FieldMap
class.
Use the setName
method to configure the name of the corresponding field in the ResultSet. If the setDisplayName
method is not configured, the chart will display the value of the Name method. The Usage method is the most important method since it allows you to configure how the column will be bound. For example, the column can represent Y values, X values, and categorical labels which will be used by the X-axis.
Constructor and Description |
---|
FieldMap()
Constructs a newly allocated FieldMap object
|
FieldMap(java.lang.String fieldName,
FieldUsage usage)
Constructs a newly allocated FieldMap object
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDisplayName()
Gets or sets the name of the field which will be displayed by the Chart.
|
java.lang.String |
getName()
Gets or sets the name of the ResultSet's field related to the FieldMap.
|
void |
setDisplayName(java.lang.String value)
Gets or sets the name of the field which will be displayed by the Chart.
|
void |
setName(java.lang.String value)
Gets or sets the name of the ResultSet's field related to the FieldMap.
|
public FieldMap()
public FieldMap(java.lang.String fieldName, FieldUsage usage)
fieldName
- usage
- public java.lang.String getDisplayName()
Gets or sets the name of the field which will be displayed by the Chart.
FieldMap fieldMap;
fieldMap = new FieldMap();
fieldMap.setName("Field1");
fieldMap.setDisplayName("Number of Sales during the first Quarter");
fieldMap.setUsage(FieldUsage.VALUE);
public void setDisplayName(java.lang.String value)
Gets or sets the name of the field which will be displayed by the Chart.
FieldMap fieldMap;
fieldMap = new FieldMap();
fieldMap.setName("Field1");
fieldMap.setDisplayName("Number of Sales during the first Quarter");
fieldMap.setUsage(FieldUsage.VALUE);
value
- public java.lang.String getName()
Gets or sets the name of the ResultSet's field related to the FieldMap.
The name is defined in the ResultSet. For example, the following query will produce a ResutSet with two columns, Field1 and Field2, respectively.
SELECT Field1, Field2 FROM DataTable1
The code below will create a FieldMap object, associate the Field2 column to the FieldMap object and add it to the FieldMapCollection:
public void setName(java.lang.String value)
Gets or sets the name of the ResultSet's field related to the FieldMap.
The name is defined in the ResultSet. For example, the following query will produce a ResutSet with two columns, Field1 and Field2, respectively.
SELECT Field1, Field2 FROM DataTable1
The code below will create a FieldMap object, associate the Field2 column to the FieldMap object and add it to the FieldMapCollection:
value
- 2014 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.