クラス AbstractView
java.lang.ObjectSE
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.AbstractView
- 既知の直属サブクラス
BoxView,WindowView
コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voiddestroy()Viewの実行状態をクリーンアップして、ガベージコレクションを取得できるようにします。protected voiddispatch(org.springframework.messaging.Message<?> message) Messageをイベントループにディスパッチします。protected booleandispatchKeyRunCommand(KeyEvent event, org.springframework.shell.component.view.control.AbstractView.KeyBindingValue keyBindingValue) protected booleandispatchMouseRunCommand(MouseEvent event, org.springframework.shell.component.view.control.AbstractView.MouseBindingValue mouseBindingValue) protected booleandispatchRunnable(RunnableSE runnable) final void描画ロジックを 2 段階で呼び出します。protected voiddrawBackground(Screen screen) 背景の内部描画メソッド。protected abstract voiddrawInternal(Screen screen) コンポーネント内部の描画方法。voidViewがフォーカスを取得または失ったときに呼び出されます。描画関数を取得します。protected EventLoopEventLoopを取得します。protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.KeyBindingValue> ホットキーバインディングを取得します。ViewホットキーKeyHandlerを取得します。protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.KeyBindingValue> キーバインディングを取得します。登録された実行可能なコマンドをイベントループにディスパッチすることでキーを処理します。protected intgetLayer()protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.MouseBindingValue> マウスバインディングを取得します。登録されたコンシューマーをイベントループにディスパッチすることで、マウスイベントを処理します。サポートされているコマンドを取得します。protected ViewServiceViewServiceを入手booleanhasFocus()このViewにフォーカスがあるかどうかを取得します。final voidinit()ビューを初期化します。protected voidinit()から呼び出される内部 init メソッド。protected voidonDestroy(reactor.core.Disposable disposable) ビューの終了時に破棄されるようにDisposableを登録します。protected voidregisterHotKeyBinding(IntegerSE keyType, RunnableSE keyRunnable) protected voidregisterHotKeyBinding(IntegerSE keyType, StringSE keyCommand) protected voidregisterHotKeyBinding(IntegerSE keyType, KeyBindingConsumer keyConsumer) protected voidregisterKeyBinding(IntegerSE keyType, RunnableSE keyRunnable) protected voidregisterKeyBinding(IntegerSE keyType, StringSE keyCommand) protected voidregisterKeyBinding(IntegerSE keyType, KeyBindingConsumer keyConsumer) protected voidregisterMouseBinding(IntegerSE keyType, RunnableSE mouseRunnable) protected voidregisterMouseBinding(IntegerSE keyType, StringSE mouseCommand) protected voidregisterMouseBinding(IntegerSE keyType, MouseBindingConsumer mouseConsumer) protected voidregisterViewCommand(StringSE command, RunnableSE runnable) booleanrunViewCommand(StringSE command) コマンドの実行。voidsetDrawFunction(BiFunctionSE<Screen, Rectangle, Rectangle> drawFunction) Viewが描画された後に呼び出されるコールバック関数を設定します。voidsetEventLoop(EventLoop eventLoop) EventLoopを設定します。voidsetLayer(int index) このViewが動作するレイヤーインデックスを設定します。voidsetViewService(ViewService viewService) ViewServiceを設定するvoidshortcut(IntegerSE key, RunnableSE runnable) クラス org.springframework.shell.component.view.control.AbstractControl から継承されたメソッド
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, resolveThemeStyle, setRect, setThemeName, setThemeResolverクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.shell.component.view.control.Control から継承されたメソッド
getRect, setRect, setThemeName, setThemeResolver
コンストラクターの詳細
AbstractView
public AbstractView()
方法の詳細
onDestroy
protected void onDestroy(reactor.core.Disposable disposable) ビューの終了時に破棄されるようにDisposableを登録します。- パラメーター:
disposable- 処分する使い捨て品
destroy
public void destroy()Viewの実行状態をクリーンアップして、ガベージコレクションを取得できるようにします。init
public final void init()ビューを初期化します。ほとんどは将来の使用のために予約されており、単純にinitInternal()を呼び出します。shortcut
initInternal
protected void initInternal()init()から呼び出される内部 init メソッド。何か役に立つことを行うためにオーバーライドします。通常、キーとマウスのバインドはこのメソッドから登録されます。setLayer
public void setLayer(int index) インターフェースからコピーされた説明:ViewこのViewが動作するレイヤーインデックスを設定します。getLayer
protected int getLayer()draw
描画ロジックを 2 段階で呼び出します。最初に背景が描画され、次に実際のコンテンツが描画されます。このロジックにより、通常、背景は子でオーバーライドされる必要がありますが、実際のコンテンツは親でオーバーライドされる必要があるため、子実装が描画ロジックを使用する方法を親から分離できます。drawInternal
コンポーネント内部の描画方法。クラスを実装するには、Screenに何かを描画するためにこのメソッドを定義する必要があります。- パラメーター:
screen- スクリーン
drawBackground
背景の内部描画メソッド。- パラメーター:
screen- スクリーン
focus
インターフェースからコピーされた説明:ViewViewがフォーカスを取得または失ったときに呼び出されます。hasFocus
public boolean hasFocus()インターフェースからコピーされた説明:ViewこのViewにフォーカスがあるかどうかを取得します。getMouseHandler
登録されたコンシューマーをイベントループにディスパッチすることで、マウスイベントを処理します。オーバーライドしてデフォルトの動作を変更します。- 次で指定:
- インターフェース
View内のgetMouseHandler - 戻り値:
- ビューマウスハンドラー
- 関連事項:
getKeyHandler
登録された実行可能なコマンドをイベントループにディスパッチすることでキーを処理します。オーバーライドしてデフォルトの動作を変更します。- 次で指定:
- インターフェース
View内のgetKeyHandler - 戻り値:
- ビューキーハンドラー
- 関連事項:
getHotKeyHandler
インターフェースからコピーされた説明:View- 次で指定:
- インターフェース
View内のgetHotKeyHandler - 戻り値:
- ビューのホットキーハンドラー
- 関連事項:
setDrawFunction
Viewが描画された後に呼び出されるコールバック関数を設定します。- パラメーター:
drawFunction- 描画機能
getDrawFunction
描画関数を取得します。- 戻り値:
- 関数が設定されていない場合は null
- 関連事項:
setEventLoop
EventLoopを設定します。- 次で指定:
- インターフェース
View内のsetEventLoop - パラメーター:
eventLoop- イベントループ
getEventLoop
EventLoopを取得します。- 戻り値:
- イベントループ
setViewService
ViewServiceを設定する- 次で指定:
- インターフェース
View内のsetViewService - パラメーター:
viewService- ビューサービス
getViewService
ViewServiceを入手- 戻り値:
- サービスを見る
registerViewCommand
getViewCommands
インターフェースからコピーされた説明:Viewサポートされているコマンドを取得します。- 次で指定:
- インターフェース
View内のgetViewCommands - 戻り値:
- サポートされているコマンド
- 関連事項:
registerKeyBinding
registerKeyBinding
registerKeyBinding
registerHotKeyBinding
registerHotKeyBinding
registerHotKeyBinding
getKeyBindings
protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.KeyBindingValue> getKeyBindings()キーバインディングを取得します。- 戻り値:
- キーバインド
getHotKeyBindings
protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.KeyBindingValue> getHotKeyBindings()ホットキーバインディングを取得します。- 戻り値:
- ホットキーバインディング
getMouseBindings
protected MapSE<IntegerSE,org.springframework.shell.component.view.control.AbstractView.MouseBindingValue> getMouseBindings()マウスバインディングを取得します。- 戻り値:
- マウスバインディング
registerMouseBinding
registerMouseBinding
registerMouseBinding
dispatch
protected void dispatch(org.springframework.messaging.Message<?> message) Messageをイベントループにディスパッチします。- パラメーター:
message- 送信するメッセージ
dispatchRunnable
runViewCommand
インターフェースからコピーされた説明:Viewコマンドの実行。- 次で指定:
- インターフェース
View内のrunViewCommand - パラメーター:
command- 実行するコマンド- 戻り値:
- コマンドが正常にディスパッチされた場合は true
- 関連事項:
dispatchKeyRunCommand
protected boolean dispatchKeyRunCommand(KeyEvent event, org.springframework.shell.component.view.control.AbstractView.KeyBindingValue keyBindingValue) dispatchMouseRunCommand
protected boolean dispatchMouseRunCommand(MouseEvent event, org.springframework.shell.component.view.control.AbstractView.MouseBindingValue mouseBindingValue)