mine.whitespacefield.main
クラス DrawLargeSpace

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

 class DrawLargeSpace
extends Object
implements DrawCharSPInterface

Wordの全角スペースのように、□を代わりに表示します。

作成者:
Mine

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

フィールドの詳細

pc

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

DrawLargeSpace

DrawLargeSpace()
メソッドの詳細

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