|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.grid.AbstractNode
com.jidesoft.grid.AbstractExpandable
com.jidesoft.grid.DefaultExpandable
com.jidesoft.grid.DefaultExpandableRow
com.jidesoft.grid.DefaultGroupRow
public class DefaultGroupRow
Default implementation for GroupRow. This implementation implements both GroupRow and
GroupCondition.
| Field Summary |
|---|
| Fields inherited from class com.jidesoft.grid.DefaultExpandable |
|---|
_children, EMPTY_ENUMERATION, PROPERTY_CHILDREN |
| Fields inherited from class com.jidesoft.grid.AbstractExpandable |
|---|
_expandable, _expanded |
| Fields inherited from class com.jidesoft.grid.AbstractNode |
|---|
_parent, PROPERTY_PARENT |
| Fields inherited from interface com.jidesoft.grid.Node |
|---|
PROPERTY_ADJUSTING |
| Fields inherited from interface com.jidesoft.grid.Cacheable |
|---|
INVALID_VALUE |
| Fields inherited from interface com.jidesoft.grid.Expandable |
|---|
PROPERTY_EXPANDABLE, PROPERTY_EXPANDED |
| Constructor Summary | |
|---|---|
DefaultGroupRow()
|
|
| Method Summary | |
|---|---|
void |
addCondition(int columnIndex,
Object value)
|
void |
addCondition(int columnIndex,
Object value,
ObjectGrouper grouper)
|
void |
clearConditions()
|
int |
compareTo(Object o)
|
GroupCondition |
configureParentCondition(GroupCondition condition)
Configure the condition that immediately contains this condition. |
boolean |
contains(GroupCondition c)
Checks if the specified condition is contained in this condition. |
Object |
getCachedValue()
Gets the cached value. |
Class<?> |
getCellClassAt(int columnIndex)
Gets the type for the cell at columnIndex. |
int |
getConditionColumn(int index)
|
Object |
getConditionValue(int index)
Gets the condition value. |
Object |
getConditionValueAsString(int index)
|
ConverterContext |
getConverterContextAt(int columnIndex)
Gets the converter context for the cell at columnIndex. |
int |
getNumberOfConditions()
Gets the number of conditions. |
TreeTableModel |
getTreeTableModel()
|
Object |
getValueAt(int columnIndex)
Gets the value for cell at columnIndex |
void |
invalidateCache()
Invalidates the cache. |
void |
invalidateCache(Object key)
Invalidates the cached value which matches the key. |
boolean |
isCacheValid()
Checks if the cache is valid. |
boolean |
removeChild(Object child)
Removes a child. |
void |
removeCondition(int columnIndex)
|
boolean |
satisfies(TableModel model,
int rowIndex)
Checks if a row in the table model satisfies the condition specified by this GroupCondition. |
void |
setCachedValue(Object value)
Sets the cached value. |
String |
toString()
Converts the group row to string. |
| Methods inherited from class com.jidesoft.grid.DefaultExpandableRow |
|---|
cellUpdated, getEditorContextAt, isCellEditable, notifyCellUpdated, rowUpdated, setValueAt |
| Methods inherited from class com.jidesoft.grid.DefaultExpandable |
|---|
breadthFirstEnumeration, depthFirstEnumeration, getChildren, postorderEnumeration, preorderEnumeration, setChildren |
| Methods inherited from class com.jidesoft.grid.AbstractNode |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getLevel, getNextSibling, getParent, getPreviousSibling, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jidesoft.grid.Row |
|---|
cellUpdated, getEditorContextAt, isCellEditable, rowUpdated, setValueAt |
| Methods inherited from interface com.jidesoft.grid.Node |
|---|
getLevel, getNextSibling, getParent, getPreviousSibling, setParent |
| Methods inherited from interface com.jidesoft.grid.Expandable |
|---|
addChild, addChild, addChildren, getAllVisibleChildrenCount, getChildAt, getChildIndex, getChildren, getChildrenCount, getNumberOfVisibleExpandable, hasChildren, isExpandable, isExpanded, moveDownChild, moveUpChild, notifyChildDeleted, notifyChildInserted, notifyChildrenDeleted, notifyChildrenInserted, notifyChildrenUpdated, notifyChildUpdated, removeAllChildren, removeChildren, setChildren, setExpandable, setExpanded |
| Constructor Detail |
|---|
public DefaultGroupRow()
| Method Detail |
|---|
public void addCondition(int columnIndex,
Object value)
public void addCondition(int columnIndex,
Object value,
ObjectGrouper grouper)
public void removeCondition(int columnIndex)
public void clearConditions()
public Object getConditionValueAsString(int index)
public ConverterContext getConverterContextAt(int columnIndex)
RowcolumnIndex.
getConverterContextAt in interface RowgetConverterContextAt in class DefaultExpandableRowcolumnIndex - the column index
public Class<?> getCellClassAt(int columnIndex)
RowcolumnIndex.
getCellClassAt in interface RowgetCellClassAt in class DefaultExpandableRowcolumnIndex - the column index
public Object getConditionValue(int index)
GroupCondition
getConditionValue in interface GroupConditionindex - the index of the condition.
public int getConditionColumn(int index)
public int getNumberOfConditions()
GroupCondition
getNumberOfConditions in interface GroupCondition
public boolean satisfies(TableModel model,
int rowIndex)
GroupConditionGroupCondition.
satisfies in interface GroupConditionmodel - the table model.rowIndex - the row index.
public GroupCondition configureParentCondition(GroupCondition condition)
GroupCondition
configureParentCondition in interface GroupConditioncondition - the condition to be configured.
public boolean contains(GroupCondition c)
GroupCondition
contains in interface GroupConditionc - the condition to check.
public Object getValueAt(int columnIndex)
RowcolumnIndex
getValueAt in interface RowcolumnIndex - the column whose value to be queried
public boolean removeChild(Object child)
AbstractExpandable
removeChild in interface ExpandableremoveChild in class AbstractExpandablechild - child to be removed.
public TreeTableModel getTreeTableModel()
getTreeTableModel in interface GroupRowgetTreeTableModel in class AbstractExpandablepublic int compareTo(Object o)
compareTo in interface Comparablepublic Object getCachedValue()
Cacheable
getCachedValue in interface Cacheablepublic void setCachedValue(Object value)
Cacheable
setCachedValue in interface Cacheablevalue - the new cached value.public boolean isCacheValid()
CacheableCacheable.invalidateCache() will make this method return false.
isCacheValid in interface Cacheablepublic void invalidateCache()
CacheableCacheable.INVALID_VALUE.
invalidateCache in interface Cacheablepublic void invalidateCache(Object key)
CacheableCacheable.INVALID_VALUE if
current cached value matches the key.
invalidateCache in interface Cacheablekey - the keypublic String toString()
StringBuffer buf = new StringBuffer();
DefaultGroupTableModel defaultGroupTableModel = (DefaultGroupTableModel) getTreeTableModel();
for (int i = 0; i < getNumberOfConditions(); i++) {
buf.append(" ");
if (defaultGroupTableModel.isSingleLevelGrouping() || i == getNumberOfConditions() - 1) {
buf.append(defaultGroupTableModel.getActualModel().getColumnName(getConditionColumn(i)));
buf.append(": ");
buf.append(getConditionValue(i));
}
}
return buf.toString();
Please note, you can either override this method or add a converter for DefaultGroupRow to do something like
this.
ObjectConverterManager.initDefaultConverter();
ObjectConverterManager.registerConverter(DefaultGroupRow.class, new MyDefaultGroupRowConverter());
If so, MyDefaultGroupRowConverter will have a high priority than this toString method.
toString in class Object
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||