public abstract class AbstractBorder extends Object implements Border, Serializable
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の格納や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。1.4 以降、すべての JavaBeansTM 用の長期間の格納サポートが java.beans パッケージに追加されています。XMLEncoder を参照してください。
| コンストラクタと説明 |
|---|
AbstractBorder() |
| 修飾子と型 | メソッドと説明 |
|---|---|
int |
getBaseline(Component c, int width, int height)
ベースラインを返します。
|
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(Component c)
サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。
|
Insets |
getBorderInsets(Component c)
このデフォルトの実装は、
getBorderInsets(Component,Insets) メソッドによって初期化される新しい Insets オブジェクトを返します。 |
Insets |
getBorderInsets(Component c, Insets insets)
インセットパラメータを、この Border の現在のインセットで初期化し直します。
|
static Rectangle |
getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
ボーダーのインセットから引数の値を減算して矩形を返します。
|
Rectangle |
getInteriorRectangle(Component c, int x, int y, int width, int height)
静的メソッドを呼び出す簡易メソッドです。
|
boolean |
isBorderOpaque()
このデフォルト実装は false を返します。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
このデフォルト実装では、ペイントを行いません。
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder、インタフェース: Borderc - このボーダーがペイントされるコンポーネントg - ペイントグラフィックスx - ペイントされるボーダーの x 座標y - ペイントされるボーダーの y 座標width - ペイントされるボーダーの幅height - ペイントされるボーダーの高さpublic Insets getBorderInsets(Component c)
getBorderInsets(Component,Insets) メソッドによって初期化される新しい Insets オブジェクトを返します。デフォルトでは、top、left、bottom、および right フィールドは 0 に設定されます。getBorderInsets、インタフェース: Borderc - このボーダーのインセットの値を適用するコンポーネントInsets オブジェクトpublic Insets getBorderInsets(Component c, Insets insets)
c - このボーダーのインセットの値を適用するコンポーネントinsets - 初期化し直されるオブジェクトinsets オブジェクトpublic boolean isBorderOpaque()
isBorderOpaque、インタフェース: Borderpublic Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)
c - このボーダーが計算されるコンポーネントx - ボーダーの x 座標y - ボーダーの y 座標width - ボーダーの幅height - ボーダーの高さRectanglepublic static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
c - このボーダーが計算されるコンポーネントb - Border オブジェクトx - ボーダーの x 座標y - ボーダーの y 座標width - ボーダーの幅height - ボーダーの高さRectanglepublic int getBaseline(Component c, int width, int height)
デフォルト実装は -1 を返します。ベースラインをサポートするサブクラスで適切にオーバーライドする必要があります。戻り値が 0 以上の場合、コンポーネントのベースラインは最小サイズ以上の任意のサイズに対して有効であり、getBaselineResizeBehavior を使ってサイズによるベースラインの変化を特定できます。
c - 要求される Component ベースラインwidth - ベースラインを取得する幅height - ベースラインを取得する高さIllegalArgumentException - 幅または高さが 0 より小さい場合Component.getBaseline(int,int), Component.getBaselineResizeBehavior()public Component.BaselineResizeBehavior getBaselineResizeBehavior(Component c)
デフォルト実装は BaselineResizeBehavior.OTHER を返します。ベースラインをサポートするサブクラスで適切にオーバーライドする必要があります。サブクラスは null を返しません。ベースラインを計算できない場合は、BaselineResizeBehavior.OTHER を返します。呼び出し側は、まず getBaseline を使ってベースラインを要求します。そして、戻り値が 0 以上の場合はこのメソッドを使用します。getBaseline が 0 より小さい値を返す場合でも、このメソッドが BaselineResizeBehavior.OTHER 以外の値を返すことは許容されます。
c - ベースラインのサイズ変更の動作を返す ComponentComponent.getBaseline(int,int), Component.getBaselineResizeBehavior() バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.