pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aappddeevv" <aappdde...@verizon.net>
Subject RE: [RFC] adding components to TextArea
Date Sun, 20 Jun 2010 14:30:22 GMT
With regard to (d) for my specific need it pivotpad, I just want to bind
some convenient keys to "logical" cursor movements but I think in general,
you'll want to have a layer of indirection on keystroke to "doing something
in the editor like cursor movement" so that more than just a keystroke can
invoke a logical action. Obviously, keystroke defaults are a must.

-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com] 
Sent: Sunday, June 20, 2010 10:08 AM
To: dev@pivot.apache.org
Subject: Re: [RFC] adding components to TextArea

My comments below - Noel, please feel free to provide additional detail.

> a) How can I extract out the current line and column number?

TextArea#getRowIndex() will give you the line number. There is currently no
way to determine the column index. However, assuming that we define "column
index" as a character's offset within its row, it shouldn't be too tough to

> b) Do you expose the "new paragraph" character as a static field in a
> somewhere?

TextArea#setText(String) uses an instance of
org.apache.pivot.text.PlainTextSerializer, which uses
BufferedReader#readLine() internally.

> c) How can I obtain the total height of each line? 

This is also not available at the moment, but it also shouldn't be too tough
to add.

> d) Are you planning on a logical mapping for keystrokes to "actions" and
> from "actions" to behavior?

Can you be a little more specific? What would an action do? What is a

View raw message