Annotation Type Config


  • @Repeatable(Configs.class)
    @Target({FIELD,METHOD,PARAMETER})
    @Retention(RUNTIME)
    public @interface Config
    Binds a setter or interactive object to its default interactive widget on Shuffleboard. Defaults to a toggle button for booleans, and a text field for numerics. Numerics default to a value of 0, booleans to false.

    For multi-argument setters, constructs a list containing the default widget type for each argument. Names for each argument's widget are taken from the method's parameter names. Multi-argument setters are only supported through default widgets - there is no support for specifying per-argument widget types. If more detailed control is desired, write individual setters.

    • Element Detail

      • name

        java.lang.String name
        Returns:
        The name of the value on Shuffleboard; defaults to field or method name.
        Default:
        "NO_NAME"
      • tabName

        java.lang.String tabName
        Returns:
        The name of the tab in which to place this widget, if the default inferred tab/layout is not desired. Users should be careful to avoid namespace collisions if the default tab is not used. Note that Log and config annotations can be repeated to place widgets on multiple tabs. Note also that this feature is NOT currently supported for NT-only mode!
        Default:
        "DEFAULT"
      • methodName

        java.lang.String methodName
        Returns:
        Optional name of a method to call on the field (or return value of the method) to obtain the actual setter that will be bound. Useful if one does not desire to make an entire object Loggable, but still wants to bind one of its setters.
        Default:
        "DEFAULT"
      • methodTypes

        java.lang.Class<?>[] methodTypes
        Returns:
        Parameter types of named method, if method name is provided.
        Default:
        {}
      • defaultValueBoolean

        boolean defaultValueBoolean
        Returns:
        The default value for this setter if it is a single-argument boolean setter.
        Default:
        false
      • defaultValueNumeric

        double defaultValueNumeric
        Returns:
        The default value for this setter if it is a single-argument numeric setter.
        Default:
        0.0
      • rowIndex

        int rowIndex
        Returns:
        The row in which this widget should be placed. WARNING: If position/size is specified for one widget in an object, it should be specified for all widgets in that object to avoid overlaps.
        Default:
        -1
      • columnIndex

        int columnIndex
        Returns:
        The column in which this widget should be placed. WARNING: If position/size is specified for one widget in an object, it should be specified for all widgets in that object to avoid overlaps.
        Default:
        -1
      • width

        int width
        Returns:
        The width of this widget. WARNING: If position/size is specified for one widget in an object, it should be specified for all widgets in that object to avoid overlaps.
        Default:
        -1
      • height

        int height
        Returns:
        The height of this widget. WARNING: If position/size is specified for one widget in an object, it should be specified for all widgets in that object to avoid overlaps.
        Default:
        -1
      • multiArgLayoutType

        java.lang.String multiArgLayoutType
        Returns:
        The type of layout to use if the annotation target is a multi-parameter setter. Must be either "listLayout" or "gridLayout."
        Default:
        "listLayout"
      • numGridColumns

        int numGridColumns
        Returns:
        The number of grid columns if the annotation target is a multi-parameter setter and the layout type is set to grid.
        Default:
        3
      • numGridRows

        int numGridRows
        Returns:
        The number of grid rows if the annotation target is a multi-parameter setter and the layout type is set to grid.
        Default:
        3