站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

UserQuestionException (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.util
Class UserQuestionException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byorg.openide.util.UserQuestionException
All Implemented Interfaces:
Serializable

public abstract class UserQuestionException
extends IOException

Exception that is thrown when the process is about to perform some action that requires user confirmation. It can be useful when there is a call to a method which cannot open a dialog, but still would like to ask the user a question. It can raise this exception and higher level parts of the system can/should catch it and present a dialog to the user and if the user agrees reinvoke the action again.

The getLocalizedMessage method should return the user question, which will be shown to the user in a dialog with OK, Cancel options and if the user chooses OK, method ex.confirmed () will be called.

See Also:
Serialized Form

Constructor Summary
UserQuestionException()
          Creates new exception UserQuestionException
UserQuestionException(String s)
          Creates new exception UserQuestionException with text specified string s.
 
Method Summary
abstract  void confirmed()
          Invoke the action if the user confirms the action.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserQuestionException

public UserQuestionException()
Creates new exception UserQuestionException


UserQuestionException

public UserQuestionException(String s)
Creates new exception UserQuestionException with text specified string s.

Parameters:
s - the text describing the exception
Method Detail

confirmed

public abstract void confirmed()
                        throws IOException
Invoke the action if the user confirms the action.

Throws:
IOException - if another I/O problem exists


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.