java.lang.Object | +--com.sun.kjava.TextBox
テキストを表示する、画面上のボックスです。このクラスは、ボックス内にテキストを表示します。ワードは分割されないので、ボックスの幅より長いワードは、見栄えが悪くなります。
フィールドの概要 | |
protected Graphics |
g
|
protected int |
height
|
protected static int |
heightM
|
protected IntVector |
lineEnds
|
protected IntVector |
lineStarts
|
protected java.lang.String |
text
|
protected int |
width
|
protected static int |
widthM
|
protected int |
xPos
|
protected int |
yPos
|
コンストラクタの概要 | |
TextBox()
新しい TextBox オブジェクトを作成します。 |
|
TextBox(java.lang.String t,
int x,
int y,
int w,
int h)
新しい TextBox オブジェクトを作成します。 |
メソッドの概要 | |
int |
getNumLines()
TextBox が現在保持しているテキストの行数を返します。 |
void |
paint()
TextBox を画面上にペイントします。 |
void |
setBounds(int x,
int y,
int w,
int h)
TextBox の表示領域をリセットします。 |
void |
setText(java.lang.String t)
テキストを設定します。 |
クラス java.lang.Object から継承したメソッド |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
フィールドの詳細 |
protected java.lang.String text
protected IntVector lineStarts
protected IntVector lineEnds
protected int xPos
protected int yPos
protected int width
protected int height
protected Graphics g
protected static int widthM
protected static int heightM
コンストラクタの詳細 |
public TextBox()
public TextBox(java.lang.String t, int x, int y, int w, int h)
t
- 初期テキストx
- ScrollTextBox の位置の X 座標y
- ScrollTextBox の位置の Y 座標w
- 幅h
- 高さメソッドの詳細 |
public int getNumLines()
public void setText(java.lang.String t)
t
- 新しいテキストを表す文字列public void setBounds(int x, int y, int w, int h)
x
- 新しい ScrollTextBox の位置の X 座標y
- 新しい ScrollTextBox の位置の Y 座標w
- 新しい幅h
- 新しい高さpublic void paint()