クラス AbstractView

java.lang.ObjectSE
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.AbstractView
実装済みのインターフェース一覧:
ControlView
既知の直属サブクラス
BoxViewWindowView

public abstract class AbstractView extends AbstractControl implements View
View の基本実装とその親インターフェース Control は、実装にいくつかの共通機能を提供します。
  • コンストラクターの詳細

    • AbstractView

      public AbstractView()
  • 方法の詳細

    • onDestroy

      protected void onDestroy(reactor.core.Disposable disposable)
      ビューの終了時に破棄されるように Disposable を登録します。
      パラメーター:
      disposable - 処分する使い捨て品
    • destroy

      public void destroy()
      View の実行状態をクリーンアップして、ガベージコレクションを取得できるようにします。
    • init

      public final void init()
      ビューを初期化します。ほとんどは将来の使用のために予約されており、単純に initInternal() を呼び出します。
      次で指定:
      インターフェース View 内の init 
      関連事項:
    • shortcut

      public void shortcut(IntegerSE key, RunnableSE runnable)
    • initInternal

      protected void initInternal()
      init() から呼び出される内部 init メソッド。何か役に立つことを行うためにオーバーライドします。通常、キーとマウスのバインドはこのメソッドから登録されます。
    • setLayer

      public void setLayer(int index)
      インターフェースからコピーされた説明: View
      この View が動作するレイヤーインデックスを設定します。
      次で指定:
      インターフェース View 内の setLayer 
      パラメーター:
      index - レイヤーインデックス
    • getLayer

      protected int getLayer()
    • draw

      public final void draw(Screen screen)
      描画ロジックを 2 段階で呼び出します。最初に背景が描画され、次に実際のコンテンツが描画されます。このロジックにより、通常、背景は子でオーバーライドされる必要がありますが、実際のコンテンツは親でオーバーライドされる必要があるため、子実装が描画ロジックを使用する方法を親から分離できます。
      次で指定:
      インターフェース Control 内の draw 
      パラメーター:
      screen - スクリーン
    • drawInternal

      protected abstract void drawInternal(Screen screen)
      コンポーネント内部の描画方法。クラスを実装するには、Screen に何かを描画するためにこのメソッドを定義する必要があります。
      パラメーター:
      screen - スクリーン
    • drawBackground

      protected void drawBackground(Screen screen)
      背景の内部描画メソッド。
      パラメーター:
      screen - スクリーン
    • focus

      public void focus(View view, boolean focus)
      インターフェースからコピーされた説明: View
      View がフォーカスを取得または失ったときに呼び出されます。
      次で指定:
      インターフェース View 内の focus 
      パラメーター:
      view - フォーカスを受け取るビュー
      focus - フォーカスを受け取った場合のフラグ
    • hasFocus

      public boolean hasFocus()
      インターフェースからコピーされた説明: View
      この View にフォーカスがあるかどうかを取得します。
      次で指定:
      インターフェース View 内の hasFocus 
      戻り値:
      ビューにフォーカスがある場合は true
    • getMouseHandler

      public MouseHandler getMouseHandler()
      登録されたコンシューマーをイベントループにディスパッチすることで、マウスイベントを処理します。オーバーライドしてデフォルトの動作を変更します。
      次で指定:
      インターフェース View 内の getMouseHandler 
      戻り値:
      ビューマウスハンドラー
      関連事項:
    • getKeyHandler

      public KeyHandler getKeyHandler()
      登録された実行可能なコマンドをイベントループにディスパッチすることでキーを処理します。オーバーライドしてデフォルトの動作を変更します。
      次で指定:
      インターフェース View 内の getKeyHandler 
      戻り値:
      ビューキーハンドラー
      関連事項:
    • getHotKeyHandler

      public KeyHandler getHotKeyHandler()
      インターフェースからコピーされた説明: View
      View ホットキー KeyHandler を取得します。ビューがキーイベントを処理しないことを示す null の場合もあります。
      次で指定:
      インターフェース View 内の getHotKeyHandler 
      戻り値:
      ビューのホットキーハンドラー
      関連事項:
    • setDrawFunction

      public void setDrawFunction(BiFunctionSE<Screen,Rectangle,Rectangle> drawFunction)
      View が描画された後に呼び出されるコールバック関数を設定します。
      パラメーター:
      drawFunction - 描画機能
    • getDrawFunction

      public BiFunctionSE<Screen,Rectangle,Rectangle> getDrawFunction()
      描画関数を取得します。
      戻り値:
      関数が設定されていない場合は null
      関連事項:
    • setEventLoop

      public void setEventLoop(@Nullable EventLoop eventLoop)
      EventLoop を設定します。
      次で指定:
      インターフェース View 内の setEventLoop 
      パラメーター:
      eventLoop - イベントループ
    • getEventLoop

      protected EventLoop getEventLoop()
      EventLoop を取得します。
      戻り値:
      イベントループ
    • setViewService

      public void setViewService(ViewService viewService)
      ViewService を設定する
      次で指定:
      インターフェース View 内の setViewService 
      パラメーター:
      viewService - ビューサービス
    • getViewService

      protected ViewService getViewService()
      ViewService を入手
      戻り値:
      サービスを見る
    • registerViewCommand

      protected void registerViewCommand(StringSE command, RunnableSE runnable)
    • getViewCommands

      public SetSE<StringSE> getViewCommands()
      インターフェースからコピーされた説明: View
      サポートされているコマンドを取得します。
      次で指定:
      インターフェース View 内の getViewCommands 
      戻り値:
      サポートされているコマンド
      関連事項:
    • registerKeyBinding

      protected void registerKeyBinding(IntegerSE keyType, StringSE keyCommand)
    • registerKeyBinding

      protected void registerKeyBinding(IntegerSE keyType, KeyBindingConsumer keyConsumer)
    • registerKeyBinding

      protected void registerKeyBinding(IntegerSE keyType, RunnableSE keyRunnable)
    • registerHotKeyBinding

      protected void registerHotKeyBinding(IntegerSE keyType, StringSE keyCommand)
    • registerHotKeyBinding

      protected void registerHotKeyBinding(IntegerSE keyType, KeyBindingConsumer keyConsumer)
    • registerHotKeyBinding

      protected void registerHotKeyBinding(IntegerSE keyType, RunnableSE keyRunnable)
    • 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

      protected void registerMouseBinding(IntegerSE keyType, StringSE mouseCommand)
    • registerMouseBinding

      protected void registerMouseBinding(IntegerSE keyType, MouseBindingConsumer mouseConsumer)
    • registerMouseBinding

      protected void registerMouseBinding(IntegerSE keyType, RunnableSE mouseRunnable)
    • dispatch

      protected void dispatch(org.springframework.messaging.Message<?> message)
      Message をイベントループにディスパッチします。
      パラメーター:
      message - 送信するメッセージ
    • dispatchRunnable

      protected boolean dispatchRunnable(RunnableSE runnable)
    • runViewCommand

      public boolean runViewCommand(StringSE command)
      インターフェースからコピーされた説明: 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)