Пример #1
0
 /** {@inheritDoc} */
 public void updateTable() {
   if (m_table != null) {
     if (get() == Value.kOn) {
       m_table.putString("Value", "On");
     } else if (get() == Value.kForward) {
       m_table.putString("Value", "Forward");
     } else if (get() == Value.kReverse) {
       m_table.putString("Value", "Reverse");
     } else {
       m_table.putString("Value", "Off");
     }
   }
 }
 /**
  * Maps the specified key to the specified value in this table. The key can not be null. The value
  * can be retrieved by calling the get method with a key that is equal to the original key.
  *
  * @param key the key
  * @param data the value
  * @throws IllegalArgumentException if key is null
  */
 @SuppressWarnings("unchecked")
 public static void putData(String key, Sendable data) {
   ITable dataTable = table.getSubTable(key);
   dataTable.putString("~TYPE~", data.getSmartDashboardType());
   data.initTable(dataTable);
   tablesToData.put(data, key);
 }