Package org.jline.console
Class ConsoleEngine.WidgetCreator
- java.lang.Object
-
- org.jline.console.ConsoleEngine.WidgetCreator
-
- Enclosing interface:
- ConsoleEngine
public static class ConsoleEngine.WidgetCreator extends java.lang.Object implements Widget
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
Constructors Constructor Description WidgetCreator(ConsoleEngine consoleEngine, java.lang.String function)
Creates a new widget creator for the specified function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply()
Executes the function when the widget is applied.java.lang.String
toString()
Returns the name of the function.
-
-
-
Constructor Detail
-
WidgetCreator
public WidgetCreator(ConsoleEngine consoleEngine, java.lang.String function)
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
-
-