/[fenfire]/fenfire/org/fenfire/view/TextNodeView.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/TextNodeView.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by tjl, Wed Sep 10 13:28:24 2003 UTC revision 1.24 by tjl, Sat Oct 18 06:06:31 2003 UTC
# Line 91  public class TextNodeView implements Pur Line 91  public class TextNodeView implements Pur
91                      public void place(VobScene vs, int into) {}                      public void place(VobScene vs, int into) {}
92                      public float getWidth() { return 10; }                      public float getWidth() { return 10; }
93                      public float getHeight() { return 10; }                      public float getHeight() { return 10; }
94                      public void getCursorXY(int position, float[] xyOut) { getXY(s, position, xyOut); }                      public void getCursorXYY(int position, float[] xyOut) { getXYY(s, position, xyOut); }
95                      public int getCursorPos(float x, float y) { return getPos(s, x, y); }                      public int getCursorPos(float x, float y) { return getPos(s, x, y); }
96                  };                  };
97          final HChain ch = getChain(s);          final HChain ch = getChain(s);
# Line 122  public class TextNodeView implements Pur Line 122  public class TextNodeView implements Pur
122                  }                  }
123                  public float getWidth() { return width; }                  public float getWidth() { return width; }
124                  public float getHeight() { return height; }                  public float getHeight() { return height; }
125                  public void getCursorXY(int position, float[] xyOut) { getXY(s, position, xyOut); }                  public void getCursorXYY(int position, float[] xyOut) { getXYY(s, position, xyOut); }
126                  public int getCursorPos(float x, float y) { return getPos(s, x, y); }                  public int getCursorPos(float x, float y) { return getPos(s, x, y); }
127              };              };
128      }      }
# Line 184  public class TextNodeView implements Pur Line 184  public class TextNodeView implements Pur
184    
185      /**      /**
186       * Get the coordinates before the given character position.       * Get the coordinates before the given character position.
187       * The Y coordinate will be located just below the the line.       * Two Y coordinates are returned, above and below the line.
188       */       */
189      public void getXY(ConstGraph g, Object node, int pos, float[] xy) {      public void getXYY(ConstGraph g, Object node, int pos, float[] xy) {
190          Enfilade1D enf = (Enfilade1D)nodeContent.f(g, node);          Enfilade1D enf = (Enfilade1D)nodeContent.f(g, node);
191          getXY(enf.makeString(), pos, xy);          getXYY(enf.makeString(), pos, xy);
192      }      }
193      public void getXY(String s, int pos, float[] xy) {      public void getXYY(String s, int pos, float[] xy) {
194          if (s.length() == 0) {          if (s.length() == 0) {
195              if (xy != null && xy.length >= 2) {              if (xy != null && xy.length >= 2) {
196                  xy[0] = 0;                  xy[0] = 0;
# Line 209  public class TextNodeView implements Pur Line 209  public class TextNodeView implements Pur
209              // XXX the x offs doesn't seem to be exact,              // XXX the x offs doesn't seem to be exact,
210              //     when there is a lot of spaces. An old bug.              //     when there is a lot of spaces. An old bug.
211              xy[0] = xoffs[0];              xy[0] = xoffs[0];
212              xy[1] = br.getLineOffset(line);              xy[1] = br.getLineOffset(line-1);
213                xy[2] = br.getLineOffset(line);
214          }          }
215      }      }
216    

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26