|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.BorderFactory
public class BorderFactory
標準的な Border オブジェクトを提供するためのファクトリクラスです。このファクトリは、可能な場所であればどこでも、共有された Border インスタンスへの参照を分配します。詳細は、「The Java Tutorial」の「How to Use Borders」を参照してください。
| メソッドの概要 | |
|---|---|
static Border |
createBevelBorder(int type)
指定されたタイプの斜影ボーダを生成します。 |
static Border |
createBevelBorder(int type,
Color highlight,
Color shadow)
指定されたハイライトおよび陰影を使って、指定されたタイプの斜影ボーダを生成します。 |
static Border |
createBevelBorder(int type,
Color highlightOuter,
Color highlightInner,
Color shadowOuter,
Color shadowInner)
ハイライト領域および陰影領域の内側および外側の縁に指定された色を使って、指定されたタイプの斜影ボーダを生成します。 |
static CompoundBorder |
createCompoundBorder()
内側および外側の縁が null の複合ボーダを生成します。 |
static CompoundBorder |
createCompoundBorder(Border outsideBorder,
Border insideBorder)
外側および内側の縁に使うボーダオブジェクトを指定して複合ボーダを生成します。 |
static Border |
createEmptyBorder()
スペースを一切とらない空のボーダを生成します。 |
static Border |
createEmptyBorder(int top,
int left,
int bottom,
int right)
上下左右の辺の幅を指定して、スペースをとるが、描画を行わない空のボーダを生成します。 |
static Border |
createEtchedBorder()
ハイライトおよび陰影にコンポーネントの現在のバックグラウンドカラーを使って、指定されたタイプのエッチングボーダを生成します。 |
static Border |
createEtchedBorder(Color highlight,
Color shadow)
指定されたハイライトおよび陰影の色を使って、指定されたタイプのエッチングボーダを生成します。 |
static Border |
createEtchedBorder(int type)
ハイライトおよび陰影にコンポーネントの現在のバックグラウンドカラーを使って、指定されたタイプのエッチングボーダを生成します。 |
static Border |
createEtchedBorder(int type,
Color highlight,
Color shadow)
指定されたハイライトおよび陰影の色を使って、指定されたタイプのエッチングボーダを生成します。 |
static Border |
createLineBorder(Color color)
指定された色で直線ボーダを生成します。 |
static Border |
createLineBorder(Color color,
int thickness)
指定された色と幅で直線ボーダを生成します。 |
static Border |
createLoweredBevelBorder()
くぼみ斜影の縁を持つボーダを生成します。 |
static MatteBorder |
createMatteBorder(int top,
int left,
int bottom,
int right,
Color color)
ある色で塗りつぶされる飾り縁ボーダを生成します。 |
static MatteBorder |
createMatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
指定されたアイコンの複数のタイルで構成される飾り縁ボーダを生成します。 |
static Border |
createRaisedBevelBorder()
浮き出し斜影の縁を持つボーダを生成します。 |
static TitledBorder |
createTitledBorder(Border border)
ボーダオブジェクトを指定する空のタイトルを使って新しいタイトルボーダを生成します。 |
static TitledBorder |
createTitledBorder(Border border,
String title)
タイトルのテキストを指定して、既存のボーダにタイトルを追加します。 |
static TitledBorder |
createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition)
タイトルのテキストおよびその位置を指定して、既存のボーダにタイトルを追加します。 |
static TitledBorder |
createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
タイトルのテキストおよびその位置とフォントを指定して、既存のボーダにタイトルを追加します。 |
static TitledBorder |
createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
タイトルのテキストおよびその位置、フォント、色を指定して、既存のボーダにタイトルを追加します。 |
static TitledBorder |
createTitledBorder(String title)
タイトルのテキストを指定して新しいタイトルボーダを生成します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| メソッドの詳細 |
|---|
public static Border createLineBorder(Color color)
color - 直線に使用する Color
Border オブジェクト
public static Border createLineBorder(Color color,
int thickness)
createMatteBorder(int,int,int,int,Color) を使用します。
color - 直線に使用する Colorthickness - 幅を指定する整数値 (ピクセル単位)
Border オブジェクトpublic static Border createRaisedBevelBorder()
Border オブジェクトpublic static Border createLoweredBevelBorder()
Border オブジェクトpublic static Border createBevelBorder(int type)
type - BevelBorder.LOWERED または BevelBorder.RAISED のどちらかを指定する整数値
Border オブジェクト
public static Border createBevelBorder(int type,
Color highlight,
Color shadow)
type - BevelBorder.LOWERED または BevelBorder.RAISED のどちらかを指定する整数値highlight - ハイライトに使う Color オブジェクトshadow - 陰影に使う Color オブジェクト
Border オブジェクト
public static Border createBevelBorder(int type,
Color highlightOuter,
Color highlightInner,
Color shadowOuter,
Color shadowInner)
注: 陰影の内側および外側の色は、くぼみ斜影ボーダに合わせて切り替えられます。
type - BevelBorder.LOWERED または BevelBorder.RAISED のどちらかを指定する整数値highlightOuter - ハイライト領域の外側の縁に使う Color オブジェクトhighlightInner - ハイライト領域の内側の縁に使う Color オブジェクトshadowOuter - 陰影領域の外側の縁に使う Color オブジェクトshadowInner - 陰影領域の内側の縁に使う Color オブジェクト
Border オブジェクトpublic static Border createEtchedBorder()
Border オブジェクト
public static Border createEtchedBorder(Color highlight,
Color shadow)
highlight - ボーダのハイライトに使う Color オブジェクトshadow - ボーダの陰影に使う Color オブジェクト
Border オブジェクトpublic static Border createEtchedBorder(int type)
type - EtchedBorder.RAISED、または EtchedBorder.LOWERED のどちらか
Border オブジェクト
IllegalArgumentException - タイプが EtchedBorder.RAISED または EtchedBorder.LOWERED のどちらでもない場合
public static Border createEtchedBorder(int type,
Color highlight,
Color shadow)
type - EtchedBorder.RAISED、または EtchedBorder.LOWERED のどちらかhighlight - ボーダのハイライトに使う Color オブジェクトshadow - ボーダの陰影に使う Color オブジェクト
Border オブジェクトpublic static TitledBorder createTitledBorder(String title)
title - タイトルのテキストを格納する String
TitledBorder オブジェクトpublic static TitledBorder createTitledBorder(Border border)
border - タイトルを追加する Border オブジェクト。null の場合、Border は現在の Look & Feel で決定されます。
TitledBorder オブジェクト
public static TitledBorder createTitledBorder(Border border,
String title)
border - タイトルを追加する Border オブジェクトtitle - タイトルのテキストを格納する String
TitledBorder オブジェクト
public static TitledBorder createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition)
border - タイトルを追加する Border オブジェクトtitle - タイトルのテキストを格納する StringtitleJustification - タイトルの位置揃えを指定する整数値。次のうちのどれか。TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION (先頭)titlePosition - ボーダに対してテキストの垂直方向の位置を指定する整数値。次のうちのどれか。 TitledBorder.ABOVE_TOPTitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM (一番下の線上)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION (一番上)TitledBorder オブジェクト
public static TitledBorder createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
border - タイトルを追加する Border オブジェクトtitle - タイトルのテキストを格納する StringtitleJustification - タイトルの位置揃えを指定する整数値。次のうちのどれか。TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION (先頭)titlePosition - ボーダに対してテキストの垂直方向の位置を指定する整数値。次のうちのどれか。 TitledBorder.ABOVE_TOPTitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM (一番下の線上)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION (一番上)titleFont - タイトルのフォントを指定する Font オブジェクト
public static TitledBorder createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
border - タイトルを追加する Border オブジェクトtitle - タイトルのテキストを格納する StringtitleJustification - タイトルの位置揃えを指定する整数値。次のうちのどれか。TitledBorder.LEFTTitledBorder.CENTERTitledBorder.RIGHTTitledBorder.LEADINGTitledBorder.TRAILINGTitledBorder.DEFAULT_JUSTIFICATION (先頭)titlePosition - ボーダに対してテキストの垂直方向の位置を指定する整数値。次のうちのどれか。 TitledBorder.ABOVE_TOPTitledBorder.BELOW_TOPTitledBorder.ABOVE_BOTTOMTitledBorder.BOTTOM (一番下の線上)TitledBorder.BELOW_BOTTOMTitledBorder.DEFAULT_POSITION (一番上)titleFont - タイトルのフォントを指定する Font オブジェクトtitleColor - タイトルの色を指定する Color オブジェクト
TitledBorder オブジェクトpublic static Border createEmptyBorder()
Border オブジェクト
public static Border createEmptyBorder(int top,
int left,
int bottom,
int right)
top - 上の辺の幅を指定する整数値 (ピクセル単位)left - 左の辺の幅を指定する整数値 (ピクセル単位)bottom - 下の辺の幅を指定する整数値 (ピクセル単位)right - 右の辺の幅を指定する整数値 (ピクセル単位)
Border オブジェクトpublic static CompoundBorder createCompoundBorder()
null の複合ボーダを生成します。
CompoundBorder オブジェクト
public static CompoundBorder createCompoundBorder(Border outsideBorder,
Border insideBorder)
outsideBorder - 複合ボーダの外側の縁に使う Border オブジェクトinsideBorder - 複合ボーダの内側の縁に使う Border オブジェクト
CompoundBorder オブジェクト
public static MatteBorder createMatteBorder(int top,
int left,
int bottom,
int right,
Color color)
top - 上の辺の幅を指定する整数値 (ピクセル単位)left - 左の辺の幅を指定する整数値 (ピクセル単位)bottom - 右の辺の幅を指定する整数値 (ピクセル単位)right - 下の辺の幅を指定する整数値 (ピクセル単位)color - ボーダに使う Color
MatteBorder オブジェクト
public static MatteBorder createMatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
注:
アイコンがロードされない場合、ボーダ領域はグレーにペイントされます。
top - 上の辺の幅を指定する整数値 (ピクセル単位)left - 左の辺の幅を指定する整数値 (ピクセル単位)bottom - 右の辺の幅を指定する整数値 (ピクセル単位)right - 下の辺の幅を指定する整数値 (ピクセル単位)tileIcon - ボーダのタイルに使われる Icon オブジェクト
MatteBorder オブジェクト
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。