|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.pivot.table.context.SingleColumnContext
com.citra.pivot.table.context.DateColumnContext
public abstract class DateColumnContext
DateColumnContext is an abstract context for extracting date values. It contains a shared calendar instance, as well as a simple date format for extracting and formatting date values respectively.
Nested Class Summary | |
---|---|
static class |
DateColumnContext.DateContext
DateContext is a class that holds the fields of a Calendar object. |
Field Summary | |
---|---|
protected Calendar |
calendar
a shared calendar to use for extracting date values |
protected SimpleDateFormat |
format
the date format |
Fields inherited from class com.citra.pivot.table.context.SingleColumnContext |
---|
captionColumn, columnsByLocale, comparator, extractColumn, nameColumn |
Constructor Summary | |
---|---|
protected |
DateColumnContext(int extractColumn)
Constructs a DateColumnContext. |
Method Summary | |
---|---|
void |
applyFormat(DateColumnContext.DateContext di,
List row,
Locale locale)
Changes the simple date format's pattern, if necessary. |
int |
compareMemberValues(Object memberValue1,
Object memberValue2)
Compares two values that have been previously extracted in the extractMemberValue method. |
Object |
extractMemberValue(List row)
Extracts a member value from a row that corresponds to the underlying table model. |
String |
getCaption(Object memberValue,
List row,
Locale locale)
Determines the caption that will be displayed for the given member value and locale. |
SimpleDateFormat |
getDateFormat()
Retrieves the simple date format used to format the date values into strings. |
String |
getDescription(Object memberValue,
List row,
Locale locale)
Determines the description that will be displayed for the given member value and locale. |
String |
getName(Object memberValue,
List row)
Determines the name that will be displayed for the given member value. |
boolean |
hasField(int field)
Determines whether a calendar field's value will be stored. |
void |
setField(int field,
boolean set)
Assigns the calendar fields for which a value is stored. |
Methods inherited from class com.citra.pivot.table.context.SingleColumnContext |
---|
getColumnForLocale, setColumnForLocale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Calendar calendar
protected SimpleDateFormat format
Constructor Detail |
---|
protected DateColumnContext(int extractColumn)
Method Detail |
---|
public void applyFormat(DateColumnContext.DateContext di, List row, Locale locale)
format.applyPattern(pattern);
, when finished.
di
- the date info object which is formattedrow
- the row to the table modellocale
- the locale in which the format is appliedpublic int compareMemberValues(Object memberValue1, Object memberValue2)
extractMemberValue
method.
compareMemberValues
in interface TableContext
compareMemberValues
in class SingleColumnContext
memberValue1
- the first value to comparememberValue2
- the second value to compare
public Object extractMemberValue(List row)
extractMemberValue
in interface TableContext
extractMemberValue
in class SingleColumnContext
row
- the row to the table model
public String getCaption(Object memberValue, List row, Locale locale)
getCaption
in interface TableContext
getCaption
in class SingleColumnContext
memberValue
- the member valuerow
- the row to the table modellocale
- the locale for which the caption is returned
public SimpleDateFormat getDateFormat()
public String getDescription(Object memberValue, List row, Locale locale)
getDescription
in interface TableContext
getDescription
in class SingleColumnContext
memberValue
- the member valuerow
- the row to the table modellocale
- the locale for which the description is returned
public String getName(Object memberValue, List row)
getName
in interface TableContext
getName
in class SingleColumnContext
memberValue
- the member valuerow
- the row to the table model
public boolean hasField(int field)
field
- the field's value to store/unstore
public void setField(int field, boolean set)
field
- the field's value to store/unstoreset
- true if the field value is stored, false otherwise
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |