JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.border
クラス MatteBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.EmptyBorder
              |
              +--javax.swing.border.MatteBorder
すべての実装インタフェース:
Border, Serializable
直系の既知のサブクラス:
BorderUIResource.MatteBorderUIResource

public class MatteBorder
extends EmptyBorder

塗りつぶしカラーやタイリングされたアイコンを使う飾り縁ボーダを提供するクラスです。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。

関連項目:
直列化された形式

フィールドの概要
protected  Color color
           
protected  Icon tileIcon
           
 
クラス javax.swing.border.EmptyBorder から継承したフィールド
bottom, left, right, top
 
コンストラクタの概要
MatteBorder(Icon tileIcon)
          飾り縁ボーダを、指定されたタイルアイコンで作成します。
MatteBorder(Insets borderInsets, Color matteColor)
          飾り縁ボーダを、指定されたインセットおよびカラーで作成します。
MatteBorder(Insets borderInsets, Icon tileIcon)
          飾り縁ボーダを、指定されたインセットおよびタイルアイコンで作成します。
MatteBorder(int top, int left, int bottom, int right, Color matteColor)
          飾り縁ボーダを、指定されたインセットおよびカラーで作成します。
MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
          飾り縁ボーダを、指定されたインセットおよびタイルアイコンで作成します。
 
メソッドの概要
 Insets getBorderInsets()
          ボーダのインセットの値を返します。
 Insets getBorderInsets(Component c)
          ボーダのインセットの値を返します。
 Insets getBorderInsets(Component c, Insets insets)
          insets パラメータを、この Border の現在の Insets で初期化し直します。
 Color getMatteColor()
          ボーダのタイリングに使用したカラーを返します。
 Icon getTileIcon()
          ボーダのタイリングに使用したカラーを返します。
 boolean isBorderOpaque()
          ボーダが不透明かどうかを返します。
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          飾り縁ボーダをペイントします。
 
クラス javax.swing.border.AbstractBorder から継承したメソッド
getInteriorRectangle, getInteriorRectangle
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

color

protected Color color

tileIcon

protected Icon tileIcon
コンストラクタの詳細

MatteBorder

public MatteBorder(int top,
                   int left,
                   int bottom,
                   int right,
                   Color matteColor)
飾り縁ボーダを、指定されたインセットおよびカラーで作成します。
パラメータ:
top - ボーダの上インセット
left - ボーダの左インセット
bottom - ボーダの下インセット
right - ボーダの右インセット
matteColor - ボーダを描画したカラー

MatteBorder

public MatteBorder(Insets borderInsets,
                   Color matteColor)
飾り縁ボーダを、指定されたインセットおよびカラーで作成します。
パラメータ:
borderInsets - ボーダのインセット
matteColor - ボーダを描画したカラー

MatteBorder

public MatteBorder(int top,
                   int left,
                   int bottom,
                   int right,
                   Icon tileIcon)
飾り縁ボーダを、指定されたインセットおよびタイルアイコンで作成します。
パラメータ:
top - ボーダの上インセット
left - ボーダの左インセット
bottom - ボーダの下インセット
right - ボーダの右インセット
tileIcon - ボーダのタイリングに使うアイコン

MatteBorder

public MatteBorder(Insets borderInsets,
                   Icon tileIcon)
飾り縁ボーダを、指定されたインセットおよびタイルアイコンで作成します。
パラメータ:
borderInsets - ボーダのインセット
tileIcon - ボーダのタイリングに使うアイコン

MatteBorder

public MatteBorder(Icon tileIcon)
飾り縁ボーダを、指定されたタイルアイコンで作成します。インセットは、タイルアイコンのサイズを基にして動的に計算されます。インセットの上端と下端は、タイルアイコンの高さに揃えられます。インセットの左右は、タイルアイコンの幅に揃えられます。
パラメータ:
tileIcon - ボーダのタイリングに使うアイコン
メソッドの詳細

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
飾り縁ボーダをペイントします。
オーバーライド:
クラス EmptyBorder 内の paintBorder
インタフェース javax.swing.border.Border からコピーされたタグ:
パラメータ:
c - このボーダがペイントされるコンポーネント
g - ペイントのグラフィックス
x - ペイントされたボーダの x 座標
y - ペイントされたボーダの y 座標
width - ペイントされたボーダの幅
height - ペイントされたボーダの高さ

getBorderInsets

public Insets getBorderInsets(Component c)
ボーダのインセットの値を返します。
オーバーライド:
クラス EmptyBorder 内の getBorderInsets
パラメータ:
c - このボーダのインセットの値を適用するコンポーネント

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
insets パラメータを、この Border の現在の Insets で初期化し直します。
オーバーライド:
クラス EmptyBorder 内の getBorderInsets
パラメータ:
c - このボーダのインセットの値を適用するコンポーネント
insets - 初期化し直されるオブジェクト

getBorderInsets

public Insets getBorderInsets()
ボーダのインセットの値を返します。
オーバーライド:
クラス EmptyBorder 内の getBorderInsets

getMatteColor

public Color getMatteColor()
ボーダのタイリングに使用したカラーを返します。タイルアイコンが使用されている場合は null を返します。

getTileIcon

public Icon getTileIcon()
ボーダのタイリングに使用したカラーを返します。べた一色が使用されている場合は null を返します。

isBorderOpaque

public boolean isBorderOpaque()
ボーダが不透明かどうかを返します。
オーバーライド:
クラス EmptyBorder 内の isBorderOpaque

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.