public interface ShuffleboardContainer
Modifier and Type | Method and Description |
---|---|
ComplexWidget |
add(Sendable sendable)
Adds a widget to this container to display the given sendable.
|
SimpleWidget |
add(String title,
Object defaultValue)
Adds a widget to this container to display the given data.
|
ComplexWidget |
add(String title,
Sendable sendable)
Adds a widget to this container to display the given sendable.
|
default SimpleWidget |
addPersistent(String title,
Object defaultValue)
Adds a widget to this container to display a simple piece of data.
|
void |
buildInto(NetworkTable parentTable,
NetworkTable metaTable)
Builds the entries for this value.
|
List<ShuffleboardComponent<?>> |
getComponents()
Gets the components that are direct children of this container.
|
ShuffleboardLayout |
getLayout(String type,
String title)
Gets the layout with the given type and title, creating it if it does not already exist at the
time this method is called.
|
String |
getTitle()
Gets the title of this Shuffleboard value.
|
List<ShuffleboardComponent<?>> getComponents()
ShuffleboardLayout getLayout(String type, String title)
type
- the type of the layout, eg "List" or "Grid"title
- the title of the layoutComplexWidget add(String title, Sendable sendable) throws IllegalArgumentException
title
- the title of the widgetsendable
- the sendable to displayIllegalArgumentException
- if a widget already exists in this container with the given
titleComplexWidget add(Sendable sendable)
sendable
- the sendable to displayIllegalArgumentException
- if a widget already exists in this container with the given
title, or if the sendable's name has not been specifiedSimpleWidget add(String title, Object defaultValue) throws IllegalArgumentException
title
- the title of the widgetdefaultValue
- the default value of the widgetIllegalArgumentException
- if a widget already exists in this container with the given
titleadd(String title, Object defaultValue)
default SimpleWidget addPersistent(String title, Object defaultValue) throws IllegalArgumentException
add(String, Object)
, the value in the widget will be saved on the robot and will be
used when the robot program next starts rather than defaultValue
.title
- the title of the widgetdefaultValue
- the default value of the widgetIllegalArgumentException
- if a widget already exists in this container with the given
titleadd(String title, Object defaultValue)
String getTitle()
void buildInto(NetworkTable parentTable, NetworkTable metaTable)
parentTable
- the table containing all the data for the parent. Values that require a
complex entry or table structure should call parentTable.getSubTable(getTitle())
to get the table to put data into.
Values that only use a single entry should call parentTable.getEntry(getTitle())
to get that entry.metaTable
- the table containing all the metadata for this value and its sub-values