/**
* Creates the array of items that can be passed to the
* {@link MessageFormat} class for creating labels.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return The items (never <code>null</code>).
*/
/**
* Creates the array of items that can be passed to the
* {@link MessageFormat} class for creating labels.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return The items (never <code>null</code>).
*/
protected Object[] createItemArray(XYZDataset dataset, int series, int item) {
Object[] result = new Object[4];
result[0] = dataset.getSeriesKey(series).toString();
Number x = dataset.getX(series, item);
DateFormat xf = getXDateFormat();
if (xf != null) {
result[1] = xf.format(x);
}
else {
result[1] = getXFormat().format(x);
}
Number y = dataset.getY(series, item);
DateFormat yf = getYDateFormat();
if (yf != null) {
result[2] = yf.format(y);
}
else {
result[2] = getYFormat().format(y);
}
Number z = dataset.getZ(series, item);
if (this.zDateFormat != null) {
result[3] = this.zDateFormat.format(z);
}
else {
result[3] = this.zFormat.format(z);
}
return result;
}
/**
* Tests this object for equality with an arbitrary object.
*
* @param obj the other object (<code>null</code> permitted).
*
* @return A boolean.
*/
public boolean equals(Object obj) {
if (obj == this ) {
return true;
}
if ( !(obj instanceof [[#variable18ba7200]])) {
return false;
}
if ( !super.equals(obj)) {
return false;
}
[[#variable18ba7200]] that = ( [[#variable18ba7200]]) obj;
if ( !ObjectUtilities.equal(this.zFormat, that.zFormat)) {
return false;
}
if ( !ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) {
return false;
}
return true;
}
|