Recipes.WorkbenchUIHandler
Index
Constructors
constructor
Constructs a new Workbench UI handler.
Parameters
target: ElementSet
target UI.WindowContent.elements section
targetCon: Container
target container
field: WorkbenchField
workbench field
Returns WorkbenchUIHandler
Methods
deselectCurrentRecipe
Deselects current recipe (asynchronously).
Returns void
refresh
Refreshes all the recipes in the workbench.
Returns number
Amount of recipes displayed.
refreshAsync
Runs recipes refresh in the ticking thread delaying refresh process for a tick. To get recipes count use WorkbenchUIHandler.setOnRefreshListener.
Returns void
setMaximumRecipesToShow
Sets workbench recipes displaying limit.
Parameters
count: number
count of the recipes to show
Returns void
setOnRefreshListener
Registers listener to be notified when the workbench starts and completes refreshing.
Parameters
listener: { onRefreshCompleted: (count: number) => void; onRefreshStarted: () => void }
workbench refresh listener
onRefreshCompleted: (count: number) => void
onRefreshStarted: () => void
Returns void
setOnSelectionListener
Registers listener to be notified when some recipe is selected.
Parameters
listener: { onRecipeSelected: (recipe: WorkbenchRecipe) => void }
recipe selection listener
onRecipeSelected: (recipe: WorkbenchRecipe) => void
Returns void
setPrefix
Sets custom workbench prefix.
Parameters
prefix: string
custom workbench prefix
Returns void
Class used to simplify creation of custom workbenches.