01: package abbot.finder;
02:
03: import java.awt.*;
04:
05: /** Interface to support looking up existing components based on a number of
06: different criteria.
07: @see Matcher
08: */
09: public interface ComponentFinder {
10: /** Find a Component, using the given Matcher to determine whether a given
11: component in the hierarchy used by this ComponentFinder is the desired
12: one.
13: <p>
14: Note that {@link MultipleComponentsFoundException} can only be
15: thrown if the {@link Matcher} argument is an instance of
16: {@link MultiMatcher}.
17: */
18: Component find(Matcher m) throws ComponentNotFoundException,
19: MultipleComponentsFoundException;
20:
21: /** Find a Component, using the given Matcher to determine whether a given
22: component in the hierarchy under the given root is the desired
23: one.
24: <p>
25: Note that {@link MultipleComponentsFoundException} can only be
26: thrown if the {@link Matcher} argument is an instance of
27: {@link MultiMatcher}.
28: */
29: Component find(Container root, Matcher m)
30: throws ComponentNotFoundException,
31: MultipleComponentsFoundException;
32: }
|