com.sun.kjava
クラス ScrollTextBox

java.lang.Object
  |
  +--com.sun.kjava.TextBox
        |
        +--com.sun.kjava.ScrollTextBox
すべての実装インタフェース:
ScrollOwner
直接の既知のサブクラス:
SelectScrollTextBox

public class ScrollTextBox
extends TextBox
implements ScrollOwner

スクロールする TextBox オブジェクトです。 このクラスは、登録済みの Spotlet から制御する必要があります。Spotlet クラスには、このクラスの handlePenDown()、handlePenMove()、および handleKeyDown() メソッドを呼び出す、penDown()、penMove()、および keyDown() が実装されています。


クラス com.sun.kjava.TextBox から継承したフィールド
g, height, heightM, lineEnds, lineStarts, text, width, widthM, xPos, yPos
 
コンストラクタの概要
protected ScrollTextBox()
           
  ScrollTextBox(java.lang.String t, int x, int y, int w, int h)
          新しい ScrollTextBox オブジェクトを作成します。
 
メソッドの概要
 boolean contains(int x, int y)
          この点が、オブジェクトの境界内にあるかどうかを判定します。
 void handleKeyDown(int keyCode)
          ユーザがキーを押しました。
 void handlePenDown(int x, int y)
          ペンが、(x, y) で押されました。
 void handlePenMove(int x, int y)
          ペンは、(x, y) に移動しています。
protected  void init()
          オブジェクトを初期化します。
 void paint()
          ScrollTextBox をペイントします。
 void setBounds(int x, int y, int w, int h)
          ScrollTextBox の表示領域をリセットします。
 void setScrollValue(int val)
          現在のスクロール値を設定し、ペイントし直します。
 void setText(java.lang.String t)
          テキストを設定します。
 
クラス com.sun.kjava.TextBox から継承したメソッド
getNumLines
 
クラス java.lang.Object から継承したメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ScrollTextBox

protected ScrollTextBox()

ScrollTextBox

public ScrollTextBox(java.lang.String t,
                     int x,
                     int y,
                     int w,
                     int h)
新しい ScrollTextBox オブジェクトを作成します。
パラメータ:
t - 初期テキスト
x - ScrollTextBox の位置の X 座標
y - ScrollTextBox の位置の Y 座標
w - 幅
h - 高さ
メソッドの詳細

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
ScrollTextBox の表示領域をリセットします。
オーバーライド:
クラス TextBox 内の setBounds
パラメータ:
x - ScrollTextBox の位置の新しい X 座標
y - ScrollTextBox の位置の新しい Y 座標
w - 新しい幅
h - 新しい高さ

setText

public void setText(java.lang.String t)
テキストを設定します。ScrollTextBox オブジェクトに対して paint() を呼び出し、新しいテキストまたはスクロールバーを表示します。
オーバーライド:
クラス TextBox 内の setText
パラメータ:
t - 新しいテキストを表す文字列

init

protected void init()
オブジェクトを初期化します。

contains

public boolean contains(int x,
                        int y)
この点が、オブジェクトの境界内にあるかどうかを判定します。
パラメータ:
x - 判定位置の X 座標
y - 判定位置の Y 座標
戻り値:
点が境界内にある場合は true

handlePenDown

public void handlePenDown(int x,
                          int y)
ペンが、(x, y) で押されました。適切な処理を行います。
パラメータ:
x - ペンの位置の X 座標
y - ペンの位置の Y 座標

handlePenMove

public void handlePenMove(int x,
                          int y)
ペンは、(x, y) に移動しています。適切な処理を行います。
パラメータ:
x - ペンの位置の X 座標
y - ペンの位置の Y 座標

handleKeyDown

public void handleKeyDown(int keyCode)
ユーザがキーを押しました。適切な処理を行います。
パラメータ:
keyCode - ユーザが押したキーを表すコード

paint

public void paint()
ScrollTextBox をペイントします。
オーバーライド:
クラス TextBox 内の paint

setScrollValue

public void setScrollValue(int val)
現在のスクロール値を設定し、ペイントし直します。
定義:
インタフェース ScrollOwner 内の setScrollValue
パラメータ:
val - 新しいスクロール値