Java プラットフォーム 1.2

javax.swing.border
クラス BevelBorder

java.lang.Object
  |
  +--javax.swing.border.AbstractBorder
        |
        +--javax.swing.border.BevelBorder
直接の既知のサブクラス:
BorderUIResource.BevelBorderUIResource, SoftBevelBorder

public class BevelBorder
extends AbstractBorder

単純な 2 ラインの斜影ボーダを実装するクラスです。

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

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

フィールドの概要
protected  int bevelType
           
protected  Color highlightInner
           
protected  Color highlightOuter
           
static int LOWERED
          くぼみ斜影のタイプです。
static int RAISED
          浮き出し斜影のタイプです。
protected  Color shadowInner
           
protected  Color shadowOuter
           
 
コンストラクタの概要
BevelBorder(int bevelType)
          斜影ボーダを、指定されたタイプ、およびカラーで作成します。
BevelBorder(int bevelType, Color highlight, Color shadow)
          斜影ボーダを、指定されたタイプ、ハイライト、および陰影カラーで作成します。
BevelBorder(int bevelType, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner)
          斜影ボーダを、指定されたタイプ、ハイライト、および陰影カラーで作成します。
 
メソッドの概要
 int getBevelType()
          斜影ボーダのタイプを返します。
 Insets getBorderInsets(Component c)
          ボーダの insets の値を返します。
 Insets getBorderInsets(Component c, Insets insets)
          insets パラメータを、この Border の現在の Insets で初期化し直します。
 Color getHighlightInnerColor(Component c)
          斜影ボーダの内側ハイライトのカラーを返します。
 Color getHighlightOuterColor(Component c)
          斜影ボーダの外側ハイライトのカラーを返します。
 Color getShadowInnerColor(Component c)
          斜影ボーダの内側陰影のカラーを返します。
 Color getShadowOuterColor(Component c)
          斜影ボーダの外側陰影のカラーを返します。
 boolean isBorderOpaque()
          ボーダが不透明かどうかを返します。
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          指定されたコンポーネントのボーダを、指定された位置およびサイズでペイントします。
protected  void paintLoweredBevel(Component c, Graphics g, int x, int y, int width, int height)
           
protected  void paintRaisedBevel(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
 

フィールドの詳細

RAISED

public static final int RAISED
浮き出し斜影のタイプです。

LOWERED

public static final int LOWERED
くぼみ斜影のタイプです。

bevelType

protected int bevelType

highlightOuter

protected Color highlightOuter

highlightInner

protected Color highlightInner

shadowInner

protected Color shadowInner

shadowOuter

protected Color shadowOuter
コンストラクタの詳細

BevelBorder

public BevelBorder(int bevelType)
斜影ボーダを、指定されたタイプ、およびカラーで作成します。カラーは、paintBorder メソッドに渡されるコンポーネントのバックグラウンドカラーから派生します。
パラメータ:
bevelType - ボーダに使う斜影のタイプ

BevelBorder

public BevelBorder(int bevelType,
                   Color highlight,
                   Color shadow)
斜影ボーダを、指定されたタイプ、ハイライト、および陰影カラーで作成します。
パラメータ:
bevelType - ボーダに使う斜影のタイプ
highlight - 斜影のハイライトに使うカラー
shadow - 斜影の陰影に使うカラー

BevelBorder

public BevelBorder(int bevelType,
                   Color highlightOuter,
                   Color highlightInner,
                   Color shadowOuter,
                   Color shadowInner)
斜影ボーダを、指定されたタイプ、ハイライト、および陰影カラーで作成します。
パラメータ:
bevelType - ボーダに使う斜影のタイプ
highlightOuter - 斜影の外側のハイライトに使うカラー
highlightInner - 斜影の内側のハイライトに使うカラー
shadowOuter - 斜影の外側の陰影に使うカラー
shadowInner - 斜影の内側の陰影に使うカラー
メソッドの詳細

paintBorder

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

getBorderInsets

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

getBorderInsets

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

getHighlightOuterColor

public Color getHighlightOuterColor(Component c)
斜影ボーダの外側ハイライトのカラーを返します。

getHighlightInnerColor

public Color getHighlightInnerColor(Component c)
斜影ボーダの内側ハイライトのカラーを返します。

getShadowInnerColor

public Color getShadowInnerColor(Component c)
斜影ボーダの内側陰影のカラーを返します。

getShadowOuterColor

public Color getShadowOuterColor(Component c)
斜影ボーダの外側陰影のカラーを返します。

getBevelType

public int getBevelType()
斜影ボーダのタイプを返します。

isBorderOpaque

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

paintRaisedBevel

protected void paintRaisedBevel(Component c,
                                Graphics g,
                                int x,
                                int y,
                                int width,
                                int height)

paintLoweredBevel

protected void paintLoweredBevel(Component c,
                                 Graphics g,
                                 int x,
                                 int y,
                                 int width,
                                 int height)

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.