|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.chart.AbstractChartModel<T>
com.jgoodies.chart.FilteredChartModel<T>
public final class FilteredChartModel<T>
A wrapper for ChartModels that limits the number of elements.
ChartModel
Constructor Summary | |
---|---|
FilteredChartModel(ChartModel<T> chartModel,
int itemLimit,
float minimumFraction,
String collapsedText,
Color collapsedColor)
Constructs a wrapper ChartModel on the given model. |
Method Summary | |
---|---|
Color |
getCollapsedColor()
|
String |
getCollapsedText()
|
Color |
getColor(int index)
Returns the color of the item at the given index. |
T |
getData(int index)
Returns the user data at the given index. |
Icon |
getIcon(int index)
Returns the icon at the given index. |
int |
getItemCount()
Returns the number of items in this model. |
int |
getItemLimit()
|
float |
getMinimumFraction()
|
long |
getSize(int index)
Returns the mandatory size at the given index. |
String |
getText(int index)
Returns the text at the given index. |
void |
setCollapsedColor(Color newCollapsedColor)
|
void |
setCollapsedText(String newCollapsedText)
|
void |
setItemLimit(int newItemLimit)
|
void |
setMinimumFraction(float newMinimumFraction)
|
Methods inherited from class com.jgoodies.chart.AbstractChartModel |
---|
addChangeListener, fireStateChanged, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilteredChartModel(ChartModel<T> chartModel, int itemLimit, float minimumFraction, String collapsedText, Color collapsedColor)
collapsedText
and collapsedColor
.
chartModel
- the chart model to colorizeitemLimit
- the maximum number of items in the wrapperminimumFraction
- the minimum size of items in the wrappercollapsedText
- the text of the collapsed itemscollapsedColor
- the color of the collapsed items
NullPointerException
- if the chartModel is null
Method Detail |
---|
public int getItemLimit()
public void setItemLimit(int newItemLimit)
public float getMinimumFraction()
public void setMinimumFraction(float newMinimumFraction)
public String getCollapsedText()
public void setCollapsedText(String newCollapsedText)
public Color getCollapsedColor()
public void setCollapsedColor(Color newCollapsedColor)
public int getItemCount()
public T getData(int index)
index
- the index to look at
public Icon getIcon(int index)
index
- the index to look at
public String getText(int index)
index
- the index to look at
public long getSize(int index)
index
- the index to look at
public Color getColor(int index)
null
and leave it
to a wrapper chart model to colorize the data.
index
- the index to look at
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |