|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Objectiappli.lib.ui.CComponent
iappli.lib.ui.CBulletinBoard
public final class CBulletinBoard
Canvas上に描画する掲示板です。
【例】 class Dialog extends CostumePanel { CBulletinBoard cb = new CBulletinBoard("夏目漱石", "我輩は猫である。名前はまだない。\nゆえに。。。", Graphics.getColorOfName(Graphics.BLACK), Graphics.getColorOfRGB(200, 200, 200, 200), Graphics.getColorOfName(Graphics.WHITE)); public void paint(Graphics g) { cb.show(g, 4, 3, 30, 10, true); : } public void processEvent2(CComponent c, int t, int p) { if (t == Display.KEY_PRESSED_EVENT && p == Display.KEY_SELECT) { cb.clear(); } } }
コンストラクタの概要 | |
---|---|
CBulletinBoard()
掲示板を生成します。 |
|
CBulletinBoard(String text)
掲示文字列を指定して掲示板を生成します。 |
|
CBulletinBoard(String title,
String text,
int c1,
int c2,
int s)
タイトル、掲示文字列、背景色、前景色、影付き色を指定して掲示板を生成します。 |
メソッドの概要 | |
---|---|
void |
setLabel(String text)
掲示板の掲示文字列を設定します。 |
void |
setTitle(String title)
掲示板のタイトルを設定します。 |
void |
show(Graphics g,
int x,
int y,
int w,
int h,
boolean b)
掲示板を描画します。 |
クラス iappli.lib.ui.CComponent から継承されたメソッド |
---|
clear, setBackground, setBackup, setFont, setForeground, setGraphics, setLocation, setShadow, setSize |
クラス Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public CBulletinBoard()
public CBulletinBoard(String text)
text
- 掲示板の掲示文字列を指定します。public CBulletinBoard(String title, String text, int c1, int c2, int s)
title
- 掲示板のタイトルを指定します。text
- 掲示板の掲示文字列を指定します。c1
- 前景色を指定します。c2
- 背景色を指定します。s
- 影付き色を指定します。メソッドの詳細 |
---|
public void setLabel(String text)
text
- 掲示板の掲示文字列を指定します。
null が指定された場合は空文字列("")が設定されます。public void setTitle(String title)
title
- 掲示板のタイトルを指定します。
null が指定された場合、タイトルを表示しません。public void show(Graphics g, int x, int y, int w, int h, boolean b)
g
- キャンパスのグラフィックスオブジェクト(getGraphics())を指定します。x
- 横座標(文字数)を指定します。y
- 縦座標(文字数)を指定します。w
- 横幅(文字数)を指定します。h
- 縦幅(文字数)を指定します。b
- trueを指定すると描画前をバックアップします。
(ヒープメモリが取られるため使わない場合は false を指定してください。)
|
Copyright ITmarks Inc. All rights reserved. | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |