Class ToolboxUtil


  • public class ToolboxUtil
    extends Object
    A class that provides utility methods related to the toolbox.
    • Method Detail

      • makeNumberShadow

        public static String makeNumberShadow​(int n)
        Creates a shadow number block with the given number.
      • makeNumberShadow

        public static String makeNumberShadow​(double n)
        Creates a shadow number block with the given number.
      • makeBooleanShadow

        public static String makeBooleanShadow​(boolean value)
        Creates a shadow boolean block with the given value.
      • makeTextShadow

        public static String makeTextShadow​(String text)
        Creates a shadow text block with the given value.
      • makeTypedEnumShadow

        public static String makeTypedEnumShadow​(HardwareType hardwareType,
                                                 String enumType)
        Creates a shadow enum block with the given HardwareType and enum type.
      • makeTypedEnumShadow

        public static String makeTypedEnumShadow​(HardwareType hardwareType,
                                                 String enumType,
                                                 String fieldName,
                                                 String fieldValue)
        Creates a shadow enum block with the given HardwareType, enum type, fieldName, and fieldValue.
      • makeTypedEnumShadow

        public static String makeTypedEnumShadow​(String blockTypePrefix,
                                                 String enumType)
        Creates a shadow enum block with the given blockTypePrefix and enum type.
      • makeTypedEnumShadow

        public static String makeTypedEnumShadow​(String blockTypePrefix,
                                                 String enumType,
                                                 String fieldName,
                                                 String fieldValue)
        Creates a shadow enum block with the given blockTypePrefix, enum type, fieldName, and fieldValue.
      • makeVariableGetBlock

        public static String makeVariableGetBlock​(String t)
        Creates a variable get block.
      • addDualPropertySetters

        public static void addDualPropertySetters​(StringBuilder xmlToolbox,
                                                  HardwareType hardwareType,
                                                  String propertyName,
                                                  String propertyType,
                                                  String identifier1,
                                                  String setterValue1,
                                                  String identifier2,
                                                  String setterValue2)
        Appends dual property setter blocks to the toolbox.
      • escapeForXml

        public static String escapeForXml​(String s)