|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.as400.vaccess.WorkingCursorAdapter
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 of a server. 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 Summary | |
---|---|
WorkingCursorAdapter()
Deprecated. Constructs a WorkingCursorAdapter object. |
|
WorkingCursorAdapter(Component component)
Deprecated. Constructs a WorkingCursorAdapter object. |
Method Summary | |
---|---|
Component |
getComponent()
Deprecated. Returns the component that determines the frame for cursor changes. |
void |
setComponent(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 |
public WorkingCursorAdapter()
public WorkingCursorAdapter(Component component)
component
- The component.Method Detail |
public Component getComponent()
public void setComponent(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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |