|
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.SingleGroupContext
public class SingleGroupContext
SingleGroupContext is a context that will extract a single value from
a table model. The value for the default locale is passed in the constructor, while
values for more locales can be added with the setValueForLocale
method.
Field Summary | |
---|---|
protected String |
singleValue
the default value to use as the single member's value |
protected Map |
valuesByLocale
a map containing values vs locales |
Constructor Summary | |
---|---|
SingleGroupContext(String singleValue)
Constructs a SingleGroupContext. |
Method Summary | |
---|---|
int |
compareMemberValues(Object o1,
Object o2)
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. |
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. |
String |
getValueForLocale(Locale locale)
Determines the value for the single member for a given locale. |
void |
setValueForLocale(Locale locale,
String value)
Assigns the value for the single member for a given locale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String singleValue
protected Map valuesByLocale
Constructor Detail |
---|
public SingleGroupContext(String singleValue)
Method Detail |
---|
public int compareMemberValues(Object o1, Object o2)
extractMemberValue
method.
compareMemberValues
in interface TableContext
o1
- the first value to compareo2
- the second value to compare
public Object extractMemberValue(List row)
extractMemberValue
in interface TableContext
row
- the row to the table model
public void setValueForLocale(Locale locale, String value)
locale
- the locale to which a value is assignedvalue
- the value to assignpublic String getCaption(Object memberValue, List row, Locale locale)
getCaption
in interface TableContext
memberValue
- the member valuerow
- the row to the table modellocale
- the locale for which the caption is returned
public String getDescription(Object memberValue, List row, Locale locale)
getDescription
in interface TableContext
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
memberValue
- the member valuerow
- the row to the table model
public String getValueForLocale(Locale locale)
locale
- the locale to which a value is assigned
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |