Package org.jline.console
Class ConsoleEngine.WidgetCreator
java.lang.Object
org.jline.console.ConsoleEngine.WidgetCreator
- Enclosing interface:
ConsoleEngine
Class for creating widgets from console functions.
A WidgetCreator creates a widget that executes a function defined in the console. This allows console functions to be bound to key sequences and used as widgets.
-
Constructor Summary
ConstructorsConstructorDescriptionWidgetCreator
(ConsoleEngine consoleEngine, String function) Creates a new widget creator for the specified function. -
Method Summary
-
Constructor Details
-
WidgetCreator
Creates a new widget creator for the specified function.- Parameters:
consoleEngine
- the console engine that will execute the functionfunction
- the name of the function to execute
-
-
Method Details
-
apply
public boolean apply()Executes the function when the widget is applied. -
toString
Returns the name of the function.
-