Class 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.

See Also:
  • Field Details

  • Constructor Details

    • UsbNode

      UsbNode(String name, net.java.games.input.Controller controller, net.java.games.input.Component component)
  • Method Details

    • 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

    • setAttachedMemory

      public void setAttachedMemory(String memory)
    • 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 constructor to ensure that node objects for a given USB object are unique.
      Parameters:
      name - the node name
      controller - the input controller
      component - the input component
      Returns:
      the node, either an existing node with the same controller or component, or newly created