JavaTM Platform
Standard Ed. 6

javax.swing.border
インタフェース Border

既知の実装クラスの一覧:
AbstractBorder, BasicBorders.ButtonBorder, BasicBorders.FieldBorder, BasicBorders.MarginBorder, BasicBorders.MenuBarBorder, BasicBorders.RadioButtonBorder, BasicBorders.RolloverButtonBorder, BasicBorders.SplitPaneBorder, BasicBorders.ToggleButtonBorder, BevelBorder, BorderUIResource, BorderUIResource.BevelBorderUIResource, BorderUIResource.CompoundBorderUIResource, BorderUIResource.EmptyBorderUIResource, BorderUIResource.EtchedBorderUIResource, BorderUIResource.LineBorderUIResource, BorderUIResource.MatteBorderUIResource, BorderUIResource.TitledBorderUIResource, CompoundBorder, EmptyBorder, EtchedBorder, LineBorder, MatteBorder, MetalBorders.ButtonBorder, MetalBorders.Flush3DBorder, MetalBorders.InternalFrameBorder, MetalBorders.MenuBarBorder, MetalBorders.MenuItemBorder, MetalBorders.OptionDialogBorder, MetalBorders.PaletteBorder, MetalBorders.PopupMenuBorder, MetalBorders.RolloverButtonBorder, MetalBorders.ScrollPaneBorder, MetalBorders.TableHeaderBorder, MetalBorders.TextFieldBorder, MetalBorders.ToggleButtonBorder, MetalBorders.ToolBarBorder, SoftBevelBorder, TitledBorder

public interface Border

swing コンポーネントの周囲にボーダーを描画できるオブジェクトを記述するインタフェースです。ボーダーの使用例については、「The Java Tutorial」の「How to Use Borders」セクションを参照してください。

Swing コンポーネントセットでコンポーネントの周囲に装飾的領域、あるいは単なる区切りの領域を作成する手段としては、Insets ではなくボーダーを使ってください。

使用上の注意:

関連項目:
BorderFactory, EmptyBorder, CompoundBorder

メソッドの概要
 Insets getBorderInsets(Component c)
          ボーダーのインセットの値を返します。
 boolean isBorderOpaque()
          ボーダーが不透明かどうかを返します。
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          指定されたコンポーネントのボーダーを、指定された位置およびサイズでペイントします。
 

メソッドの詳細

paintBorder

void paintBorder(Component c,
                 Graphics g,
                 int x,
                 int y,
                 int width,
                 int height)
指定されたコンポーネントのボーダーを、指定された位置およびサイズでペイントします。

パラメータ:
c - このボーダーがペイントされるコンポーネント
g - ペイントのグラフィックス
x - ペイントされたボーダーの x 座標
y - ペイントされたボーダーの y 座標
width - ペイントされたボーダーの幅
height - ペイントされたボーダーの高さ

getBorderInsets

Insets getBorderInsets(Component c)
ボーダーのインセットの値を返します。

パラメータ:
c - このボーダーのインセットの値を適用するコンポーネント

isBorderOpaque

boolean isBorderOpaque()
ボーダーが不透明かどうかを返します。ボーダーが不透明である場合、ボーダーのバックグラウンドはペイント時にボーダー自身によって塗りつぶされます。


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。