|
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
public abstract class AbstractExpandable
An abstract implementation of Expandable.
| Field Summary | |
|---|---|
protected boolean |
_expandable
|
protected boolean |
_expanded
Used internally to keep track of if the property is 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 | |
|---|---|
AbstractExpandable()
Constructs an AbstractExpandable. |
|
| Method Summary | |
|---|---|
Object |
addChild(int index,
Object child)
Adds a child. |
Object |
addChild(Object child)
Adds a child. |
void |
addChildren(int index,
List<? extends Row> children)
Adds a list of children. |
int |
getAllChildrenCount(boolean leafOnly)
Gets all children count. |
int |
getAllVisibleChildrenCount()
Deprecated. please use TableModelWrapperUtils.getVisibleChildrenCount(TableModel, ROW) instead to get visible children count |
Object |
getChildAt(int index)
Gets the child at the specified index. |
int |
getChildIndex(Object child)
Gets the child at the specified index. |
int |
getChildrenCount()
Gets children count. |
int |
getNumberOfVisibleChildren()
Gets the number of visible immediate children of this expandable. |
int |
getNumberOfVisibleExpandable()
Gets the number of visible descendants of this expandable. |
TreeTableModel |
getTreeTableModel()
|
boolean |
hasChildren()
Returns true if this expandable has any children. |
boolean |
hasVisibleChildren()
Gets the number of visible immediate children of this expandable. |
boolean |
isAdjusting()
|
boolean |
isExpandable()
Checks if it is expandable. |
boolean |
isExpanded()
Is this expandable expanded. |
boolean |
moveDownChild(Object child)
Moves down the child in the children list. |
boolean |
moveUpChild(Object child)
Moves up the child in the children list. |
void |
notifyChildDeleted(Object child)
Notifies a child is deleted. |
void |
notifyChildInserted(Object child,
int childIndex)
Notifies the child is inserted as the specified index of this expandable. |
void |
notifyChildrenDeleted(List<? extends Row> children)
Notifies the children are deleted. |
void |
notifyChildrenInserted(List children,
int firstIndex)
Notifies the children are inserted as the specified index arrange of this expandable. |
void |
notifyChildrenUpdated(List<? extends Row> children)
Notifies the children are updated. |
void |
notifyChildUpdated(Object child)
Notifies the child is updated. |
void |
removeAllChildren()
Removes all children from this expandable. |
boolean |
removeChild(Object child)
Removes a child. |
boolean |
removeChildren(List<? extends Row> children)
Removes children from the list of children. |
void |
setAdjusting(boolean adjusting)
|
void |
setExpandable(boolean expandable)
Sets the expandable attribute. |
void |
setExpanded(boolean expanded)
Makes the children expanded. |
| 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, toString, wait, wait, wait |
| Methods inherited from interface com.jidesoft.grid.Expandable |
|---|
getChildren, setChildren |
| Methods inherited from interface com.jidesoft.grid.Node |
|---|
getLevel, getNextSibling, getParent, getPreviousSibling, setParent |
| Field Detail |
|---|
protected boolean _expanded
protected boolean _expandable
| Constructor Detail |
|---|
public AbstractExpandable()
| Method Detail |
|---|
public boolean isExpanded()
isExpanded in interface Expandablepublic void setExpanded(boolean expanded)
TreeTableModel.expandRow(ExpandableRow, boolean) method to expand a row than using this
method.
setExpanded in interface Expandableexpanded - true to expand the node. False to collapse it.public boolean isExpandable()
Expandable
isExpandable in interface Expandablepublic void setExpandable(boolean expandable)
Expandable
setExpandable in interface Expandableexpandable - true or false.public boolean hasChildren()
hasChildren in interface Expandablepublic void removeAllChildren()
removeAllChildren in interface Expandablepublic int getNumberOfVisibleExpandable()
getNumberOfVisibleExpandable in interface Expandablepublic int getNumberOfVisibleChildren()
public boolean hasVisibleChildren()
public int getChildrenCount()
getChildrenCount in interface Expandable@Deprecated public int getAllVisibleChildrenCount()
getAllVisibleChildrenCount in interface Expandablepublic int getAllChildrenCount(boolean leafOnly)
leafOnly - if true, the children count will only includes the leaf node. Otherwise, all nodes will be
included in the count.
public Object addChild(Object child)
addChild in interface Expandablechild - the child to be added.
public Object addChild(int index,
Object child)
addChild in interface Expandableindex - the index where the child to be inserted.child - the child to be added.
public void addChildren(int index,
List<? extends Row> children)
addChildren in interface Expandableindex - the index where the children to be inserted.children - the children to be added.public boolean removeChild(Object child)
removeChild in interface Expandablechild - child to be removed.
public boolean removeChildren(List<? extends Row> children)
Expandable
removeChildren(getChildren());
You would use the following line to remove all children.
List children = getChildren();
List cloneList = new ArrayList();
cloneList.addAll(children);
removeChildren(cloneList);
removeChildren in interface Expandablechildren - the child to be removed.
public Object getChildAt(int index)
getChildAt in interface Expandableindex - the index.
public int getChildIndex(Object child)
getChildIndex in interface Expandablechild - the child.
public boolean moveUpChild(Object child)
moveUpChild in interface Expandablechild - the child to be moved up.
public boolean moveDownChild(Object child)
moveDownChild in interface Expandablechild - the child to be moved down.
public void notifyChildInserted(Object child,
int childIndex)
Expandable
notifyChildInserted in interface Expandablechild - the child which is inserted.childIndex - the index where it is inserted. -1 if the child is inserted as the last one.
public void notifyChildrenInserted(List children,
int firstIndex)
Expandable
notifyChildrenInserted in interface Expandablechildren - the children which are inserted.firstIndex - the first index where it is inserted.public void notifyChildDeleted(Object child)
Expandable
notifyChildDeleted in interface Expandablechild - the child that is deletedpublic void notifyChildrenDeleted(List<? extends Row> children)
Expandable
notifyChildrenDeleted in interface Expandablechildren - the children that are deletedpublic void notifyChildUpdated(Object child)
Expandable
notifyChildUpdated in interface Expandablechild - the child which is updatedpublic void notifyChildrenUpdated(List<? extends Row> children)
Expandable
notifyChildrenUpdated in interface Expandablechildren - the children which are updatedpublic TreeTableModel getTreeTableModel()
public boolean isAdjusting()
public void setAdjusting(boolean adjusting)
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||