Last change
on this file since 1102 was 1102, checked in by davidb, 6 years ago |
Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING
|
File size:
966 bytes
|
Line | |
---|
1 | package org.apollo.util;
|
---|
2 |
|
---|
3 | import java.util.List;
|
---|
4 |
|
---|
5 | import org.expeditee.core.Point;
|
---|
6 | /**
|
---|
7 | * Represents a single mutable search result.
|
---|
8 | *
|
---|
9 | * @author Brook Novak
|
---|
10 | */
|
---|
11 | public class TextItemSearchResult {
|
---|
12 | /** The textual content of the text item. */
|
---|
13 | public String text;
|
---|
14 |
|
---|
15 | /** The link of the item. Null if no link: note: this could be a number ... in expeditees format without F tag. */
|
---|
16 | public String explink;
|
---|
17 |
|
---|
18 | /** Any data that is with the text item. */
|
---|
19 | public List<String> data;
|
---|
20 |
|
---|
21 | /** The pixel position in the frame at which the text item resides. */
|
---|
22 | public Point position;
|
---|
23 |
|
---|
24 | public boolean containsData(String str) {
|
---|
25 | assert(str != null);
|
---|
26 | if (data != null)
|
---|
27 | return data.contains(str);
|
---|
28 | return false;
|
---|
29 | }
|
---|
30 |
|
---|
31 | public boolean containsDataTrimmedIgnoreCase(String str) {
|
---|
32 | assert(str != null);
|
---|
33 | if (data != null) {
|
---|
34 | for (String d : data) {
|
---|
35 | if (d != null && d.trim().equalsIgnoreCase(str)) {
|
---|
36 | return true;
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
40 |
|
---|
41 | return false;
|
---|
42 | }
|
---|
43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.