jmri.jmrix.jinput
Class UsbNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by jmri.jmrix.jinput.UsbNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class UsbNode
extends DefaultMutableTreeNode

UsbNode represents the USB controllers or component.

Generally accessed via the TreeModel.

Can be connected to a JMRI Sensor or Memory.

Author:
Bob Jacobsen Copyright 2008
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Method Summary
 boolean equals(Object a)
           
 String getAttachedMemory()
           
 String getAttachedSensor()
           
 net.java.games.input.Component getComponent()
           
 net.java.games.input.Controller getController()
           
 String getName()
           
static UsbNode getNode(String name, net.java.games.input.Controller controller, net.java.games.input.Component component)
          Get a specific node.
 float getValue()
           
 int hashCode()
           
 void setAttachedMemory(String memory)
           
 void setAttachedSensor(String sensor)
           
 void setValue(float val)
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getController

public net.java.games.input.Controller getController()

getComponent

public net.java.games.input.Component getComponent()

equals

public boolean equals(Object a)
Overrides:
equals in class Object

setValue

public void setValue(float val)

getValue

public float getValue()

setAttachedSensor

public void setAttachedSensor(String sensor)

getAttachedSensor

public String getAttachedSensor()

setAttachedMemory

public void setAttachedMemory(String memory)

getAttachedMemory

public String getAttachedMemory()

getName

public String getName()

getNode

public static UsbNode getNode(String name,
                              net.java.games.input.Controller controller,
                              net.java.games.input.Component component)
Get a specific node. This is used instead of a ctor to ensure that node objects for a given USB object are unique.



Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads