|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--javax.swing.border.AbstractBorder | +--javax.swing.border.TitledBorder
String によるタイトルを位置および位置揃えを指定して追加し、任意のボーダを実装するクラスです。
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。
フィールドの概要 | |
static int |
ABOVE_BOTTOM
タイトルをボーダのボトムラインより上に配置します。 |
static int |
ABOVE_TOP
タイトルをボーダのトップラインより上に配置します。 |
static int |
BELOW_BOTTOM
タイトルをボーダのボトムラインより下に配置します。 |
static int |
BELOW_TOP
タイトルをボーダのトップラインより下に配置します。 |
protected Border |
border
|
static int |
BOTTOM
タイトルをボーダのボトムラインの中央に配置します。 |
static int |
CENTER
タイトルテキストをボーダラインの中央に配置します。 |
static int |
DEFAULT_JUSTIFICATION
タイトルテキスト用としてデフォルトの位置揃えを使います。 |
static int |
DEFAULT_POSITION
タイトルテキストに対してデフォルトの垂直方向配置を使います。 |
protected static int |
EDGE_SPACING
|
static int |
LEFT
タイトルテキストをボーダラインの左側に配置します。 |
static int |
RIGHT
タイトルテキストをボーダラインの右側に配置します。 |
protected static int |
TEXT_INSET_H
|
protected static int |
TEXT_SPACING
|
protected String |
title
|
protected Color |
titleColor
|
protected Font |
titleFont
|
protected int |
titleJustification
|
protected int |
titlePosition
|
static int |
TOP
タイトルをボーダのトップラインの中央に配置します。 |
コンストラクタの概要 | |
TitledBorder(Border border)
指定されたボーダと空のタイトルで、TitledBorder のインスタンスを生成します。 |
|
TitledBorder(Border border,
String title)
指定されたボーダで TitledBorder のインスタンスを生成します。 |
|
TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition)
指定されたボーダ、タイトル、タイトルの位置揃え、およびタイトルの配置で、TitledBorder のインスタンスを生成します。 |
|
TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
指定されたボーダ、タイトル、タイトルの位置揃え、タイトルの配置、およびタイトルのフォントで、TitledBorder のインスタンスを生成します。 |
|
TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
指定されたボーダ、タイトル、タイトルの位置揃え、タイトルの配置、タイトルのフォント、およびタイトルのカラーで、TitledBorder のインスタンスを生成します。 |
|
TitledBorder(String title)
エッチングボーダを使う TitledBorder のインスタンスを生成します。 |
メソッドの概要 | |
Border |
getBorder()
タイトル付きボーダのボーダを返します。 |
Insets |
getBorderInsets(Component c)
ボーダのインセットの値を返します。 |
Insets |
getBorderInsets(Component c,
Insets insets)
insets パラメータを、この Border の現在の Insets で初期化し直します。 |
protected Font |
getFont(Component c)
|
Dimension |
getMinimumSize(Component c)
ボーダとタイトルの全体を表示する場合にボーダが必要とする、スペースの最小値を返します。 |
String |
getTitle()
タイトル付きボーダのタイトルを返します。 |
Color |
getTitleColor()
タイトル付きボーダのタイトルカラーを返します。 |
Font |
getTitleFont()
タイトル付きボーダのタイトルフォントを返します。 |
int |
getTitleJustification()
タイトル付きボーダのタイトル位置揃えを返します。 |
int |
getTitlePosition()
タイトル付きボーダのタイトル位置を返します。 |
boolean |
isBorderOpaque()
ボーダが不透明かどうかを返します。 |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
指定されたコンポーネントのボーダを、指定された位置およびサイズでペイントします。 |
void |
setBorder(Border border)
タイトル付きボーダのボーダを設定します。 |
void |
setTitle(String title)
タイトル付きボーダのタイトルを設定します。 |
void |
setTitleColor(Color titleColor)
タイトル付きボーダのタイトルカラーを設定します。 |
void |
setTitleFont(Font titleFont)
タイトル付きボーダのタイトルフォントを設定します。 |
void |
setTitleJustification(int titleJustification)
タイトル付きボーダのタイトル位置揃えを設定します。 |
void |
setTitlePosition(int titlePosition)
タイトル付きボーダのタイトル位置を設定します。 |
クラス javax.swing.border.AbstractBorder から継承したメソッド |
getInteriorRectangle,
getInteriorRectangle |
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
フィールドの詳細 |
protected String title
protected Border border
protected int titlePosition
protected int titleJustification
protected Font titleFont
protected Color titleColor
public static final int DEFAULT_POSITION
public static final int ABOVE_TOP
public static final int TOP
public static final int BELOW_TOP
public static final int ABOVE_BOTTOM
public static final int BOTTOM
public static final int BELOW_BOTTOM
public static final int DEFAULT_JUSTIFICATION
public static final int LEFT
public static final int CENTER
public static final int RIGHT
protected static final int EDGE_SPACING
protected static final int TEXT_SPACING
protected static final int TEXT_INSET_H
コンストラクタの詳細 |
public TitledBorder(String title)
title
- ボーダに表示するタイトルpublic TitledBorder(Border border)
border
- ボーダpublic TitledBorder(Border border, String title)
border
- ボーダtitle
- ボーダに表示するタイトルpublic TitledBorder(Border border, String title, int titleJustification, int titlePosition)
border
- ボーダtitle
- ボーダに表示するタイトルtitleJustification
- タイトルの位置揃えtitlePosition
- タイトルの位置public TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
border
- ボーダtitle
- ボーダに表示するタイトルtitleJustification
- タイトルの位置揃えtitlePosition
- タイトルの位置titleFont
- タイトルを描画するフォントpublic TitledBorder(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
border
- ボーダtitle
- ボーダに表示するタイトルtitleJustification
- タイトルの位置揃えtitlePosition
- タイトルの位置titleFont
- タイトルを描画するフォントtitleColor
- タイトルのカラーメソッドの詳細 |
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
c
- ボーダがペイントされるコンポーネントg
- ペイントのグラフィックスx
- ペイントされるボーダの x 座標y
- ペイントされるボーダの y 座標width
- ペイントされるボーダの幅height
- ペイントされるボーダの高さpublic Insets getBorderInsets(Component c)
c
- このボーダのインセットの値を適用するコンポーネントpublic Insets getBorderInsets(Component c, Insets insets)
c
- このボーダの insets の値を適用するコンポーネントinsets
- 初期化し直されるオブジェクトpublic boolean isBorderOpaque()
public String getTitle()
public Border getBorder()
public int getTitlePosition()
public int getTitleJustification()
public Font getTitleFont()
public Color getTitleColor()
public void setTitle(String title)
title
- ボーダのタイトルpublic void setBorder(Border border)
border
- ボーダpublic void setTitlePosition(int titlePosition)
titlePosition
- ボーダのタイトルの位置public void setTitleJustification(int titleJustification)
titleJustification
- ボーダのタイトルの位置揃えpublic void setTitleFont(Font titleFont)
titleFont
- ボーダのタイトルのフォントpublic void setTitleColor(Color titleColor)
titleColor
- ボーダのタイトルのカラーpublic Dimension getMinimumSize(Component c)
c
- このボーダを描画されるコンポーネントprotected Font getFont(Component c)
|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |