Where is the JFreeChart.setTitle(int i) ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
RC

Where is the JFreeChart.setTitle(int i) ?

Post by RC » Tue Apr 23, 2002 3:12 pm

In JFreeChart there are

AbstractTitle getTitle(int index)

java.util.List getTitles()
setTitles(java.util.List list)

Why there is no setTitle(int index, TextTile) ?

In JFreeChart 0.5.6 there was setTitle(String newTitle);
Now in JFreeChart 0.8.1 if I do getTitle(int i)

How do I know which index is TextTitle, which index is ImageTitle, etc.?

David Gilbert

Re: Where is the JFreeChart.setTitle(int i) ?

Post by David Gilbert » Tue Apr 23, 2002 4:14 pm

RC wrote:

> In JFreeChart there are
> AbstractTitle getTitle(int index)
> java.util.List getTitles()
> setTitles(java.util.List list)

You also missed addTitle(AbstractTitle).

> Why there is no setTitle(int index, TextTile) ?

There probably should be.

> In JFreeChart 0.5.6 there was setTitle(String newTitle);

Charts could only have one title in 0.5.6. Now you can have as many titles as you want.

> Now in JFreeChart 0.8.1 if I do getTitle(int i)
>
> How do I know which index is TextTitle, which index is
> ImageTitle, etc.?

You have to keep track of the titles you have added to the chart. It's not perfect, but I'm open to suggestions for improving it.

Regards,

DG.

Locked