public class WorkingCursorAdapter extends java.lang.Object implements WorkingListener, java.io.Serializable
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);
Constructor and Description |
---|
WorkingCursorAdapter()
Deprecated.
Constructs a WorkingCursorAdapter object.
|
WorkingCursorAdapter(java.awt.Component component)
Deprecated.
Constructs a WorkingCursorAdapter object.
|
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.
|
public WorkingCursorAdapter()
public WorkingCursorAdapter(java.awt.Component component)
component
- The component.public java.awt.Component getComponent()
public void setComponent(java.awt.Component component)
component
- The component.public void startWorking(WorkingEvent event)
startWorking
in interface WorkingListener
event
- The event.public void stopWorking(WorkingEvent event)
stopWorking
in interface WorkingListener
event
- The event.