|
Kagetaka | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
net.hizlab.kagetaka.awt.DialogBox
標準的なダイアログボックスです。
入れ子クラスの概要 |
クラス java.awt.Dialog から継承した入れ子クラス |
Dialog.AccessibleAWTDialog |
クラス java.awt.Window から継承した入れ子クラス |
Window.AccessibleAWTWindow |
クラス java.awt.Container から継承した入れ子クラス |
Container.AccessibleAWTContainer |
クラス java.awt.Component から継承した入れ子クラス |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
フィールドの概要 | |
protected static int |
ALIGN_CENTER
ボタンを中央に配置 |
protected static int |
ALIGN_LEFT
ボタンを左に配置 |
protected static int |
ALIGN_RIGHT
ボタンを右に配置 |
protected static int |
BUTTON_CANCEL
キャンセルボタン |
protected static int |
BUTTON_CLOSE
閉じるボタン |
protected static int |
BUTTON_OK
OK ボタン |
protected static int |
BUTTON_OKCANCEL
OK とキャンセルボタン |
protected static int |
BUTTON_OKCANCELAPPLY
OK とキャンセルと適用ボタン |
protected static int |
BUTTON_YESNO
YES と NO ボタン |
protected static int |
BUTTON_YESNOCANCEL
YES と NO とキャンセルボタン |
static String |
COMMAND_APPLY
適用 ボタンのコマンド |
static String |
COMMAND_CANCEL
キャンセル ボタンのコマンド |
static String |
COMMAND_CLOSE
閉じる ボタンのコマンド |
static String |
COMMAND_HELP
ヘルプ ボタンのコマンド |
static String |
COMMAND_NO
NO ボタンのコマンド |
static String |
COMMAND_OK
OK ボタンのコマンド |
static String |
COMMAND_YES
YES ボタンのコマンド |
protected static int |
DEFAULT_BUTTON1
第一ボタンをデフォルトに |
protected static int |
DEFAULT_BUTTON2
第二ボタンをデフォルトに |
protected static int |
DEFAULT_BUTTON3
第三ボタンをデフォルトに |
protected static int |
DEFAULT_BUTTON4
第四ボタンをデフォルトに |
protected Container |
mainPanel
ダイアログのメインの部分のパネルです。 |
protected static int |
MASK_ALIGN
位置揃えマスク |
protected static int |
MASK_BUTTON
利用ボタン用マスク |
protected static int |
MASK_DEFAULT
デフォルトボタン用マスク |
protected static int |
OPTION_HELPBUTTON
ヘルプボタンを追加 |
protected Frame |
owner
このダイアログのオーナフレームです。 |
static int |
RESULT_CANCEL
キャンセルボタンを押された |
static int |
RESULT_CLOSE
閉じる ボタンが押された |
static int |
RESULT_NO
NO ボタンが押された |
static int |
RESULT_NONE
ボタンは押されていない |
static int |
RESULT_OK
OK ボタンを押された |
static int |
RESULT_YES
YES ボタンが押された |
クラス java.awt.Component から継承したフィールド |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
インタフェース java.awt.image.ImageObserver から継承したフィールド |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
コンストラクタの概要 | |
protected |
DialogBox(Frame owner,
int mode)
指定した表示モードに従い、ダイアログボックスを作成します。 |
メソッドの概要 | |
void |
addButtonActionListener(ActionListener l)
ボタンに対するアクションリスナを登録します。 |
void |
addButtonComponentListener(ComponentListener l)
ボタンに対するコンポーネントリスナを登録します。 |
void |
addButtonFocusListener(FocusListener l)
ボタンに対するフォーカスリスナを登録します。 |
void |
addButtonKeyListener(KeyListener l)
ボタンに対するキーリスナを登録します。 |
void |
addButtonMouseListener(MouseListener l)
ボタンに対するマウスリスナを登録します。 |
void |
addButtonMouseMotionListener(MouseMotionListener l)
ボタンに対するマウスモーションリスナを登録します。 |
void |
addComponentListener(ComponentListener l)
ダイアログのメインパネルに対するコンポーネントリスナを登録します。 |
void |
addContainerListener(ContainerListener l)
ダイアログに対するコンテナリスナを登録します。 |
void |
addFocusListener(FocusListener l)
ダイアログに対するフォーカスリスナを登録します。 |
void |
addKeyListener(KeyListener l)
ダイアログに対するキーリスナを登録します。 |
void |
addMouseListener(MouseListener l)
ダイアログに対するマウスリスナを登録します。 |
void |
addMouseMotionListener(MouseMotionListener l)
ダイアログに対するマウスモーションリスナを登録します。 |
void |
addToPanel(Component comp,
GridBagLayout gbl,
int x,
int y,
int width,
int height,
double weightx,
double weighty,
int fill,
int anchor,
Insets insets)
ダイアログにコンポーネントを指定した引数で追加します。 |
void |
clearResult()
押されたボタンの情報をクリアします。 |
protected boolean |
dialogClosing(int result)
ダイアログが閉じられるときに呼び出されます。 |
protected int |
getMode()
設定されているモードを返します。 |
int |
getResult()
どのボタンが押されたかを返します。 |
void |
pack()
ダイアログの大きさを、推奨サイズに設定します。 |
void |
pack(int width,
int height)
ダイアログの大きさを、指定された最大サイズを超えない推奨サイズに設定します。 |
void |
removeButtonActionListener(ActionListener l)
ボタンに対するアクションリスナを解除します。 |
void |
removeButtonComponentListener(ComponentListener l)
ボタンに対するコンポーネントリスナを解除します。 |
void |
removeButtonFocusListener(FocusListener l)
ボタンに対するフォーカスリスナを解除します。 |
void |
removeButtonKeyListener(KeyListener l)
ボタンに対するキーリスナを解除します。 |
void |
removeButtonMouseListener(MouseListener l)
ボタンに対するマウスリスナを解除します。 |
void |
removeButtonMouseMotionListener(MouseMotionListener l)
ボタンに対するマウスモーションリスナを解除します。 |
void |
removeComponentListener(ComponentListener l)
ダイアログに対するコンポーネントリスナを解除します。 |
void |
removeContainerListener(ContainerListener l)
ダイアログに対するコンテナリスナを解除します。 |
void |
removeFocusListener(FocusListener l)
ダイアログに対するフォーカスリスナを解除します。 |
void |
removeKeyListener(KeyListener l)
ダイアログに対するキーリスナを解除します。 |
void |
removeMouseListener(MouseListener l)
ダイアログに対するマウスリスナを解除します。 |
void |
removeMouseMotionListener(MouseMotionListener l)
ダイアログに対するマウスモーションリスナを解除します。 |
void |
setButtonLabel(int index,
String label)
ボタンのラベルを変更します。 |
void |
setFont(Font font)
フォントを設定します。 |
protected void |
setLocationToCenter()
このダイアログを、親ウィンドウの中央に移動します。 |
protected void |
setMode(int value)
モードを設定します。 |
void |
update(Graphics g)
画面をアップデートします。 |
クラス java.awt.Dialog から継承したメソッド |
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show |
クラス java.lang.Object から継承したメソッド |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
フィールドの詳細 |
protected static final int ALIGN_CENTER
protected static final int ALIGN_LEFT
protected static final int ALIGN_RIGHT
protected static final int BUTTON_CANCEL
protected static final int BUTTON_CLOSE
protected static final int BUTTON_OK
protected static final int BUTTON_OKCANCEL
protected static final int BUTTON_OKCANCELAPPLY
protected static final int BUTTON_YESNO
protected static final int BUTTON_YESNOCANCEL
public static final String COMMAND_APPLY
public static final String COMMAND_CANCEL
public static final String COMMAND_CLOSE
public static final String COMMAND_HELP
public static final String COMMAND_NO
public static final String COMMAND_OK
public static final String COMMAND_YES
protected static final int DEFAULT_BUTTON1
protected static final int DEFAULT_BUTTON2
protected static final int DEFAULT_BUTTON3
protected static final int DEFAULT_BUTTON4
protected Container mainPanel
protected static final int MASK_ALIGN
protected static final int MASK_BUTTON
protected static final int MASK_DEFAULT
protected static final int OPTION_HELPBUTTON
protected Frame owner
public static final int RESULT_CANCEL
public static final int RESULT_CLOSE
public static final int RESULT_NO
public static final int RESULT_NONE
public static final int RESULT_OK
public static final int RESULT_YES
コンストラクタの詳細 |
protected DialogBox(Frame owner, int mode)
owner
- オーナーmode
- 表示モードメソッドの詳細 |
public void addButtonActionListener(ActionListener l)
l
- 登録するアクションリスナpublic void addButtonComponentListener(ComponentListener l)
l
- 登録するコンポーネントリスナpublic void addButtonFocusListener(FocusListener l)
l
- 登録するフォーカスリスナpublic void addButtonKeyListener(KeyListener l)
l
- 登録するキーリスナpublic void addButtonMouseListener(MouseListener l)
l
- 登録するマウスリスナpublic void addButtonMouseMotionListener(MouseMotionListener l)
l
- 登録するマウスモーションリスナpublic void addComponentListener(ComponentListener l)
l
- 登録するコンポーネントリスナpublic void addContainerListener(ContainerListener l)
l
- 登録するコンテナリスナpublic void addFocusListener(FocusListener l)
l
- 登録するフォーカスリスナpublic void addKeyListener(KeyListener l)
l
- 登録するキーリスナpublic void addMouseListener(MouseListener l)
l
- 登録するマウスリスナpublic void addMouseMotionListener(MouseMotionListener l)
l
- 登録するマウスモーションリスナpublic void addToPanel(Component comp, GridBagLayout gbl, int x, int y, int width, int height, double weightx, double weighty, int fill, int anchor, Insets insets)
GridBagLayout
を利用する際の簡易メソッドです。
従って、引数は GridBagLayout
のもので、
事前にレイアウトマネージャを GridBagLayout
に設定しておく
必要があります。
comp
- 追加するコンポーネントgbl
- レイアウトマネージャx
- GridBagConstraints.gridx
y
- GridBagConstraints.gridy
width
- GridBagConstraints.gridwidth
height
- GridBagConstraints.gridheight
weightx
- GridBagConstraints.weightx
weighty
- GridBagConstraints.weighty
fill
- GridBagConstraints.fill
anchor
- GridBagConstraints.anchor
insets
- GridBagConstraints.insets
public void clearResult()
protected boolean dialogClosing(int result)
true
を返します。
result
- 押されたボタン
true
、
それ以外の場合は false
protected int getMode()
public int getResult()
public void pack()
public void pack(int width, int height)
width
- ダイアログの最大の幅。
無制限の場合は 0
height
- ダイアログの最大の高さ
無制限の場合は 0
public void removeButtonActionListener(ActionListener l)
l
- 解除するアクションリスナpublic void removeButtonComponentListener(ComponentListener l)
l
- 解除するコンポーネントリスナpublic void removeButtonFocusListener(FocusListener l)
l
- 解除するフォーカスリスナpublic void removeButtonKeyListener(KeyListener l)
l
- 解除するキーリスナpublic void removeButtonMouseListener(MouseListener l)
l
- 解除するマウスリスナpublic void removeButtonMouseMotionListener(MouseMotionListener l)
l
- 解除するマウスモーションリスナpublic void removeComponentListener(ComponentListener l)
l
- 解除するコンポーネントリスナpublic void removeContainerListener(ContainerListener l)
l
- 解除するコンテナリスナpublic void removeFocusListener(FocusListener l)
l
- 解除するフォーカスリスナpublic void removeKeyListener(KeyListener l)
l
- 解除するキーリスナpublic void removeMouseListener(MouseListener l)
l
- 解除するマウスリスナpublic void removeMouseMotionListener(MouseMotionListener l)
l
- 解除するマウスモーションリスナpublic void setButtonLabel(int index, String label)
index
- 最初のボタンが 0
のインデックス番号label
- ラベルpublic void setFont(Font font)
font
- フォントprotected void setLocationToCenter()
protected void setMode(int value)
value
- モードpublic void update(Graphics g)
g
- グラフィックス
|
Kagetaka | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'