DefaultBlocks

public final class DefaultBlocks extends Object

Constants class for all default block definitions and supporting files.

Constant Summary

String COLOR_BLOCKS_PATH Path to block definitions for blocks related to colors.
String LIST_BLOCKS_PATH Path to block definitions for blocks related to lists.
String LOGIC_BLOCKS_PATH Path to block definitions for blocks related to logic (if statements, etc.).
String LOOP_BLOCKS_PATH Path to block definitions for blocks related to loops.
String MATH_BLOCKS_PATH Path to block definitions for blocks related to math, including math on lists.
String PROCEDURE_BLOCKS_PATH Path to block definitions for blocks related to procedures (user defined functions).
String PROCEDURE_CATEGORY_NAME
String TEXT_BLOCKS_PATH Path to block definitions for blocks related to strings/text.
String TOOLBOX_PATH Path to a toolbox that has most of the default blocks organized into categories.
String VARIABLE_BLOCKS_PATH Path to block definitions for blocks related to variables.
String VARIABLE_CATEGORY_NAME

Field Summary

public static final LanguageDefinition LANGUAGE_DEFINITION Default language definition uses the JavaScript language generator.

Public Method Summary

static List<String>
getAllBlockDefinitions()
Returns the default list of BlockExtensions.
static Map<String, BlockExtension>
getExtensions()
Returns the default list of BlockExtensions.
static Map<String, Factory>
static Map<String, Factory>
getMutators()
Returns the default list of factories for the default Mutators.
static Map<String, CustomCategory>

Inherited Method Summary

Constants

public static final String COLOR_BLOCKS_PATH

Path to block definitions for blocks related to colors.

Constant Value: "default/colour_blocks.json"

public static final String LIST_BLOCKS_PATH

Path to block definitions for blocks related to lists. Does not include math on lists.

Constant Value: "default/list_blocks.json"

public static final String LOGIC_BLOCKS_PATH

Path to block definitions for blocks related to logic (if statements, etc.).

Constant Value: "default/logic_blocks.json"

public static final String LOOP_BLOCKS_PATH

Path to block definitions for blocks related to loops.

Constant Value: "default/loop_blocks.json"

public static final String MATH_BLOCKS_PATH

Path to block definitions for blocks related to math, including math on lists.

Constant Value: "default/math_blocks.json"

public static final String PROCEDURE_BLOCKS_PATH

Path to block definitions for blocks related to procedures (user defined functions).

Constant Value: "default/procedures.json"

public static final String PROCEDURE_CATEGORY_NAME

Constant Value: "PROCEDURE"

public static final String TEXT_BLOCKS_PATH

Path to block definitions for blocks related to strings/text.

Constant Value: "default/text_blocks.json"

public static final String TOOLBOX_PATH

Path to a toolbox that has most of the default blocks organized into categories.

Constant Value: "default/toolbox.xml"

public static final String VARIABLE_BLOCKS_PATH

Path to block definitions for blocks related to variables.

Constant Value: "default/variable_blocks.json"

public static final String VARIABLE_CATEGORY_NAME

Constant Value: "VARIABLE"

Fields

public static final LanguageDefinition LANGUAGE_DEFINITION

Default language definition uses the JavaScript language generator.

Public Methods

public static List<String> getAllBlockDefinitions ()

Returns the default list of BlockExtensions. This list is loaded lazily, so it will not load the Extension and related classes if never called.

Returns
  • The map of default extensions, keyed by extension id.

public static Map<String, BlockExtension> getExtensions ()

Returns the default list of BlockExtensions. This list is loaded lazily, so it will not load the Extension and related classes if never called.

Returns
  • The map of default extensions, keyed by extension id.

public static Map<String, Factory> getMutatorUis ()

public static Map<String, Factory> getMutators ()

Returns the default list of factories for the default Mutators. This list is loaded lazily, so it will not load the related classes if never called.

Returns
  • The map of factories for the default mutators, keyed by mutator id.

public static Map<String, CustomCategory> getToolboxCustomCategories (BlocklyController controller)

Parameters
controller