public class ShuffleboardLayout extends ShuffleboardComponent<ShuffleboardLayout> implements 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.
|
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.
|
buildMetadata, getParent, getTitle, getType, setType, withPosition, withProperties, withSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPersistent
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) throws IllegalArgumentException
ShuffleboardContainer
add
in interface ShuffleboardContainer
title
- the title of the widgetsendable
- the sendable to displayIllegalArgumentException
- if a widget already exists in this container with the given
titlepublic 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) throws IllegalArgumentException
ShuffleboardContainer
add
in interface ShuffleboardContainer
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)
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-valuespublic String getTitle()