|
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.pivot.DefaultExpandableValue
public class DefaultExpandableValue
Default implementation of ExpandableValue interface. This is the main class used in HeaderTableModel to store the data.
The equality of twoDefaultExpandableValues is depending on the actual value from getValue().
To improve the performance, it also stores the hash code if PivotDataModel.isValueImmutable() return true. In the
other word, if the value passed to DefaultExpandableValue(Object value) as parameter is immutable or you will make
sure they are used as immutable even the value itself is mutable, we will cache the hash code. In Java, all primitive
types and String are immutable so this will cover a large percentage of use cases.
| 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.Expandable |
|---|
PROPERTY_EXPANDABLE, PROPERTY_EXPANDED |
| Fields inherited from interface com.jidesoft.grid.Node |
|---|
PROPERTY_ADJUSTING |
| Constructor Summary | |
|---|---|
DefaultExpandableValue(Object value)
|
|
| Method Summary | |
|---|---|
Object |
addChild(int index,
Object child)
Adds a child. |
void |
addChildren(int index,
List<? extends Row> children)
Adds a list of children. |
boolean |
equals(Object o)
|
Object |
getFirstDescendantValueAt(int level)
Gets the first descendant value at the specified level. |
int |
getNumberOfVisibleExpandable()
Overrides this method to do a different calculation. |
Object |
getValue()
Gets the value. |
int |
hashCode()
|
void |
removeAllChildren()
Removes all children from this expandable. |
boolean |
removeChild(Object child)
Removes a child. |
void |
setValue(Object value)
Sets the value. |
String |
toString()
|
| 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jidesoft.grid.Expandable |
|---|
addChild, getAllVisibleChildrenCount, getChildAt, getChildIndex, getChildren, getChildrenCount, hasChildren, isExpandable, isExpanded, moveDownChild, moveUpChild, notifyChildDeleted, notifyChildInserted, notifyChildrenDeleted, notifyChildrenInserted, notifyChildrenUpdated, notifyChildUpdated, removeChildren, setChildren, setExpandable, setExpanded |
| Methods inherited from interface com.jidesoft.grid.Node |
|---|
getLevel, getNextSibling, getParent, getPreviousSibling, setParent |
| Constructor Detail |
|---|
public DefaultExpandableValue(Object value)
| Method Detail |
|---|
public Object getValue()
Value
getValue in interface Valuepublic void setValue(Object value)
Value
setValue in interface Valuevalue - the actual value for this Value object.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int getNumberOfVisibleExpandable()
getNumberOfVisibleExpandable in interface ExpandablegetNumberOfVisibleExpandable in class AbstractExpandable
public Object addChild(int index,
Object child)
AbstractExpandable
addChild in interface ExpandableaddChild in class AbstractExpandableindex - the index where the child to be inserted.child - the child to be added.
public void addChildren(int index,
List<? extends Row> children)
AbstractExpandable
addChildren in interface ExpandableaddChildren in class AbstractExpandableindex - the index where the children to be inserted.children - the children to be added.public void removeAllChildren()
AbstractExpandable
removeAllChildren in interface ExpandableremoveAllChildren in class AbstractExpandablepublic boolean removeChild(Object child)
AbstractExpandable
removeChild in interface ExpandableremoveChild in class AbstractExpandablechild - child to be removed.
public Object getFirstDescendantValueAt(int level)
level - the descendant level
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||