|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.chart.DescriptionPattern
public class DescriptionPattern
Name: DescriptionPattern
Description: Class for more flexible item descriptions.
A class processing patterns for chart item descriptions.
Valid pattern symbols are:
%s: The segment label for the item to process.
%a: The area label for the item to process.
%p: The relative value in percent.
%v: The absolute value of the item to process.
%%: The percent sign
Constructor Summary | |
---|---|
DescriptionPattern(String pattern,
NumberFormat valueNumberFormat,
NumberFormat percentNumberFormat)
Constructs a new DescriptionPattern instance with specific attributes. |
Method Summary | |
---|---|
String |
apply(double value,
double percent,
String segmentLabel,
String areaLabel)
Applies the given values to the pattern. |
String |
getAreaLabel()
Gets the current area label |
String |
getPercent()
Gets the current percentage. |
String |
getSegmentLabel()
Gets the current segment label |
String |
getValue()
Gets the current value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DescriptionPattern(String pattern, NumberFormat valueNumberFormat, NumberFormat percentNumberFormat) throws ChartException
pattern
- The pattern string.valueNumberFormat
- The format for value output.percentNumberFormat
- The format for percent output.
ChartException
- in case the parsing of the pattern failed.Method Detail |
---|
public String apply(double value, double percent, String segmentLabel, String areaLabel)
value
- The current value.percent
- The current percentage.segmentLabel
- The item's segment label.areaLabel
- The item's area label.
public String getSegmentLabel()
public String getAreaLabel()
public String getValue()
public String getPercent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |