BlockListUI

public interface BlockListUI
Known Indirect Subclasses

An interface that specifies the actions that can be taken on a flyout ui component.

Public Method Summary

abstract boolean
closeUi()
Attempts to hide or close the blocks UI (e.g., a drawer).
abstract void
init(BlocklyController controller, FlyoutCallback callback)
Connects the BlockListUI to the application's drag and click handling.
abstract boolean
abstract boolean
isOpen()
abstract void
setCurrentCategory(BlocklyCategory category)
Sets the Flyout's current BlocklyCategory, including opening or closing the drawer.

Public Methods

public abstract boolean closeUi ()

Attempts to hide or close the blocks UI (e.g., a drawer).

Returns
  • True if an action was taken (the drawer is closeable and was previously open).

public abstract void init (BlocklyController controller, FlyoutCallback callback)

Connects the BlockListUI to the application's drag and click handling. It is called by setToolboxUi(BlockListUI, CategorySelectorUI) and should not be called by the application developer.

Parameters
controller
callback The callback that will handle user actions in the flyout.

public abstract boolean isCloseable ()

Returns
  • True if this flyout is allowed to close, false otherwise.

public abstract boolean isOpen ()

Returns
  • True if this UI is currently visible, false otherwise.

public abstract void setCurrentCategory (BlocklyCategory category)

Sets the Flyout's current BlocklyCategory, including opening or closing the drawer. In closeable toolboxes, null category is equivalent to closing the drawer. Otherwise, the drawer will be rendered empty.

Parameters
category The BlocklyCategory with blocks to display.