|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
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)
テキスト位置を指定し、デフォルトのフォントとテキスト色 (現在の Look & Feel によって決定) を使って、既存のボーダーにタイトルを追加します。 |
static TitledBorder |
createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
テキスト位置を指定し、デフォルトのフォントとテキスト色 (現在の Look & Feel によって決定) を使って、既存のボーダーにタイトルを追加します。 |
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.LEFT
TitledBorder.CENTER
TitledBorder.RIGHT
TitledBorder.LEADING
TitledBorder.TRAILING
TitledBorder.DEFAULT_JUSTIFICATION (先頭)
titlePosition - ボーダーに対するテキストの垂直方向の位置を指定する整数値。
次のうちのどれかになります。
TitledBorder.ABOVE_TOP
TitledBorder.TOP (一番上の線上)
TitledBorder.BELOW_TOP
TitledBorder.ABOVE_BOTTOM
TitledBorder.BOTTOM (一番下の線上)
TitledBorder.BELOW_BOTTOM
TitledBorder.DEFAULT_POSITION (一番上)
TitledBorder オブジェクト
public static TitledBorder createTitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
border - タイトルを追加する Border オブジェクトtitle - タイトルのテキストを格納する StringtitleJustification - タイトルの位置揃えを指定する整数値。
次のうちのどれかになります。
TitledBorder.LEFT
TitledBorder.CENTER
TitledBorder.RIGHT
TitledBorder.LEADING
TitledBorder.TRAILING
TitledBorder.DEFAULT_JUSTIFICATION (先頭)
titlePosition - ボーダーに対するテキストの垂直方向の位置を指定する整数値。
次のうちのどれかになります。
TitledBorder.ABOVE_TOP
TitledBorder.TOP (一番上の線上)
TitledBorder.BELOW_TOP
TitledBorder.ABOVE_BOTTOM
TitledBorder.BOTTOM (一番下の線上)
TitledBorder.BELOW_BOTTOM
TitledBorder.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.LEFT
TitledBorder.CENTER
TitledBorder.RIGHT
TitledBorder.LEADING
TitledBorder.TRAILING
TitledBorder.DEFAULT_JUSTIFICATION (先頭)
titlePosition - ボーダーに対するテキストの垂直方向の位置を指定する整数値。
次のうちのどれかになります。
TitledBorder.ABOVE_TOP
TitledBorder.TOP (一番上の線上)
TitledBorder.BELOW_TOP
TitledBorder.ABOVE_BOTTOM
TitledBorder.BOTTOM (一番下の線上)
TitledBorder.BELOW_BOTTOM
TitledBorder.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 Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。