JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.border
クラス LineBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.LineBorder
すべての実装インタフェース:
Border, Serializable
直系の既知のサブクラス:
BorderUIResource.LineBorderUIResource

public class LineBorder
extends AbstractBorder

直線ボーダを実装するクラスです。ボーダの太さは任意、カラーは単色です。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。

関連項目:
直列化された形式

フィールドの概要
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 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)
          指定されたコンポーネントのボーダを、指定された位置およびサイズでペイントします。
 
クラス javax.swing.border.AbstractBorder から継承したメソッド
getInteriorRectangle, getInteriorRectangle
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

thickness

protected int thickness

lineColor

protected Color lineColor

roundedCorners

protected boolean roundedCorners
コンストラクタの詳細

LineBorder

public LineBorder(Color color)
直線ボーダを、指定されたカラーおよび太さ (thickness = 1) で作成します。
パラメータ:
color - ボーダのカラー

LineBorder

public LineBorder(Color color,
                  int thickness)
指定された色と太さで直線ボーダを作成します。
パラメータ:
color - ボーダのカラー
thickness - ボーダの太さ

LineBorder

public LineBorder(Color color,
                  int thickness,
                  boolean roundedCorners)
指定された色と太さと隅の形状で直線ボーダを作成します。
パラメータ:
color - ボーダのカラー
thickness - ボーダの太さ
roundedCorners - ボーダの隅を丸くするかどうか
導入されたバージョン:
1.3
メソッドの詳細

createBlackLineBorder

public static Border createBlackLineBorder()
太さ 1 で Color.black の LineBorder を取得するのに便利なメソッドです。

createGrayLineBorder

public static Border createGrayLineBorder()
太さ 1 で Color.gray の LineBorder を取得するのに便利なメソッドです。

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
指定されたコンポーネントのボーダを、指定された位置およびサイズでペイントします。
オーバーライド:
クラス AbstractBorder 内の paintBorder
パラメータ:
c - このボーダがペイントされるコンポーネント
g - ペイントのグラフィックス
x - ペイントされたボーダの x 座標
y - ペイントされたボーダの y 座標
width - ペイントされたボーダの幅
height - ペイントされたボーダの高さ

getBorderInsets

public Insets getBorderInsets(Component c)
ボーダのインセットの値を返します。
オーバーライド:
クラス AbstractBorder 内の getBorderInsets
パラメータ:
c - このボーダのインセットの値を適用するコンポーネント

getBorderInsets

public Insets getBorderInsets(Component c,
                              Insets insets)
insets パラメータを、この Border の現在の Insets で初期化し直します。
オーバーライド:
クラス AbstractBorder 内の getBorderInsets
パラメータ:
c - このボーダのインセットの値を適用するコンポーネント
insets - 初期化し直されるオブジェクト

getLineColor

public Color getLineColor()
ボーダのカラーを返します。

getThickness

public int getThickness()
ボーダの太さを返します。

getRoundedCorners

public boolean getRoundedCorners()
ボーダの隅を丸く描画するかどうかを返します。

isBorderOpaque

public boolean isBorderOpaque()
ボーダが不透明かどうかを返します。
オーバーライド:
クラス AbstractBorder 内の isBorderOpaque

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.