|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MemberFormatter
This interface provides an SPI to redefine the caption displayed for members.
For example, the following class displays members of the time dimension as "01-JAN-2005".
public class TimeMemberFormatter implements MemberFormatter {
public String formatMember(Member member) {
SimpleDateFormat inFormat =
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.S");
SimpleDateFormat outFormat =
new SimpleDateFormat("dd-MMM-yyyy");
try {
Date date = inFormat.parse(in.getName());
return outFormat.format(data);
} catch (ParseException e) {
e.printStackTrace();
return "error";
}
}
}
Method Summary | |
---|---|
String |
formatMember(Member m)
Returns the string to be displayed as a caption for a given member. |
Method Detail |
---|
String formatMember(Member m)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |