com.ibm.as400.ui.framework.java
Class IllegalUserDataException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--java.lang.IllegalArgumentException
                          |
                          +--com.ibm.as400.ui.framework.java.IllegalUserDataException
All Implemented Interfaces:
java.io.Serializable

public class IllegalUserDataException
extends java.lang.IllegalArgumentException

Thrown when data supplied by the user is found to be invalid. The component containing the invalid data may be identified either by supplying a reference to the Swing component, or by supplying the name as specified in the PDML.

When thrown by a DataBean settor method, the component information need not be supplied, since the Graphical Toolbox runtime already knows which component is affected. However, when the exception is thrown by verifyChanges, the application must indicate which UI component contains the invalid data.

If the detail message is null the Graphical Toolbox runtime will not display a MessageBoxDialog when it catches an IllegalUserDataException.

See Also:
DataBean.verifyChanges(), Serialized Form

Constructor Summary
IllegalUserDataException()
          Constructs an IllegalUserDataException without a detail message.
IllegalUserDataException(java.lang.String message)
          Constructs an IllegalUserDataException with a detail message.
IllegalUserDataException(java.lang.String message, java.lang.String text)
          Constructs an IllegalUserDataException with a detail message and text to be displayed on the error dialog's titlebar
 
Method Summary
 java.awt.Component getComponent()
          Returns the UI component containing the user data which caused the exception to be thrown.
 java.lang.String getComponentName()
          Returns the name of the UI component containing the user data which caused the exception to be thrown.
 java.lang.String getTitleBarText()
          Returns the text to be displayed on the error dialog's TitleBar.
 void setComponent(java.awt.Component c)
          Sets the UI component containing the user data which caused the exception to be thrown.
 void setComponentName(java.lang.String name)
          Sets the UI component containing the user data which caused the exception to be thrown.
 void setTitleBarText(java.lang.String text)
          Sets the text to be displayed on the error dialog's TitleBar.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IllegalUserDataException

public IllegalUserDataException()
Constructs an IllegalUserDataException without a detail message.
Since:
v4r2m0

IllegalUserDataException

public IllegalUserDataException(java.lang.String message)
Constructs an IllegalUserDataException with a detail message.
Parameters:
message - the detail message
Since:
v4r2m0

IllegalUserDataException

public IllegalUserDataException(java.lang.String message,
                                java.lang.String text)
Constructs an IllegalUserDataException with a detail message and text to be displayed on the error dialog's titlebar
Parameters:
message - the detail message
text - text for the titlebar
Since:
v5r1m0
Method Detail

getComponent

public java.awt.Component getComponent()
Returns the UI component containing the user data which caused the exception to be thrown.
Returns:
the UI component
Since:
v4r2m0
See Also:
setComponent(java.awt.Component)

setComponent

public void setComponent(java.awt.Component c)
Sets the UI component containing the user data which caused the exception to be thrown.
Parameters:
c - The offending component
Since:
v4r2m0
See Also:
getComponent()

getComponentName

public java.lang.String getComponentName()
Returns the name of the UI component containing the user data which caused the exception to be thrown.
Returns:
The name of the UI component, as specified in the PDML.
Since:
v5r1m0
See Also:
setComponent(java.awt.Component)

setComponentName

public void setComponentName(java.lang.String name)
Sets the UI component containing the user data which caused the exception to be thrown.
Parameters:
name - The name of the offending component, as specified in the PDML.
Since:
v5r1m0
See Also:
getComponent()

getTitleBarText

public java.lang.String getTitleBarText()
Returns the text to be displayed on the error dialog's TitleBar.
Returns:
text
Since:
v5r1m0
See Also:
setTitleBarText(java.lang.String)

setTitleBarText

public void setTitleBarText(java.lang.String text)
Sets the text to be displayed on the error dialog's TitleBar.
Parameters:
text - the text to be displayed on the TitleBar
Since:
v5r1m0
See Also:
getTitleBarText()