|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultTreeModel
jmri.jmrix.jinput.TreeModel
public final class TreeModel
TreeModel represents the USB controllers and components
Accessed via the instance() member, as we expect to have only one of these models talking to the USB subsystem.
The tree has three levels below the uninteresting root:
jinput requires that there be only one of these for a given USB system in a given JVM so we use a pseudo-singlet "instance" approach Class is final because it starts a survey thread, which runs while constructor is still active.
| Nested Class Summary | |
|---|---|
(package private) class |
TreeModel.Report
Carry a single event to the Swing thread for processing |
(package private) class |
TreeModel.Runner
|
| Field Summary | |
|---|---|
(package private) net.java.games.input.Controller[] |
ca
|
(package private) DefaultMutableTreeNode |
dRoot
|
(package private) static org.slf4j.Logger |
log
|
(package private) PropertyChangeSupport |
pcs
|
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
|---|
asksAllowsChildren, listenerList, root |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
net.java.games.input.Controller[] |
controllers()
|
(package private) DefaultMutableTreeNode |
insertNode(DefaultMutableTreeNode pChild,
DefaultMutableTreeNode pParent)
Add a node to the tree if it doesn't already exist |
static TreeModel |
instance()
Provide access to the model. |
(package private) void |
loadSystem()
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
DefaultMutableTreeNode dRoot
net.java.games.input.Controller[] ca
PropertyChangeSupport pcs
static org.slf4j.Logger log
| Method Detail |
|---|
DefaultMutableTreeNode insertNode(DefaultMutableTreeNode pChild,
DefaultMutableTreeNode pParent)
pChild - Node to possibly be inserted; relies on equals() to avoid duplicatespParent - Node for the parent of the resource to be scanned, e.g.
where in the tree to insert it.
public static TreeModel instance()
public net.java.games.input.Controller[] controllers()
void loadSystem()
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||