クラス StringInput
java.lang.ObjectSE
org.springframework.shell.jline.tui.component.support.AbstractComponent<C>
org.springframework.shell.jline.tui.component.support.AbstractTextComponent<StringSE,StringInput.StringInputContext>
org.springframework.shell.jline.tui.component.StringInput
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.Aware,org.springframework.context.ResourceLoaderAware
単純な文字列入力のコンポーネント。
- 作成者:
- Janne Valkealahti, Piotr Olaszewski
ネストされたクラスの概要
ネストされたクラスクラス org.springframework.shell.jline.tui.component.support.AbstractTextComponent から継承されたネストクラス / インターフェース
AbstractTextComponent.BaseTextComponentContext<T,C extends AbstractTextComponent.TextComponentContext<T, C>>, AbstractTextComponent.TextComponentContext<T, C extends AbstractTextComponent.TextComponentContext<T, C>> フィールド概要
クラス org.springframework.shell.jline.tui.component.support.AbstractComponent から継承されたフィールド
OPERATION_BACKSPACE, OPERATION_CHAR, OPERATION_DOWN, OPERATION_EXIT, OPERATION_SELECT, OPERATION_UNICODE, OPERATION_UPコンストラクター概要
コンストラクターコンストラクター説明StringInput(org.jline.terminal.Terminal terminal) StringInput(org.jline.terminal.Terminal terminal, @Nullable StringSE name, @Nullable StringSE defaultValue) StringInput(org.jline.terminal.Terminal terminal, @Nullable StringSE name, @Nullable StringSE defaultValue, @Nullable FunctionSE<StringInput.StringInputContext, ListSE<org.jline.utils.AttributedString>> renderer) StringInput(org.jline.terminal.Terminal terminal, @Nullable StringSE name, @Nullable StringSE defaultValue, @Nullable FunctionSE<StringInput.StringInputContext, ListSE<org.jline.utils.AttributedString>> renderer, boolean required) 方法の概要
修飾子と型メソッド説明getThisContext(@Nullable ComponentContext<?> context) 共通のこのトリックを使用して、実際のコンポーネントコンテキストを取得します。protected booleanread(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<StringSE> keyMap, StringInput.StringInputContext context) 入力を読み取ります。voidsetMaskCharacter(@Nullable CharacterSE maskCharacter) 入力値と結果値のマスク文字を設定します。voidsetRequired(boolean required) 結果が空でないことを確認するために必須フラグを設定しますクラス org.springframework.shell.jline.tui.component.support.AbstractTextComponent から継承されたメソッド
bindKeyMap, getName, runInternalクラス org.springframework.shell.jline.tui.component.support.AbstractComponent から継承されたメソッド
addPostRunHandler, addPreRunHandler, getTemplateExecutor, getTerminal, hasTty, loop, render, renderTemplateResource, run, runPostRunHandlers, runPreRunHandlers, setPrintResults, setRenderer, setResourceLoader, setTemplateExecutor, setTemplateLocation
コンストラクターの詳細
StringInput
public StringInput(org.jline.terminal.Terminal terminal) StringInput
StringInput
public StringInput(org.jline.terminal.Terminal terminal, @Nullable StringSE name, @Nullable StringSE defaultValue, @Nullable FunctionSE<StringInput.StringInputContext, ListSE<org.jline.utils.AttributedString>> renderer) StringInput
public StringInput(org.jline.terminal.Terminal terminal, @Nullable StringSE name, @Nullable StringSE defaultValue, @Nullable FunctionSE<StringInput.StringInputContext, ListSE<org.jline.utils.AttributedString>> renderer, boolean required)
方法の詳細
setMaskCharacter
入力値と結果値のマスク文字を設定します。- パラメーター:
maskCharacter- マスクのキャラクター
setRequired
public void setRequired(boolean required) 結果が空でないことを確認するために必須フラグを設定します- パラメーター:
required- 入力が必要な場合
getThisContext
クラスからコピーされた説明:AbstractComponent共通のこのトリックを使用して、実際のコンポーネントコンテキストを取得します。- 次で指定:
- クラス
AbstractComponent<StringInput.StringInputContext>のgetThisContext - パラメーター:
context- コンテキスト- 戻り値:
- コンポーネントコンテキスト
read
protected boolean read(org.jline.keymap.BindingReader bindingReader, org.jline.keymap.KeyMap<StringSE> keyMap, StringInput.StringInputContext context) クラスからコピーされた説明:AbstractComponent入力を読み取ります。- 次で指定:
- クラス
AbstractComponent<StringInput.StringInputContext>のread - パラメーター:
bindingReader- バインディングリーダーkeyMap- キーマップcontext- コンテキスト- 戻り値:
- 読み取りが完了した場合は true、停止する場合は false