- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- javax.swing.border.EmptyBorder
-
- javax.swing.border.MatteBorder
-
- すべての実装されたインタフェース:
Serializable
,Border
- 直系の既知のサブクラス:
BorderUIResource.MatteBorderUIResource
public class MatteBorder extends EmptyBorder
塗りつぶしカラーやタイリングされたアイコンを使う飾り縁ボーダーを提供するクラスです。警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートが
java.beans
パッケージに追加されています。XMLEncoder
を参照してください。
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 MatteBorder(int top, int left, int bottom, int right, Color matteColor)
飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。MatteBorder(Insets borderInsets, Color matteColor)
飾り縁ボーダーを、指定されたイン・セットおよびカラーで作成します。MatteBorder(Insets borderInsets, Icon tileIcon)
飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。MatteBorder(Icon tileIcon)
飾り縁ボーダーを、指定されたタイル・アイコンで作成します。
-
メソッドのサマリー
修飾子と型 メソッド 説明 Insets
getBorderInsets()
ボーダーのイン・セットを返します。Insets
getBorderInsets(Component c, Insets insets)
insetsパラメータを、このBorderの現在のInsetsで初期化し直します。Color
getMatteColor()
ボーダーのタイリングに使用したカラーを返します。タイル・アイコンが使用されている場合はnullを返します。Icon
getTileIcon()
ボーダーのタイリングに使用したカラーを返します。べた一色が使用されている場合はnullを返します。boolean
isBorderOpaque()
ボーダーが不透明かどうかを返します。void
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
飾り縁ボーダーをペイントします。-
クラス javax.swing.border.AbstractBorderで宣言されたメソッド
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
-
-
-
コンストラクタの詳細
-
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
- ボーダーを描画したカラー- 導入されたバージョン:
- 1.3
-
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
- ボーダーのタイリングに使うアイコン- 導入されたバージョン:
- 1.3
-
MatteBorder
public MatteBorder(Icon tileIcon)
飾り縁ボーダーを、指定されたタイル・アイコンで作成します。 インセットは、タイル・アイコンのサイズを基にして動的に計算されます。インセットの上端と下端は、タイル・アイコンの高さに揃えられます。インセットの左右は、タイル・アイコンの幅に揃えられます。- パラメータ:
tileIcon
- ボーダーのタイリングに使うアイコン
-
-
メソッドの詳細
-
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
飾り縁ボーダーをペイントします。- 定義:
paintBorder
、インタフェース:Border
- オーバーライド:
paintBorder
、クラス:EmptyBorder
- パラメータ:
c
- このボーダーがペイントされるコンポーネントg
- ペイント・グラフィックスx
- ペイントされるボーダーのx座標y
- ペイントされるボーダーのy座標width
- ペイントされるボーダーの幅height
- ペイントされるボーダーの高さ
-
getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)
insetsパラメータを、このBorderの現在のInsetsで初期化し直します。- オーバーライド:
getBorderInsets
、クラス:EmptyBorder
- パラメータ:
c
- このボーダーのイン・セットの値を適用するコンポーネントinsets
- 初期化し直されるオブジェクト- 戻り値:
insets
オブジェクト- 導入されたバージョン:
- 1.3
-
getBorderInsets
public Insets getBorderInsets()
ボーダーのイン・セットを返します。- オーバーライド:
getBorderInsets
、クラス:EmptyBorder
- 戻り値:
- 上、左、下、右のインセットを含む
Insets
オブジェクト - 導入されたバージョン:
- 1.3
-
getMatteColor
public Color getMatteColor()
ボーダーのタイリングに使用したカラーを返します。タイル・アイコンが使用されている場合はnullを返します。- 戻り値:
- ボーダーを描画するために使用される
Color
オブジェクト、またはタイル・アイコンが使用される場合はnull
- 導入されたバージョン:
- 1.3
-
getTileIcon
public Icon getTileIcon()
ボーダーのタイリングに使用したカラーを返します。べた一色が使用されている場合はnullを返します。- 戻り値:
- ボーダーを塗りつぶすために使用される
Icon
またはボーダーを塗りつぶすために単色が使用される場合はnull
- 導入されたバージョン:
- 1.3
-
isBorderOpaque
public boolean isBorderOpaque()
ボーダーが不透明かどうかを返します。- 定義:
isBorderOpaque
、インタフェース:Border
- オーバーライド:
isBorderOpaque
、クラス:EmptyBorder
- 戻り値:
- ボーダーが不透明な場合は
true
、それ以外の場合はfalse
-
-