public class EtchedBorder extends AbstractBorder
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beansパッケージに追加されています。 XMLEncoderを参照してください。
| 修飾子と型 | フィールド | 説明 |
|---|---|---|
protected int |
etchType |
|
protected Color |
highlight |
|
static int |
LOWERED |
彫込みエッチングのタイプです。
|
static int |
RAISED |
浮彫りエッチングのタイプです。
|
protected Color |
shadow |
| コンストラクタ | 説明 |
|---|---|
EtchedBorder() |
彫込みエッチング・ボーダーを作成します。ボーダーのカラーは、paintBorderメソッドに渡されるコンポーネントのバックグラウンド・カラーから派生します。
|
EtchedBorder(Color highlight, Color shadow) |
彫込みエッチング・ボーダーを、指定されたハイライトおよび陰影のカラーで作成します。
|
EtchedBorder(int etchType) |
指定されたタイプのエッチング・ボーダーを作成します。ボーダーのカラーは、paintBorderメソッドに渡されるコンポーネントのバックグラウンド・カラーから派生します。
|
EtchedBorder(int etchType, Color highlight, Color shadow) |
エッチング・ボーダーを、指定されたタイプ、ハイライトおよび陰影のカラーで作成します。
|
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
Insets |
getBorderInsets(Component c, Insets insets) |
insetsパラメータを、このBorderの現在のInsetsで初期化し直します。
|
int |
getEtchType() |
エッチング・ボーダーに指定されているエッチングのタイプを返します。
|
Color |
getHighlightColor() |
エッチング・ボーダーのハイライトのカラーを返します。
|
Color |
getHighlightColor(Component c) |
指定されたコンポーネントにレンダリングされたときの、エッチング・ボーダーのハイライト・カラーを返します。
|
Color |
getShadowColor() |
エッチング・ボーダーの陰影のカラーを返します。
|
Color |
getShadowColor(Component c) |
指定されたコンポーネントにレンダリングされたときのエッチング・ボーダーのシャドウ・カラーを返します。
|
boolean |
isBorderOpaque() |
ボーダーが不透明かどうかを返します。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height) |
指定されたコンポーネントのボーダーを、指定された位置およびサイズでペイントします。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectanglepublic static final int RAISED
public static final int LOWERED
protected int etchType
protected Color highlight
protected Color shadow
public EtchedBorder()
public EtchedBorder(int etchType)
etchType - ボーダーが描画するエッチングのタイプpublic EtchedBorder(Color highlight, Color shadow)
highlight - エッチングのハイライトに使うカラーshadow - エッチングの陰影に使うカラー@ConstructorProperties(value={"etchType","highlightColor","shadowColor"}) public EtchedBorder(int etchType, Color highlight, Color shadow)
etchType - ボーダーが描画するエッチングのタイプhighlight - エッチングのハイライトに使うカラーshadow - エッチングの陰影に使うカラー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 boolean isBorderOpaque()
isBorderOpaque、インタフェースBorderisBorderOpaque、クラスAbstractBorderpublic int getEtchType()
public Color getHighlightColor(Component c)
c - ハイライトが派生するコンポーネントpublic Color getHighlightColor()
public Color getShadowColor(Component c)
c - 陰影が派生するコンポーネントpublic Color getShadowColor()
バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。