Class OtsSearchPanel.ObjectKind<T extends nl.tudelft.simulation.dsol.animation.Locatable & org.djutils.base.Identifiable>

java.lang.Object
org.opentrafficsim.swing.gui.OtsSearchPanel.ObjectKind<T>
Type Parameters:
T - Type of object identified by key
Enclosing class:
OtsSearchPanel

abstract static class OtsSearchPanel.ObjectKind<T extends nl.tudelft.simulation.dsol.animation.Locatable & org.djutils.base.Identifiable> extends Object
Entries in the typeToSearch JComboBox of the OTS search panel.
  • Constructor Details

    • ObjectKind

      ObjectKind(String key)
      Construct a new ObjectKind (entry in the combo box).
      Parameters:
      key - String; the key of the new ObjectKind
  • Method Details

    • getKey

      public Object getKey()
      Retrieve the key.
      Returns:
      String; the key
    • searchNetwork

      abstract T searchNetwork(org.opentrafficsim.core.network.Network network, String id)
      Lookup an object of type T in an OTS network.
      Parameters:
      network - Network; the OTS network
      id - String; id of the object to return
      Returns:
      T; the object in the network of the correct type and matching id, or null if no matching object was found.
    • toString

      public String toString()
      Produce the text that will appear in the combo box. This method should be overridden to implement localization.
      Overrides:
      toString in class Object