/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Generates a label for a pie section. * * @param dataset the dataset ({@code null} not permitted). * @param key the section key ({@code null} not permitted). * * @return The label (possibly {@code null}). */ @Override public String generateSectionLabel(PieDataset dataset, Comparable key) { return super.generateSectionLabel(dataset, key); }
/** * Generates a label for a pie section. * * @param dataset the dataset ({@code null} not permitted). * @param key the section key ({@code null} not permitted). * * @return The label (possibly {@code null}). */ protected String generateSectionLabel(PieDataset dataset, Comparable key) { String result = null; if (dataset != null) { Object[] items = createItemArray(dataset, key); result = MessageFormat.format(this.labelFormat, items); } return result; }
/** * Tests the generator for equality with an arbitrary object. * * @param obj the object to test against ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } return super.equals(obj); }
/** * Generates a label for a pie section. * * @param dataset the dataset (<code>null</code> not permitted). * @param key the section key (<code>null</code> not permitted). * * @return The label (possibly <code>null</code>). */ protected String generateSectionLabel(PieDataset dataset, Comparable key) { String result = null; if (dataset != null) { Object[] items = createItemArray(dataset, key); result = MessageFormat.format(this.labelFormat, items); } return result; }
/** * Tests the generator for equality with an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieSectionLabelGenerator)) { return false; } StandardPieSectionLabelGenerator that = (StandardPieSectionLabelGenerator) obj; if (!this.attributedLabels.equals(that.attributedLabels)) { return false; } if (!super.equals(obj)) { return false; } return true; }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Generates a label for a pie section. * * @param dataset the dataset (<code>null</code> not permitted). * @param key the section key (<code>null</code> not permitted). * * @return The label (possibly <code>null</code>). */ public String generateSectionLabel(PieDataset dataset, Comparable key) { return super.generateSectionLabel(dataset, key); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException should not happen. */ @Override public Object clone() throws CloneNotSupportedException { StandardPieSectionLabelGenerator clone = (StandardPieSectionLabelGenerator) super.clone(); clone.attributedLabels = new HashMap(); clone.attributedLabels.putAll(this.attributedLabels); return clone; }