javax.swing.ComboBoxModel, javax.swing.ListModel<E>public class NodeListModel
extends javax.swing.AbstractListModel
implements javax.swing.ComboBoxModel
| Constructor | Description |
|---|---|
NodeListModel() |
Creates new model.
|
NodeListModel(org.openide.nodes.Node root) |
Creates new model.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getDepth() |
Getter for depth.
|
java.lang.Object |
getElementAt(int i) |
Child at given index.
|
int |
getIndex(java.lang.Object o) |
Finds index of given object.
|
java.lang.Object |
getSelectedItem() |
|
int |
getSize() |
Number of elements in the model.
|
void |
setDepth(int depth) |
Depth of nodes to display.
|
void |
setNode(org.openide.nodes.Node root) |
Changes the root of the model.
|
void |
setSelectedItem(java.lang.Object anObject) |
Currently selected item.
|
public NodeListModel()
public NodeListModel(org.openide.nodes.Node root)
root - the root of the modelpublic void setNode(org.openide.nodes.Node root)
root - the root of the modelpublic void setDepth(int depth)
depth - the depthpublic int getDepth()
public int getSize()
getSize in interface javax.swing.ListModel<E extends java.lang.Object>public java.lang.Object getElementAt(int i)
getElementAt in interface javax.swing.ListModel<E extends java.lang.Object>public int getIndex(java.lang.Object o)
o - object produced by this modelpublic void setSelectedItem(java.lang.Object anObject)
setSelectedItem in interface javax.swing.ComboBoxModelpublic java.lang.Object getSelectedItem()
getSelectedItem in interface javax.swing.ComboBoxModelBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.