Class BlocklyPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Closeable, Serializable, AutoCloseable, Accessible

public class BlocklyPanel extends JPanel implements Closeable
See Also:
  • Constructor Details

  • Method Details

    • addTaskToRunAfterLoaded

      public void addTaskToRunAfterLoaded(Runnable runnable)
    • addChangeListener

      public void addChangeListener(ChangeListener listener)
    • getXML

      public String getXML()
    • setInitialXML

      public void setInitialXML(String xml)
      Sets the initial XML configuration for the Blockly workspace. If the workspace has not been loaded yet, the provided XML is stored as the initial XML to be applied upon loading. If the workspace is already loaded, the XML is applied immediately to the workspace.
      Parameters:
      xml - The XML configuration string to set, representing the Blockly workspace structure.
    • addBlocksFromXML

      public void addBlocksFromXML(String xml)
    • addGlobalVariable

      public void addGlobalVariable(String name, String type)
    • addLocalVariable

      public void addLocalVariable(String name, String type)
    • removeLocalVariable

      public void removeLocalVariable(String name)
    • getLocalVariablesList

      public List<VariableElement> getLocalVariablesList()
    • executeLocalScript

      public void executeLocalScript(String script)
    • getMCreator

      public MCreator getMCreator()
    • getType

      public BlocklyEditorType getType()
    • addExternalTrigger

      public void addExternalTrigger(ExternalTrigger external_trigger)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable