クラスEmptyBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EmptyBorder
- すべての実装されたインタフェース:
Serializable, Border
- 直系の既知のサブクラス:
BorderUIResource.EmptyBorderUIResource, MatteBorder
public class EmptyBorder extends AbstractBorder implements Serializable
スペースを占めるが描画はしない、空の透過ボーダーを提供するクラスです。
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beansパッケージに追加されました。 XMLEncoderを参照してください。
-
フィールドのサマリー
フィールド -
コンストラクタのサマリー
コンストラクタコンストラクタ説明EmptyBorder(int top, int left, int bottom, int right) 指定されたイン・セットの値を持つ、空のボーダーを作成します。EmptyBorder(Insets borderInsets) 指定されたイン・セットの値を持つ、空のボーダーを作成します。 -
メソッドのサマリー
修飾子と型メソッド説明ボーダーのイン・セットを返します。getBorderInsets(Component c, Insets insets) insetsパラメータを、このBorderの現在のInsetsで初期化し直します。booleanボーダーが不透明かどうかを返します。voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) デフォルトでは、描画を行いません。クラスで宣言されたメソッド AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle修飾子と型メソッド説明intgetBaseline(Component c, int width, int height) ベースラインを返します。サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。このデフォルトの実装は、AbstractBorder.getBorderInsets(Component,Insets)メソッドによって初期化される新しいInsetsオブジェクトを返します。getInteriorRectangle(Component c, int x, int y, int width, int height) 静的メソッドを呼び出す簡易メソッドです。static RectanglegetInteriorRectangle(Component c, Border b, int x, int y, int width, int height) ボーダーのイン・セットから引数の値を減算して矩形を返します。クラスオブジェクトで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait修飾子と型メソッド説明protected Objectclone()このオブジェクトのコピーを作成して、返します。booleanこのオブジェクトと他のオブジェクトが等しいかどうかを示します。protected voidfinalize()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。最終決定は非推奨であり、将来のリリースで削除される可能性があります。final Class<?> getClass()このObjectの実行時クラスを返します。inthashCode()このオブジェクトに対するハッシュ・コード値を返します。final voidnotify()このオブジェクトのモニターで待機中のスレッドを1つ再開します。final voidこのオブジェクトのモニターで待機中のすべてのスレッドを再開します。toString()オブジェクトの文字列表現を返します。final voidwait()現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。final voidwait(long timeoutMillis) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。final voidwait(long timeoutMillis, int nanos) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
フィールド詳細
-
left
protected int leftボーダーの左端。 -
right
protected int rightボーダーの右端。 -
top
protected int topボーダーの上部インセット。 -
bottom
protected int bottomボーダーの底のインセット。
-
-
コンストラクタの詳細
-
EmptyBorder
public EmptyBorder(int top, int left, int bottom, int right) 指定されたイン・セットの値を持つ、空のボーダーを作成します。- パラメータ:
top- ボーダーの上イン・セットleft- ボーダーの左イン・セットbottom- ボーダーの下イン・セットright- ボーダーの右イン・セット
-
EmptyBorder
@ConstructorProperties("borderInsets") public EmptyBorder(Insets borderInsets) 指定されたイン・セットの値を持つ、空のボーダーを作成します。- パラメータ:
borderInsets- ボーダーのイン・セット- スロー:
NullPointerException- 指定されたborderInsetsがnull
-
-
メソッドの詳細
-
paintBorder
デフォルトでは、描画を行いません。- 定義:
paintBorder、インタフェースBorder- オーバーライド:
paintBorder、クラスAbstractBorder- パラメータ:
c- このボーダーがペイントされるコンポーネントg- ペイント・グラフィックスx- ペイントされるボーダーのx座標y- ペイントされるボーダーのy座標width- ペイントされるボーダーの幅height- ペイントされるボーダーの高さ
-
getBorderInsets
insetsパラメータを、このBorderの現在のInsetsで初期化し直します。- オーバーライド:
getBorderInsets、クラスAbstractBorder- パラメータ:
c- このボーダーのイン・セットの値を適用するコンポーネントinsets- 初期化し直されるオブジェクト- 戻り値:
insetsオブジェクト- スロー:
NullPointerException- 指定されたinsetsがnullである場合
-
getBorderInsets
public Insets getBorderInsets()ボーダーのイン・セットを返します。- 戻り値:
- 上、左、下および右からのインセットを含む
Insetsオブジェクト - 導入されたバージョン:
- 1.3
-
isBorderOpaque
public boolean isBorderOpaque()ボーダーが不透明かどうかを返します。 デフォルトではfalseを返します。- 定義:
isBorderOpaque、インタフェースBorder- オーバーライド:
isBorderOpaque、クラスAbstractBorder- 戻り値:
- false
-