mine.whitespacefield.main
クラス DrawSpace

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

 class DrawSpace
extends Object
implements DrawCharSPInterface

Wordの半角スペースのように、小さい中点を代わりに表示します。

作成者:
Mine

フィールドの概要
private static Color color
           
 
コンストラクタの概要
DrawSpace()
           
 
メソッドの概要
 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
コンストラクタの詳細

DrawSpace

DrawSpace()
メソッドの詳細

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 - 特定文字の高さ