|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.CompoundBorder
public class CompoundBorder
2 つの Border オブジェクトを合成して単一のボーダにするために使う、複合 Border クラスです。合成は、内側 Border オブジェクトを外側 Border オブジェクトのインセットの中に入れ子にして行います。 たとえば、すでに装飾ボーダがあるコンポーネントに空白のマージンを追加する場合などに、このクラスを使うことができます。
Border border = comp.getBorder();
Border margin = new EmptyBorder(10,10,10,10);
comp.setBorder(new CompoundBorder(border, margin));
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK バージョン 1.4 以降、すべての JavaBeans™ の長期間の運用サポートは、java.beans パッケージに追加されています。詳細は、XMLEncoder を参照してください。
| フィールドの概要 | |
|---|---|
protected Border |
insideBorder
|
protected Border |
outsideBorder
|
| コンストラクタの概要 | |
|---|---|
CompoundBorder()
外側ボーダ、内側ボーダがともに null の複合ボーダを作成します。 |
|
CompoundBorder(Border outsideBorder,
Border insideBorder)
指定された内側ボーダおよび外側ボーダによる複合ボーダを作成します。 |
|
| メソッドの概要 | |
|---|---|
Insets |
getBorderInsets(Component c)
外側ボーダの insets の値を内側ボーダの insets に加算して、複合ボーダの insets の値を返します。 |
Insets |
getBorderInsets(Component c,
Insets insets)
insets パラメータを、この Border の現在の Insets で初期化し直します。 |
Border |
getInsideBorder()
内側ボーダのオブジェクトを返します。 |
Border |
getOutsideBorder()
外側ボーダのオブジェクトを返します。 |
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 |
| フィールドの詳細 |
|---|
protected Border outsideBorder
protected Border insideBorder
| コンストラクタの詳細 |
|---|
public CompoundBorder()
public CompoundBorder(Border outsideBorder,
Border insideBorder)
outsideBorder - 外側ボーダinsideBorder - 入れ子にする内側ボーダ| メソッドの詳細 |
|---|
public boolean isBorderOpaque()
Border 内の isBorderOpaqueAbstractBorder 内の isBorderOpaque
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Border 内の paintBorderAbstractBorder 内の paintBorderc - このボーダがペイントされるコンポーネントg - ペイントのグラフィックスx - ペイントされたボーダの x 座標y - ペイントされたボーダの y 座標width - ペイントされたボーダの幅height - ペイントされたボーダの高さ
public Insets getBorderInsets(Component c,
Insets insets)
AbstractBorder 内の getBorderInsetsc - このボーダのインセットの値を適用するコンポーネントinsets - 初期化し直されるオブジェクト
insets オブジェクトpublic Insets getBorderInsets(Component c)
Border 内の getBorderInsetsAbstractBorder 内の getBorderInsetsc - このボーダのインセットの値を適用するコンポーネント
Insets オブジェクトpublic Border getOutsideBorder()
public Border getInsideBorder()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。