com.ibm.as400.vaccess

Class WorkingCursorAdapter

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

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

    public class WorkingCursorAdapter
    extends java.lang.Object
    implements WorkingListener, java.io.Serializable
    The WorkingCursorAdapter class represents an object that listens for working events and sets the cursor as needed. When an event source starts working, the cursor is changed to the "wait" cursor. When an event source stops working, the cursor is changed back to the original cursor.

    If multiple start events are fired, then the same number of stop events must be fired to get the cursor back to its original state.

    The component property is used to determine the frame where the cursor is changed. If no component is set, or a parent frame is not available, then the cursor will not be changed.

    The following example creates a tree model filled with the contents of a directory in the integrated file system. It will use a WorkingCursorAdapter object to change the cursor as needed.

    // Set up the tree model in a JTree.
    AS400TreeModel treeModel = new AS400TreeModel ();
    JTree tree = new JTree (treeModel);
    
    // Set up the working cursor adapter. treeModel.addWorkingListener (new WorkingCursorAdapter (tree));
    // Set up the tree model to contain the contents of // a directory. AS400 system = new AS400 (); VIFSDirectory directory = new VIFSDirectory (system, "/myDirectory"); treeModel.setRoot (directory);
    // Create a frame and add the tree. JFrame frame = new JFrame (); frame.getContentPane ().add (directory);
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      WorkingCursorAdapter()
      Deprecated. 
      Constructs a WorkingCursorAdapter object.
      WorkingCursorAdapter(java.awt.Component component)
      Deprecated. 
      Constructs a WorkingCursorAdapter object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.awt.Component getComponent()
      Deprecated. 
      Returns the component that determines the frame for cursor changes.
      void setComponent(java.awt.Component component)
      Deprecated. 
      Sets the component that determines the frame for cursor changes.
      void startWorking(WorkingEvent event)
      Deprecated. 
      Processes a start working event.
      void stopWorking(WorkingEvent event)
      Deprecated. 
      Processes a stop working event.
      • Methods inherited from class java.lang.Object

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

      • WorkingCursorAdapter

        public WorkingCursorAdapter()
        Deprecated. 
        Constructs a WorkingCursorAdapter object.
      • WorkingCursorAdapter

        public WorkingCursorAdapter(java.awt.Component component)
        Deprecated. 
        Constructs a WorkingCursorAdapter object.
        Parameters:
        component - The component.
    • Method Detail

      • getComponent

        public java.awt.Component getComponent()
        Deprecated. 
        Returns the component that determines the frame for cursor changes.
        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 frame for cursor changes.
        Parameters:
        component - The component.
      • startWorking

        public void startWorking(WorkingEvent event)
        Deprecated. 
        Processes a start working event. If the component has been added to a frame, then this will set the cursor to the wait cursor.
        Specified by:
        startWorking in interface WorkingListener
        Parameters:
        event - The event.
      • stopWorking

        public void stopWorking(WorkingEvent event)
        Deprecated. 
        Processes a stop working event. This will set the cursor back to its previous form. If there are, however, multiple calls to startWorking(), the cursor is not changed back until all starts have matching stops.
        Specified by:
        stopWorking in interface WorkingListener
        Parameters:
        event - The event.