public class LineBorder extends AbstractBorder
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の格納や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。1.4 以降、すべての JavaBeansTM 用の長期間の格納サポートが java.beans パッケージに追加されています。XMLEncoder を参照してください。
| 修飾子と型 | フィールドと説明 |
|---|---|
protected Color |
lineColor |
protected boolean |
roundedCorners |
protected int |
thickness |
| コンストラクタと説明 |
|---|
LineBorder(Color color)
直線ボーダーを、指定されたカラーおよび太さ (thickness = 1) で作成します。
|
LineBorder(Color color, int thickness)
指定された色と太さで直線ボーダーを作成します。
|
LineBorder(Color color, int thickness, boolean roundedCorners)
指定された色と太さと隅の形状で直線ボーダーを作成します。
|
| 修飾子と型 | メソッドと説明 |
|---|---|
static Border |
createBlackLineBorder()
太さ 1 で Color.black の LineBorder を取得するのに便利なメソッドです。
|
static Border |
createGrayLineBorder()
太さ 1 で Color.gray の LineBorder を取得するのに便利なメソッドです。
|
Insets |
getBorderInsets(Component c, Insets insets)
insets パラメータを、この Border の現在の Insets で初期化し直します。
|
Color |
getLineColor()
ボーダーのカラーを返します。
|
boolean |
getRoundedCorners()
ボーダーの隅を丸く描画するかどうかを返します。
|
int |
getThickness()
ボーダーの太さを返します。
|
boolean |
isBorderOpaque()
ボーダーが不透明かどうかを返します。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
指定されたコンポーネントのボーダーを、指定された位置およびサイズでペイントします。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangleprotected int thickness
protected Color lineColor
protected boolean roundedCorners
public LineBorder(Color color)
color - ボーダーのカラーpublic LineBorder(Color color, int thickness)
color - ボーダーのカラーthickness - ボーダーの太さ@ConstructorProperties(value={"lineColor","thickness","roundedCorners"}) public LineBorder(Color color, int thickness, boolean roundedCorners)
color - ボーダーのカラーthickness - ボーダーの太さroundedCorners - ボーダーの隅を丸くするかどうかpublic static Border createBlackLineBorder()
public static Border createGrayLineBorder()
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder、インタフェース: BorderpaintBorder、クラス: AbstractBorderc - このボーダーがペイントされるコンポーネントg - ペイントグラフィックスx - ペイントされるボーダーの x 座標y - ペイントされるボーダーの y 座標width - ペイントされるボーダーの幅height - ペイントされるボーダーの高さpublic Insets getBorderInsets(Component c, Insets insets)
getBorderInsets、クラス: AbstractBorderc - このボーダーのインセットの値を適用するコンポーネントinsets - 初期化し直されるオブジェクトinsets オブジェクトpublic Color getLineColor()
public int getThickness()
public boolean getRoundedCorners()
public boolean isBorderOpaque()
isBorderOpaque、インタフェース: BorderisBorderOpaque、クラス: AbstractBorder バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.