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 |
|---|---|
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, runInternaladdPostRunHandler, addPreRunHandler, getTemplateExecutor, getTerminal, hasTty, loop, render, renderTemplateResource, run, runPostRunHandlers, runPreRunHandlers, setPrintResults, setRenderer, setResourceLoader, setTemplateExecutor, setTemplateLocationpublic 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)
public PathInput.PathInputContext getThisContext(ComponentContext<?> context)
AbstractComponentgetThisContext in class AbstractComponent<PathInput.PathInputContext>context - the contextprotected boolean read(org.jline.keymap.BindingReader bindingReader,
org.jline.keymap.KeyMap<String> keyMap,
PathInput.PathInputContext context)
AbstractComponentread in class AbstractComponent<PathInput.PathInputContext>bindingReader - the binding readerkeyMap - the key mapcontext - the contextpublic void setPathProvider(Function<String,Path> pathProvider)
pathProvider - the path providerCopyright © 2023. All rights reserved.