public final class ShuffleboardTab extends Object implements ShuffleboardContainer
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).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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPersistent
public String getTitle()
public List<ShuffleboardComponent<?>> getComponents()
ShuffleboardContainer
getComponents
in interface ShuffleboardContainer
public ShuffleboardLayout getLayout(String type, String title)
ShuffleboardContainer
getLayout
in interface ShuffleboardContainer
type
- the type of the layout, eg "List" or "Grid"title
- the title of the layoutpublic ComplexWidget add(String title, Sendable sendable)
ShuffleboardContainer
add
in interface ShuffleboardContainer
title
- the title of the widgetsendable
- the sendable to displaypublic ComplexWidget add(Sendable sendable) throws IllegalArgumentException
ShuffleboardContainer
add
in interface ShuffleboardContainer
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 specifiedpublic SimpleWidget add(String title, Object defaultValue)
ShuffleboardContainer
add
in interface ShuffleboardContainer
title
- the title of the widgetdefaultValue
- the default value of the widgetadd(String title, Object defaultValue)
public 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