ca.sqlpower.architect.swingui
Class ModalDialogUserPrompter

java.lang.Object
  extended by ca.sqlpower.architect.swingui.ModalDialogUserPrompter
All Implemented Interfaces:
UserPrompter

public class ModalDialogUserPrompter
extends java.lang.Object
implements UserPrompter


Nested Class Summary
 
Nested classes/interfaces inherited from interface ca.sqlpower.architect.UserPrompter
UserPrompter.UserPromptResponse
 
Constructor Summary
ModalDialogUserPrompter(javax.swing.JFrame owner, java.lang.String questionMessage, java.lang.String okText, java.lang.String notOkText, java.lang.String cancelText)
          Creates a new user prompter that uses a dialog to prompt the user.
 
Method Summary
 UserPrompter.UserPromptResponse promptUser(java.lang.Object... formatArgs)
          Solicits a response from the user by presenting the modal dialog (unless the user has previously selected "apply to all").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModalDialogUserPrompter

public ModalDialogUserPrompter(javax.swing.JFrame owner,
                               java.lang.String questionMessage,
                               java.lang.String okText,
                               java.lang.String notOkText,
                               java.lang.String cancelText)
Creates a new user prompter that uses a dialog to prompt the user. Normally this constructor should be called via a UserPrompterFactory such as the current ArchitectSession.

Method Detail

promptUser

public UserPrompter.UserPromptResponse promptUser(java.lang.Object... formatArgs)
Solicits a response from the user by presenting the modal dialog (unless the user has previously selected "apply to all"). This method can be called from any thread; if not called from the Swing EDT and the dialog has to be shown, the current thread will be suspended until the dialog has been shown and dismissed.

Specified by:
promptUser in interface UserPrompter
Parameters:
formatArgs - The arguments to the insert into the format string in the question. See MessageFormat for details.


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca