Package dk.gtz.graphedit.tool
Interface IToolbox
- All Known Implementing Classes:
Toolbox
public interface IToolbox
Interface for container of
ITools
Can be used as a builder-pattern.-
Method Summary
Modifier and TypeMethodDescriptionAdd a list of tools to the toolboxAdd a list of tools to the toolbox and put them in a categoryaddDefaultTool(ITool tool) Add the tool that will be selected by defaultGet the default tooljavafx.beans.property.ObjectProperty<ITool>Get the currently selected tool observableGet all tools in the toolbox by categoryvoidselectTool(ITool tool) Change which tool is currently selected
-
Method Details
-
getToolsByCategory
Get all tools in the toolbox by category- Returns:
- A mapping of category names to lists of tools
-
addDefaultTool
Add the tool that will be selected by default- Parameters:
tool- The tool to be selected by default- Returns:
- A builder-pattern style reference to this
-
add
Add a list of tools to the toolbox- Parameters:
tool- Varargs of tools to add- Returns:
- A builder-pattern style reference to this
-
add
Add a list of tools to the toolbox and put them in a category- Parameters:
category- The category of the provided toolstool- Varargs of tools to add- Returns:
- A builder-pattern style reference to this
-
getDefaultTool
ITool getDefaultTool()Get the default tool- Returns:
- A tool instance
-
selectTool
Change which tool is currently selected- Parameters:
tool- The tool to select
-
getSelectedTool
javafx.beans.property.ObjectProperty<ITool> getSelectedTool()Get the currently selected tool observable- Returns:
- An observable pointing to the currenlty selected tool
-