|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 twoDefaultExpandableValue
s 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 Value
public void setValue(Object value)
Value
setValue
in interface Value
value
- the actual value for this Value object.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int getNumberOfVisibleExpandable()
getNumberOfVisibleExpandable
in interface Expandable
getNumberOfVisibleExpandable
in class AbstractExpandable
public Object addChild(int index, Object child)
AbstractExpandable
addChild
in interface Expandable
addChild
in class AbstractExpandable
index
- 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 Expandable
addChildren
in class AbstractExpandable
index
- the index where the children to be inserted.children
- the children to be added.public void removeAllChildren()
AbstractExpandable
removeAllChildren
in interface Expandable
removeAllChildren
in class AbstractExpandable
public boolean removeChild(Object child)
AbstractExpandable
removeChild
in interface Expandable
removeChild
in class AbstractExpandable
child
- 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 |