Last change
on this file since 134 was 134, checked in by ra33, 16 years ago |
Turned search actions into search agents so they are run on a different thread
|
File size:
648 bytes
|
Rev | Line | |
---|
[134] | 1 | package org.expeditee.agents;
|
---|
| 2 |
|
---|
| 3 | import org.expeditee.gui.Frame;
|
---|
| 4 | import org.expeditee.gui.FrameIO;
|
---|
| 5 |
|
---|
| 6 | public class SearchFrameset extends SearchAgent {
|
---|
| 7 |
|
---|
| 8 | @Override
|
---|
| 9 | protected Frame process(Frame frame) {
|
---|
| 10 | int count = FrameIO.getLastNumber(_startName);
|
---|
| 11 | for (int i = 1; i < count; i++) {
|
---|
| 12 | if (_stop) {
|
---|
| 13 | break;
|
---|
| 14 | }
|
---|
| 15 | String frameName = _startName + i;
|
---|
| 16 | overwriteMessage("Searching " + frameName);
|
---|
| 17 | searchFrame(_results, frameName, _pattern,
|
---|
| 18 | _replacementString);
|
---|
| 19 | }
|
---|
| 20 | _results.save();
|
---|
| 21 |
|
---|
| 22 | String resultFrameName = _results.getName();
|
---|
| 23 | if (_clicked != null)
|
---|
| 24 | _clicked.setLink(resultFrameName);
|
---|
| 25 |
|
---|
| 26 | return _results.getFirstFrame();
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.