public class PathInput extends AbstractTextComponent<Path,PathInput.PathInputContext>
Modifier and Type | Class and Description |
---|---|
static interface |
PathInput.PathInputContext |
AbstractTextComponent.BaseTextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>, AbstractTextComponent.TextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T,C>>
OPERATION_BACKSPACE, OPERATION_CHAR, OPERATION_DOWN, OPERATION_EXIT, OPERATION_SELECT, OPERATION_UP
Constructor and Description |
---|
PathInput(org.jline.terminal.Terminal terminal) |
PathInput(org.jline.terminal.Terminal terminal,
String name) |
PathInput(org.jline.terminal.Terminal terminal,
String name,
Function<PathInput.PathInputContext,List<org.jline.utils.AttributedString>> renderer) |
Modifier and Type | Method and Description |
---|---|
protected PathInput.PathInputContext |
getThisContext(ComponentContext<?> context)
Gets a real component context using common this trick.
|
protected boolean |
read(org.jline.keymap.BindingReader bindingReader,
org.jline.keymap.KeyMap<String> keyMap,
PathInput.PathInputContext context)
Read input.
|
protected Path |
resolvePath(String path)
Resolves a
Path from a given raw path . |
void |
setPathProvider(Function<String,Path> pathProvider)
Sets a path provider.
|
bindKeyMap, getName, runInternal
addPostRunHandler, addPreRunHandler, getTemplateExecutor, getTerminal, loop, render, renderTemplateResource, run, runPostRunHandlers, runPreRunHandlers, setPrintResults, setRenderer, setResourceLoader, setTemplateExecutor, setTemplateLocation
public PathInput(org.jline.terminal.Terminal terminal)
public PathInput(org.jline.terminal.Terminal terminal, String name)
public PathInput(org.jline.terminal.Terminal terminal, String name, Function<PathInput.PathInputContext,List<org.jline.utils.AttributedString>> renderer)
protected PathInput.PathInputContext getThisContext(ComponentContext<?> context)
AbstractComponent
getThisContext
in class AbstractComponent<PathInput.PathInputContext>
context
- the contextprotected boolean read(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<String> keyMap, PathInput.PathInputContext context)
AbstractComponent
read
in class AbstractComponent<PathInput.PathInputContext>
bindingReader
- the binding readerkeyMap
- the key mapcontext
- the contextpublic void setPathProvider(Function<String,Path> pathProvider)
pathProvider
- the path providerCopyright © 2022. All rights reserved.