author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:58:11 +0200 | |
changeset 154 | 0fd5e9c500b9 |
parent 153 | b5cbb797ec0a |
permissions | -rw-r--r-- |
jtulach@89 | 1 |
package org.apidesign.extensibleicon; |
jtulach@89 | 2 |
|
jtulach@89 | 3 |
import org.openide.util.Lookup; |
jtulach@89 | 4 |
|
jtulach@89 | 5 |
// BEGIN: ext.CatQuery |
jtulach@89 | 6 |
public class CatQuery { |
jtulach@89 | 7 |
private CatQuery() { } |
jtulach@89 | 8 |
|
jtulach@89 | 9 |
public static boolean isCat(ExtIcon icon) { |
jtulach@154 | 10 |
for (CatQueryImplementation impl : |
jtulach@154 | 11 |
Lookup.getDefault().lookupAll(CatQueryImplementation.class) |
jtulach@154 | 12 |
) { |
jtulach@89 | 13 |
Boolean res = impl.isCat(icon); |
jtulach@89 | 14 |
if (res != null) { |
jtulach@89 | 15 |
return res; |
jtulach@89 | 16 |
} |
jtulach@89 | 17 |
} |
jtulach@89 | 18 |
|
jtulach@154 | 19 |
for (CatQueryImplementation impl : |
jtulach@154 | 20 |
icon.getLookup().lookupAll(CatQueryImplementation.class) |
jtulach@154 | 21 |
) { |
jtulach@89 | 22 |
Boolean res = impl.isCat(icon); |
jtulach@89 | 23 |
if (res != null) { |
jtulach@89 | 24 |
return res; |
jtulach@89 | 25 |
} |
jtulach@89 | 26 |
} |
jtulach@89 | 27 |
|
jtulach@89 | 28 |
return false; |
jtulach@89 | 29 |
} |
jtulach@89 | 30 |
} |
jtulach@89 | 31 |
// END: ext.CatQuery |