| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.wpi.first.wpilibj.smartdashboard.SendableChooser
public class SendableChooser
The SendableChooser class is a useful tool for presenting a selection
 of options to the SmartDashboard.
 
For instance, you may wish to be able to select between multiple
 autonomous modes. You can do this by putting every possible Command
 you want to run as an autonomous into a SendableChooser and then put
 it into the SmartDashboard to have a list of options appear on the
 laptop. Once autonomous starts, simply ask the SendableChooser what
 the selected value is.
| Constructor Summary | |
|---|---|
| SendableChooser()Instantiates a SendableChooser. | |
| Method Summary | |
|---|---|
|  void | addDefault(java.lang.String name,
                     java.lang.Object object)Add the given object to the list of options and marks it as the default. | 
|  void | addObject(java.lang.String name,
                   java.lang.Object object)Adds the given object to the list of options. | 
|  java.lang.Object | getSelected()Returns the selected option. | 
|  java.lang.String | getSmartDashboardType() | 
|  ITable | getTable() | 
|  void | initTable(ITable table)Initializes a table for this sendable object. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SendableChooser()
SendableChooser.
| Method Detail | 
|---|
public void addObject(java.lang.String name,
                      java.lang.Object object)
SmartDashboard on the desktop, the object will appear as the
 given name.
name - the name of the optionobject - the option
public void addDefault(java.lang.String name,
                       java.lang.Object object)
addObject(...)
 except that it will use this as the default option if none other is
 explicitly selected.
name - the name of the optionobject - the optionpublic java.lang.Object getSelected()
null.
public java.lang.String getSmartDashboardType()
getSmartDashboardType in interface Sendablepublic void initTable(ITable table)
Sendable
initTable in interface Sendabletable - The table to put the values in.public ITable getTable()
getTable in interface Sendable| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||