mine.whitespacefield.main
クラス DrawTab

java.lang.Object
  上位を拡張 mine.whitespacefield.main.DrawTab
すべての実装されたインタフェース:
DrawCharSPInterface

 class DrawTab
extends Object
implements DrawCharSPInterface

Wordのタブのように、→を代わりに表示します。

作成者:
Mine

フィールドの概要
private static Color color
           
 
コンストラクタの概要
DrawTab()
           
 
メソッドの概要
 void drawCharSP(Graphics g, int x, int y, int w, int h)
          特定の文字の代わりに画像や図形を表示します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

color

private static final Color color
コンストラクタの詳細

DrawTab

DrawTab()
メソッドの詳細

drawCharSP

public void drawCharSP(Graphics g,
                       int x,
                       int y,
                       int w,
                       int h)
インタフェース DrawCharSPInterface の記述:
特定の文字の代わりに画像や図形を表示します。
Graphics内の(x, y)が特定文字を描画する位置となり、置き換える特定の文字の大きさは(w, h)です。
ある文字(たとえば半角スペース)の代わりに、下線を表示したい場合は以下のようにします。
 ((Graphics2D)g).drawLine(x, y+h, x+w, y+h);
 
設定方法はWhiteSpaceVisibleTextField.putDrawCharSP(String, DrawCharSPInterface)を参照してください。

定義:
インタフェース DrawCharSPInterface 内の drawCharSP
パラメータ:
g - グラフィックスコンテキスト
x - 特定文字の代わりに描画する画像や図形のX座標
y - 特定文字の代わりに描画する画像や図形のY座標
w - 特定文字の幅
h - 特定文字の高さ