C
- the self typepublic abstract class ShuffleboardComponent<C extends ShuffleboardComponent<C>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
ShuffleboardComponent(ShuffleboardContainer parent,
String title) |
protected |
ShuffleboardComponent(ShuffleboardContainer parent,
String title,
String type) |
Modifier and Type | Method and Description |
---|---|
void |
buildInto(NetworkTable parentTable,
NetworkTable metaTable)
Builds the entries for this value.
|
protected void |
buildMetadata(NetworkTable metaTable) |
ShuffleboardContainer |
getParent() |
String |
getTitle()
Gets the title of this Shuffleboard value.
|
String |
getType() |
protected void |
setType(String type) |
C |
withPosition(int columnIndex,
int rowIndex)
Sets the position of this component in the tab.
|
C |
withProperties(Map<String,Object> properties)
Sets custom properties for this component.
|
C |
withSize(int width,
int height)
Sets the size of this component in the tab.
|
protected ShuffleboardComponent(ShuffleboardContainer parent, String title, String type)
protected ShuffleboardComponent(ShuffleboardContainer parent, String title)
public final ShuffleboardContainer getParent()
protected final void setType(String type)
public final String getType()
public final String getTitle()
public final C withProperties(Map<String,Object> properties)
properties
- the properties for this componentpublic final C withPosition(int columnIndex, int rowIndex)
If the position of a single component is set, it is recommended to set the positions of all components inside a tab to prevent Shuffleboard from automatically placing another component there before the one with the specific position is sent.
columnIndex
- the column in the tab to place this componentrowIndex
- the row in the tab to place this componentpublic final C withSize(int width, int height)
width
- how many columns wide the component should beheight
- how many rows high the component should beprotected final void buildMetadata(NetworkTable metaTable)
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