java.lang.Object | +--com.sun.kjava.TextBox | +--com.sun.kjava.ScrollTextBox
スクロールする 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 |
コンストラクタの詳細 |
protected ScrollTextBox()
public ScrollTextBox(java.lang.String t, int x, int y, int w, int h)
t
- 初期テキストx
- ScrollTextBox の位置の X 座標y
- ScrollTextBox の位置の Y 座標w
- 幅h
- 高さメソッドの詳細 |
public void setBounds(int x, int y, int w, int h)
x
- ScrollTextBox の位置の新しい X 座標y
- ScrollTextBox の位置の新しい Y 座標w
- 新しい幅h
- 新しい高さpublic void setText(java.lang.String t)
t
- 新しいテキストを表す文字列protected void init()
public boolean contains(int x, int y)
x
- 判定位置の X 座標y
- 判定位置の Y 座標public void handlePenDown(int x, int y)
x
- ペンの位置の X 座標y
- ペンの位置の Y 座標public void handlePenMove(int x, int y)
x
- ペンの位置の X 座標y
- ペンの位置の Y 座標public void handleKeyDown(int keyCode)
keyCode
- ユーザが押したキーを表すコードpublic void paint()
public void setScrollValue(int val)
val
- 新しいスクロール値