com.fiverworks.xone.ut
クラス GuiUt

java.lang.Object
  拡張com.fiverworks.xone.ut.GuiUt

public final class GuiUt
extends Object

Guiアプリケーションのユーティリティクラスです。


フィールドの概要
static Font BOLD_FONT
          システムの内部で使用しているボールドフォント
static int CANCEL
          ダイアログで「キャンセル」をクリックしたときの値
static Font DEFAULT_FONT
          システムの内部で使用しているデフォルトのフォント
static int NO
          ダイアログで「いいえ」をクリックしたときの値
static int OK
          ダイアログで「OK」をクリックしたときの値
static int YES
          ダイアログで「はい」をクリックしたときの値
 
メソッドの概要
static void setAllFont(Container container)
          指定されたコンテナの全てのフォントをデフォルトのフォントに設定します。
static void setAllFont(Container container, Font font)
          指定されたコンテナの全てのフォントを指定されたフォントに設定します。
static void setAllState(Container container, boolean status)
          コンテナ上の全てのコンポーネントの状態を設定します。
static void setCenterOfParent(Component comp, Component parent)
          指定されたコンポーネントを指定された親コンポーネントの中央の位置に設定します。
static void setCenterOfScreen(Component comp)
          指定されたコンポーネントの位置を画面(スクリーン)の中央に設定します。
static void setFavoriteLocation(Component comp, Component parent)
          指定されたコンポーネントを指定された親コンポーネントの適当な位置に設定します。
static int showConfirmDialog(Component parent, String message)
          指定されたパラメータにしたがって確認ダイアログを表示します。
static int showConfirmDialog(Component parent, String message, String title)
          指定されたパラメータにしたがって確認ダイアログを表示します。
static int showDialog(Component parent, Object message, String title, int messageType, int optionType)
          指定されたパラメータにしたがってダイアログを表示します。
static void showErrorDialog(Component parent, String message)
          指定されたパラメータにしたがってエラーダイアログを表示します。
static void showErrorDialog(Component parent, String message, String title)
          指定されたパラメータにしたがってエラーダイアログを表示します。
static void showInformationDialog(Component parent, String message, String title)
          指定されたパラメータにしたがって情報ダイアログを表示します。
static String showInputDialog(Component parent, String message)
          指定されたパラメータにしたがって入力ダイアログを表示します。
static void showMessageDialog(Component parent, String message, String title, int messageType)
          指定されたパラメータにしたがってメッセージダイアログを表示します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

YES

public static final int YES
ダイアログで「はい」をクリックしたときの値

関連項目:
定数フィールド値

NO

public static final int NO
ダイアログで「いいえ」をクリックしたときの値

関連項目:
定数フィールド値

CANCEL

public static final int CANCEL
ダイアログで「キャンセル」をクリックしたときの値

関連項目:
定数フィールド値

OK

public static final int OK
ダイアログで「OK」をクリックしたときの値

関連項目:
定数フィールド値

DEFAULT_FONT

public static Font DEFAULT_FONT
システムの内部で使用しているデフォルトのフォント


BOLD_FONT

public static Font BOLD_FONT
システムの内部で使用しているボールドフォント

メソッドの詳細

showMessageDialog

public static void showMessageDialog(Component parent,
                                     String message,
                                     String title,
                                     int messageType)
指定されたパラメータにしたがってメッセージダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
title - ダイアログのタイトル
messageType - メッセージのタイプ(javax.swing.JOptionPaneを参照してください)

showErrorDialog

public static void showErrorDialog(Component parent,
                                   String message)
指定されたパラメータにしたがってエラーダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ

showErrorDialog

public static void showErrorDialog(Component parent,
                                   String message,
                                   String title)
指定されたパラメータにしたがってエラーダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
title - ダイアログのタイトル

showInformationDialog

public static void showInformationDialog(Component parent,
                                         String message,
                                         String title)
指定されたパラメータにしたがって情報ダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
title - ダイアログのタイトル

showConfirmDialog

public static int showConfirmDialog(Component parent,
                                    String message)
指定されたパラメータにしたがって確認ダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
戻り値:
ユーザがクリックしたボタンの値(YESまたはNOのいずれか)

showConfirmDialog

public static int showConfirmDialog(Component parent,
                                    String message,
                                    String title)
指定されたパラメータにしたがって確認ダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
title - ダイアログのタイトル
戻り値:
ユーザがクリックしたボタンの値(YESまたはNOのいずれか)

showInputDialog

public static String showInputDialog(Component parent,
                                     String message)
指定されたパラメータにしたがって入力ダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
戻り値:
ユーザが入力した文字列

showDialog

public static int showDialog(Component parent,
                             Object message,
                             String title,
                             int messageType,
                             int optionType)
指定されたパラメータにしたがってダイアログを表示します。

パラメータ:
parent - 親のコンポーネント
message - 表示するメッセージ
title - ダイアログのタイトル
messageType - メッセージのタイプ(javax.swing.JOptionPaneを参照してください)
optionType - オプションのタイプ(javax.swing.JOptionPaneを参照してください)
戻り値:
ユーザのクリックしたボタンの値

setAllFont

public static void setAllFont(Container container)
指定されたコンテナの全てのフォントをデフォルトのフォントに設定します。

パラメータ:
container - ターゲットのコンテナ

setAllFont

public static void setAllFont(Container container,
                              Font font)
指定されたコンテナの全てのフォントを指定されたフォントに設定します。

パラメータ:
container - ターゲットのコンテナ
font - 設定したいフォント

setAllState

public static void setAllState(Container container,
                               boolean status)
コンテナ上の全てのコンポーネントの状態を設定します。

パラメータ:
container - ターゲットのコンテナ
status - 設定したい状態

setCenterOfScreen

public static void setCenterOfScreen(Component comp)
指定されたコンポーネントの位置を画面(スクリーン)の中央に設定します。

パラメータ:
comp - コンポーネント

setFavoriteLocation

public static void setFavoriteLocation(Component comp,
                                       Component parent)
指定されたコンポーネントを指定された親コンポーネントの適当な位置に設定します。

パラメータ:
comp - 子のコンポーネント
parent - 親のコンポーネント。nullの場合はスクリーンと見なす

setCenterOfParent

public static void setCenterOfParent(Component comp,
                                     Component parent)
指定されたコンポーネントを指定された親コンポーネントの中央の位置に設定します。

パラメータ:
comp - 子のコンポーネント
parent - 親のコンポーネント。nullの場合はスクリーンと見なす(setCenterOfScreenと同じ)