Package org.opentrafficsim.swing.gui
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 Summary
-
Method Summary
-
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
Retrieve the key.- Returns:
- String; the key
-
searchNetwork
Lookup an object of type T in an OTS network.- Parameters:
network
- Network; the OTS networkid
- 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
Produce the text that will appear in the combo box. This method should be overridden to implement localization.
-