|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
public abstract class AbstractBorder
サイズ指定のない空のボーダーを実装するクラスです。ほかのボーダーのクラスを簡単に派生できる、便利な基底クラスを提供します。
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK Version 1.4 以降、すべての JavaBeans™ の長期間の運用サポートは、java.beans パッケージに追加されています。詳細は、XMLEncoder を参照してください。
| コンストラクタの概要 | |
|---|---|
AbstractBorder()
|
|
| メソッドの概要 | |
|---|---|
int |
getBaseline(Component c,
int width,
int height)
ベースラインを返します。 |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(Component c)
サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。 |
Insets |
getBorderInsets(Component c)
このデフォルト実装は、 top、left、bottom、および right の各フィールドが 0 に設定されているとき、新しい 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)
このデフォルト実装では、ペイントを行いません。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public AbstractBorder()
| メソッドの詳細 |
|---|
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Border 内の paintBorderc - このボーダーがペイントされるコンポーネントg - ペイントのグラフィックスx - ペイントされたボーダーの x 座標y - ペイントされたボーダーの y 座標width - ペイントされたボーダーの幅height - ペイントされたボーダーの高さpublic Insets getBorderInsets(Component c)
top、left、bottom、および right の各フィールドが 0 に設定されているとき、新しい Insets インスタンスを返します。
Border 内の getBorderInsetsc - このボーダーのインセットの値を適用するコンポーネント
Insets オブジェクト
public Insets getBorderInsets(Component c,
Insets insets)
c - このボーダーのインセットの値を適用するコンポーネントinsets - 初期化し直されるオブジェクト
insets オブジェクトpublic boolean isBorderOpaque()
Border 内の isBorderOpaque
public Rectangle getInteriorRectangle(Component c,
int x,
int y,
int width,
int height)
c - このボーダーが計算されるコンポーネントx - ボーダーの x 座標y - ボーダーの y 座標width - ボーダーの幅height - ボーダーの高さ
Rectangle
public static Rectangle getInteriorRectangle(Component c,
Border b,
int x,
int y,
int width,
int height)
c - このボーダーが計算されるコンポーネントb - Border オブジェクトx - ボーダーの x 座標y - ボーダーの y 座標width - ボーダーの幅height - ボーダーの高さ
Rectangle
public 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 - ベースラインのサイズ変更の動作を返す Component
Component.getBaseline(int,int),
Component.getBaselineResizeBehavior()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。