Class ShuffleboardTab
java.lang.Object
edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab
- All Implemented Interfaces:
ShuffleboardContainer
public final class ShuffleboardTab extends Object implements ShuffleboardContainer
Represents a tab in the Shuffleboard dashboard. Widgets can be added to the tab with
add(Sendable), add(String, Object), and add(String, Sendable). Widgets can
also be added to layouts with getLayout(String, String); layouts can be nested
arbitrarily deep (note that too many levels may make deeper components unusable).-
Method Summary
Modifier and Type Method Description ComplexWidgetadd(Sendable sendable)Adds a widget to this container to display the given sendable.ComplexWidgetadd(String title, Sendable sendable)Adds a widget to this container to display the given sendable.SimpleWidgetadd(String title, Object defaultValue)Adds a widget to this container to display the given data.SuppliedValueWidget<Boolean>addBoolean(String title, BooleanSupplier valueSupplier)Adds a widget to this container.SuppliedValueWidget<boolean[]>addBooleanArray(String title, Supplier<boolean[]> valueSupplier)Adds a widget to this container.SuppliedValueWidget<double[]>addDoubleArray(String title, Supplier<double[]> valueSupplier)Adds a widget to this container.SuppliedValueWidget<Double>addNumber(String title, DoubleSupplier valueSupplier)Adds a widget to this container.SuppliedValueWidget<byte[]>addRaw(String title, Supplier<byte[]> valueSupplier)Adds a widget to this container.SuppliedValueWidget<String>addString(String title, Supplier<String> valueSupplier)Adds a widget to this container.SuppliedValueWidget<String[]>addStringArray(String title, Supplier<String[]> valueSupplier)Adds a widget to this container.voidbuildInto(NetworkTable parentTable, NetworkTable metaTable)List<ShuffleboardComponent<?>>getComponents()Gets the components that are direct children of this container.ShuffleboardLayoutgetLayout(String title)Gets the already-defined layout in this container with the given title.ShuffleboardLayoutgetLayout(String title, String type)Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called.StringgetTitle()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj.shuffleboard.ShuffleboardContainer
add, add, addCamera, addPersistent, getLayout
-
Method Details
-
getTitle
-
getComponents
Description copied from interface:ShuffleboardContainerGets the components that are direct children of this container.- Specified by:
getComponentsin interfaceShuffleboardContainer- Returns:
- The components that are direct children of this container.
-
getLayout
Description copied from interface:ShuffleboardContainerGets the layout with the given type and title, creating it if it does not already exist at the time this method is called. Note: this method should only be used to use a layout type that is not already built into Shuffleboard. To use a layout built into Shuffleboard, useShuffleboardContainer.getLayout(String, LayoutType)and the layouts inBuiltInLayouts.- Specified by:
getLayoutin interfaceShuffleboardContainer- Parameters:
title- the title of the layouttype- the type of the layout, eg "List Layout" or "Grid Layout"- Returns:
- the layout
- See Also:
ShuffleboardContainer.getLayout(String, LayoutType)
-
getLayout
Description copied from interface:ShuffleboardContainerGets the already-defined layout in this container with the given title.Shuffleboard.getTab("Example Tab") .getLayout("My Layout", BuiltInLayouts.kList); // Later... Shuffleboard.getTab("Example Tab") .getLayout("My Layout");- Specified by:
getLayoutin interfaceShuffleboardContainer- Parameters:
title- the title of the layout to get- Returns:
- the layout with the given title
-
add
Description copied from interface:ShuffleboardContainerAdds a widget to this container to display the given sendable.- Specified by:
addin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetsendable- the sendable to display- Returns:
- a widget to display the sendable data
-
add
Description copied from interface:ShuffleboardContainerAdds a widget to this container to display the given sendable.- Specified by:
addin interfaceShuffleboardContainer- Parameters:
sendable- the sendable to display- Returns:
- a widget to display the sendable data
-
add
Description copied from interface:ShuffleboardContainerAdds a widget to this container to display the given data.- Specified by:
addin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetdefaultValue- the default value of the widget- Returns:
- a widget to display the sendable data
- See Also:
add(String title, Object defaultValue)
-
addString
Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addStringin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addNumber
Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addNumberin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addBoolean
Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addBooleanin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addStringArray
public SuppliedValueWidget<String[]> addStringArray(String title, Supplier<String[]> valueSupplier)Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addStringArrayin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addDoubleArray
public SuppliedValueWidget<double[]> addDoubleArray(String title, Supplier<double[]> valueSupplier)Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addDoubleArrayin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addBooleanArray
public SuppliedValueWidget<boolean[]> addBooleanArray(String title, Supplier<boolean[]> valueSupplier)Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addBooleanArrayin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
addRaw
Description copied from interface:ShuffleboardContainerAdds a widget to this container. The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.- Specified by:
addRawin interfaceShuffleboardContainer- Parameters:
title- the title of the widgetvalueSupplier- the supplier for values- Returns:
- a widget to display data
-
buildInto
-