com.ibm.as400.vaccess

Class ErrorDialogAdapter

  • java.lang.Object
    • com.ibm.as400.vaccess.ErrorDialogAdapter
  • All Implemented Interfaces:
    ErrorListener, java.io.Serializable, java.util.EventListener

    Deprecated. 
    Use Java Swing instead, along with the classes in package com.ibm.as400.access

    public class ErrorDialogAdapter
    extends java.lang.Object
    implements ErrorListener, java.io.Serializable
    The ErrorDialogAdapter class represents an object that listens for error events and displays a message dialog for each error event.

    Most errors in the com.ibm.as400.vaccess package are reported using ErrorEvents rather than throwing exceptions. An ErrorDialogAdapter object is useful to give users feedback whenever an error occurs.

    The component property is used to determine the frame that is to be the parent of message dialogs. If no component is set, then a default frame will be used.

    The following example creates an explorer pane filled with the contents of a directory in the integrated file system. It will use an ErrorDialogAdapter object to display all errors in a message dialog.

    // Set up the explorer pane.
    AS400ExplorerPane explorerPane = new AS400ExplorerPane ();
    
    // Set up the explorer pane to display the contents
    // of a directory.
    AS400 system = new AS400 ("MySystem", "Userid", "Password");
    VIFSDirectory directory = new VIFSDirectory (system, "/myDirectory");
    explorerPane.setRoot (directory);
    
    // Add the explorer pane to a frame.
    frame.add (explorerPane);
    
    // Set up the error dialog adapter.
    explorerPane.addErrorListener (new ErrorDialogAdapter (frame));
    
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ErrorDialogAdapter()
      Deprecated. 
      Constructs an ErrorDialogAdapter object.
      ErrorDialogAdapter(java.awt.Component component)
      Deprecated. 
      Constructs an ErrorDialogAdapter object.
      ErrorDialogAdapter(java.awt.Component component, boolean modal)
      Deprecated. 
      Constructs an ErrorDialogAdapter object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void errorOccurred(ErrorEvent event)
      Deprecated. 
      Invoked when an error has occurred.
      java.awt.Component getComponent()
      Deprecated. 
      Returns the component that determines the parent frame for dialogs.
      void setComponent(java.awt.Component component)
      Deprecated. 
      Sets the component that determines the parent frame for dialogs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorDialogAdapter

        public ErrorDialogAdapter()
        Deprecated. 
        Constructs an ErrorDialogAdapter object.
      • ErrorDialogAdapter

        public ErrorDialogAdapter(java.awt.Component component)
        Deprecated. 
        Constructs an ErrorDialogAdapter object. The dialog is modal by default.
        Parameters:
        component - Determines the parent frame for dialogs.
      • ErrorDialogAdapter

        public ErrorDialogAdapter(java.awt.Component component,
                          boolean modal)
        Deprecated. 
        Constructs an ErrorDialogAdapter object.
        Parameters:
        component - Determines the parent frame for dialogs.
        modal - Specifies whether this dialog should be modal.
    • Method Detail

      • errorOccurred

        public void errorOccurred(ErrorEvent event)
        Deprecated. 
        Invoked when an error has occurred. This will display a message dialog with the error message.
        Specified by:
        errorOccurred in interface ErrorListener
        Parameters:
        event - The event.
      • getComponent

        public java.awt.Component getComponent()
        Deprecated. 
        Returns the component that determines the parent frame for dialogs.
        Returns:
        The component, or null if none has been set.
      • setComponent

        public void setComponent(java.awt.Component component)
        Deprecated. 
        Sets the component that determines the parent frame for dialogs.
        Parameters:
        component - The component, or null to use a default frame.