File: TextHitInfo.java

package info (click to toggle)
orp-classpath 1%3A0.02.1-3
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 15,212 kB
  • ctags: 16,077
  • sloc: java: 82,255; ansic: 12,779; sh: 6,321; makefile: 1,478; perl: 962; exp: 122; lisp: 115
file content (73 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package java.awt.font;

/**
 * @author John Leuner <jewel@debian.org>
 *
 *
 */

public final class TextHitInfo {

  public int getCharIndex()
  {
    return -1;
  }

  public boolean isLeadingEdge()
  {
    return false;
  }

  public int getInsertionIndex()
  {
    return -1;
  }

  public int hashCode()
  {
    return getCharIndex();
  }

  public boolean equals(Object obj)
  {
    if(obj instanceof TextHitInfo)
      return this.equals((TextHitInfo) obj);
    return false;
  }

  public boolean equals(TextHitInfo hitInfo)
  {
    return (getCharIndex() == hitInfo.getCharIndex()) && (isLeadingEdge() == hitInfo.isLeadingEdge());
  }

  public static TextHitInfo leading(int charIndex)
  {
    return new TextHitInfo();
  }

  public static TextHitInfo trailing(int charIndex)
  {
    return new TextHitInfo();
  }

  public static TextHitInfo beforeOffset(int offset)
  {
    return new TextHitInfo();
  }

  public static TextHitInfo afterOffset(int offset)
  {
    return new TextHitInfo();
  }

  public TextHitInfo getOtherHit()
  {
    return new TextHitInfo();
  }

  public TextHitInfo getOffsetHit(int offset)
  {
    return new TextHitInfo();
  }

}