public class StrokeBorder extends AbstractBorder
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の格納や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。1.4 以降、すべての JavaBeans™ 用の長期間の格納サポートが java.beans パッケージに追加されています。XMLEncoder を参照してください。
| コンストラクタと説明 |
|---|
StrokeBorder(BasicStroke stroke)
指定された
stroke のボーダーを作成します。 |
StrokeBorder(BasicStroke stroke, Paint paint)
指定された
stroke と paint のボーダーを作成します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
Insets |
getBorderInsets(Component c, Insets insets)
insets パラメータを、このボーダーの現在のインセットで初期化し直します。 |
Paint |
getPaint()
ボーダーの描画中に色を生成するために使われる
Paint オブジェクトを返します。 |
BasicStroke |
getStroke()
ボーダーのレンダリング中に図形を描くために使用される
BasicStroke オブジェクトを返します。 |
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
指定されたコンポーネントのボーダーを、指定された位置およびサイズでペイントします。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaquepublic StrokeBorder(BasicStroke stroke)
stroke のボーダーを作成します。コンポーネントのフォアグラウンドカラーがボーダーの描画に使われます。stroke - 図形のストロークに使用される BasicStroke オブジェクトNullPointerException - 指定された stroke が null である場合@ConstructorProperties(value={"stroke","paint"}) public StrokeBorder(BasicStroke stroke, Paint paint)
stroke と paint のボーダーを作成します。指定された paint が null の場合は、ボーダーのレンダリングにコンポーネントのフォアグラウンドカラーが使用されます。stroke - 図形のストロークに使用される BasicStroke オブジェクトpaint - 色の生成に使用される Paint オブジェクトNullPointerException - 指定された stroke が null である場合public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paint オブジェクトを使用して指定されなかった場合は、ボーダーのレンダリングにコンポーネントのフォアグラウンドカラーが使用されます。コンポーネントのフォアグラウンドカラーが使用できない場合は、Graphics オブジェクトのデフォルトカラーが使用されます。paintBorder、インタフェース: BorderpaintBorder、クラス: AbstractBorderc - このボーダーがペイントされるコンポーネントg - ペイントグラフィックスx - ペイントされるボーダーの x 座標y - ペイントされるボーダーの y 座標width - ペイントされるボーダーの幅height - ペイントされるボーダーの高さNullPointerException - 指定された g が null である場合public Insets getBorderInsets(Component c, Insets insets)
insets パラメータを、このボーダーの現在のインセットで初期化し直します。すべてのインセットは、ボーダーをペイントする際に使用されるストロークのライン幅以上で、最小の (負の無限大にもっとも近い) 整数値です。getBorderInsets、クラス: AbstractBorderc - このボーダーのインセットの値を適用するコンポーネントinsets - 初期化し直される Insets オブジェクトinsets パラメータNullPointerException - 指定された insets が null である場合Math.ceil(double)public BasicStroke getStroke()
BasicStroke オブジェクトを返します。BasicStroke オブジェクト バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.