Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Header And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.chart.plot
Class AbstractPieLabelDistributor

    java.lang.Object
      org.jfree.chart.plot.AbstractPieLabelDistributor

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  PieLabelDistributor

    public abstract class AbstractPieLabelDistributor

extends java.lang.Object
implements java.io.Serializable

A base class for handling the distribution of pie section labels. Create your own subclass and set it using the `PiePlot.setLabelDistributor(AbstractPieLabelDistributor)` method if you want to customise the label distribution.

See Also:
  Serialized Form

Field Summary
`protected java.util.List` | `labels` The label records.

Constructor Summary
`AbstractPieLabelDistributor()` Creates a new instance.

Method Summary
`void` | `addPieLabelRecord(PieLabelRecord record)` Adds a label record.
`void` | `clear()` Clears the list of labels.
`abstract void` | `distributeLabels(double minY, double height)` Called by the `PiePlot` class.
`int` | `getItemCount()` Returns the number of items in the list.
`PieLabelRecord` | `getPieLabelRecord(int index)` Returns a label record from the list.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### labels

    protected java.util.List labels

  The label records.

Constructor Detail

### AbstractPieLabelDistributor

    public AbstractPieLabelDistributor()

  Creates a new instance.

Method Detail

### getPieLabelRecord

    public PieLabelRecord getPieLabelRecord(int index)

  Returns a label record from the list.

  Parameters:
    `index` - the index.
  Returns:
    The label record.

### addPieLabelRecord

    public void addPieLabelRecord(PieLabelRecord record)

  Adds a label record.

  Parameters:
    `record` - the label record (`null` not permitted).

### getItemCount

    public int getItemCount()

  Returns the number of items in the list.

  Returns:
    The item count.

### clear

    public void clear()

  Clears the list of labels.

### distributeLabels

    public abstract void distributeLabels(double minY,
                                          double height)

  Called by the `PiePlot` class. Implementations should distribute the labels in this.labels then return.

  Parameters:
    `minY` - the y-coordinate for the top of the label area.
    `height` - the height of the label area.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| # Footer And More
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.