public class NodeListModel extends AbstractListModel implements ComboBoxModel
listenerList| Constructor and Description |
|---|
NodeListModel()
Creates new model.
|
NodeListModel(Node root)
Creates new model.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDepth()
Getter for depth.
|
Object |
getElementAt(int i)
Child at given index.
|
int |
getIndex(Object o)
Finds index of given object.
|
Object |
getSelectedItem() |
int |
getSize()
Number of elements in the model.
|
void |
setDepth(int depth)
Depth of nodes to display.
|
void |
setNode(Node root)
Changes the root of the model.
|
void |
setSelectedItem(Object anObject)
Currently selected item.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListDataListener, removeListDataListenerpublic NodeListModel()
public NodeListModel(Node root)
root - the root of the modelpublic void setNode(Node root)
root - the root of the modelpublic void setDepth(int depth)
depth - the depthpublic int getDepth()
public int getSize()
public Object getElementAt(int i)
getElementAt in interface ListModelpublic int getIndex(Object o)
o - object produced by this modelpublic void setSelectedItem(Object anObject)
setSelectedItem in interface ComboBoxModelpublic Object getSelectedItem()
getSelectedItem in interface ComboBoxModelBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.