Package jmri.jmrix.jinput
Class UsbNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
jmri.jmrix.jinput.UsbNode
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode
UsbNode represents the USB controllers or component.
Generally accessed via the TreeModel.
Can be connected to a JMRI Sensor or Memory.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String(package private) String(package private) net.java.games.input.Component(package private) net.java.games.input.Controller(package private) String(package private) floatFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.java.games.input.Componentnet.java.games.input.ControllergetName()static UsbNodegetNode(String name, net.java.games.input.Controller controller, net.java.games.input.Component component) Get a specific node.floatgetValue()inthashCode()voidsetAttachedMemory(String memory) voidsetAttachedSensor(String sensor) voidsetValue(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
-
Field Details
-
name
-
controller
net.java.games.input.Controller controller -
component
net.java.games.input.Component component -
val
float val -
attachedSensor
-
attachedMemory
-
-
Constructor Details
-
UsbNode
-
-
Method Details
-
hashCode
-
getController
-
getComponent
-
equals
-
setValue
-
getValue
-
setAttachedSensor
-
getAttachedSensor
-
setAttachedMemory
-
getAttachedMemory
-
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 constructor to ensure that node objects for a given USB object are unique.- Parameters:
name- the node namecontroller- the input controllercomponent- the input component- Returns:
- the node, either an existing node with the same controller or component, or newly created
-