gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz-commits] gzz/gzz/view LinebrokenCellContentView.java


From: Benja Fallenstein
Subject: Re: [Gzz-commits] gzz/gzz/view LinebrokenCellContentView.java
Date: Sat, 11 Jan 2003 20:26:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9

Asko Soukka wrote:
Sat, 11 Jan 2003, Benja Fallenstein wrote:

How would giving a very long width string (60 times "X") work when the
content of the cell is small? Would LCCV give smaller width if its has
only one short line as its content?

No, it would always give the same  width. Why? What do you use the width
for in PP?

Hmm... you should see PP :) It draws bouding boxes around linked cells and
then connection between boxes. It will look pretty ugly if one 4 letter
word have bounding box for 80 character line.

Yes. Ok. -- I see two alternatives: Add a switch to LinebreakingCCV to choose the behavior or making a subclass. Either is fine with me :)

New bindings:
  Up: one line up, preserves the position from the beginning of the line
  Down: one line down, [same as above]

What does 'preserves the position from the beginning of the line' mean?
The *correct* behavior is to do it by pixels-- i.e., you remember that
you're 87 pixels from the beginning of the display line and look for the


Ok. I *did* it by characters, because doing it by pixels seeemed to
complicated then. But I think starting with characters would be good, and
then move one letter steps back or forward until correct position is
found.

Well, except that you need to do linebreaking for that, too, and it's not a big step from there to the fuller designs. You can start with this, but it's a difficult problem in its own right already.

Another way to do this is could be the way I did finding font size in
AWT's ScalableFont. Recursive function, which starts from the middle of
the strint and checks is the wanted position greater or lesser, splits
string into half, and starts a new recursions with the correct half. Of
course this needs a little optimization, e.g. check first shoudl the
cursor be either at the beginning or at the end of the line.

I don't understand this. Can you explain in terms of, "When the user hits the 'Up' key, the computer..."? :-)

- Benja





reply via email to

[Prev in Thread] Current Thread [Next in Thread]