Re: JDK-8130738 TextFlow's tab width is static

2019-11-06 Thread Kevin Rushforth
Hi Scott, The CSS reference is here: modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html As for your question about indentation, reformatting entire files or large blocks of code you aren't touching is discouraged. In your specific case, reformatting the methods in the

Re: JDK-8130738 TextFlow's tab width is static

2019-11-05 Thread Scott Palmer
I finally had a moment to get back at this. I've changed the name of the property from tabWidth to tabSize and implemented the CSS property '-fx-tab-size'. The CSS documentation will need to be updated. I didn't see where the CSS document is located in the source tree. While adding CSS support

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Scott Palmer
I think what we’ve settled on fits CSS for the web. I agree we shouldn’t deviate from that if possible. Scott > On Oct 17, 2019, at 5:30 PM, Pedro Duque Vieira > wrote: > > Hi, > > Kevin asked for developers opinions on this issue, just thought I'd leave > my own. > > Didn't have time to

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Pedro Duque Vieira
Hi, Kevin asked for developers opinions on this issue, just thought I'd leave my own. Didn't have time to read the thread thoroughly enough, don't have much time at the moment to do it. Apologies for that. Just wanted to make a comment about the CSS support for this feature. I think if you add

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
On 10/17/19 12:32 PM, Kevin Rushforth wrote: It seems that you have a path forward then. So, there are a couple questions to answer: 1. Should the type of the property be int or double? If it really is only ever going to be a number of spaces, then int seems fine. That, along with the

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Kevin Rushforth
It seems that you have a path forward then. So, there are a couple questions to answer: 1. Should the type of the property be int or double? If it really is only ever going to be a number of spaces, then int seems fine. That, along with the name of the property, would underscore the fact that

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Scott Palmer
You’re right. Something I was reading indicated that while there was no default unit, ‘px’ was implicitly appended. I can’t find that now. Go figure. Everything I find now about CSS tab-size is in agreement with what David wrote. It’s a number of spaces. With units it would be a ‘length’

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
@openjdk.java.net Mailing Subject: Re: JDK-8130738 TextFlow's tab width is static Hi, As I wrote, adding units complicates things. We would have two linked properties in what you have below and one modifies the interpretation of the other. If we expose the number of spaces integer property today

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
Really ? It defaults to pixels ? Is that just inherited as being the default CSS unit ? Is that FX's implementation Hmm. A bit of reading about web CSS says that strictly anything without an explicit unit should be ignored. The only exception is zero, where it doesn't matter. Eg see :

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
On 10/17/19 11:16 AM, Kevin Rushforth wrote: It might make sense to just add the tabSize property now, and later consider adding a tabUnits property in the future if needed. By default, having the units be "number of spaces in the current font" is what makes the most sense, so before we

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
Hi, As I wrote, adding units complicates things. We would have two linked properties in what you have below and one modifies the interpretation of the other. If we expose the number of spaces integer property today, I think we'd have to add the units as a separate property, but it might be

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Kevin Rushforth
That's a good question. It feels a bit incomplete without CSS support, but might be good enough for most uses. I'd be interested in what other developers think. -- Kevin On 10/17/2019 11:22 AM, Scott Palmer wrote: So do we go ahead and implement tabSize without the CSS support? I’m not

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Scott Palmer
So do we go ahead and implement tabSize without the CSS support? I’m not sure the CSS property should be added before unit issues are worked out, as I think the units would be expected in the CSS context. E.g. CSS implicitly adds ‘px’ if no unit is specified. If our tabSize units are

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Kevin Rushforth
It might make sense to just add the tabSize property now, and later consider adding a tabUnits property in the future if needed. By default, having the units be "number of spaces in the current font" is what makes the most sense, so before we could add tabUnits we would need to extend it as

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Scott Palmer
Hi Phil, Thanks for taking a look. I was going to get back to this soon to attempt adding the CSS property as you mention in your previous email. I considered tabSize as a name as well. I don’t have a preference if we leave things as representing tabs as a number of spaces. But it wouldn’t

Re: JDK-8130738 TextFlow's tab width is static

2019-10-17 Thread Phil Race
Hi, Some more points which I thought about but for whatever reason did not pen .. First one minor thing: tabWidth is an OK name, but it does not conjure up that the value you specify isn't a width in pixels but the number of discrete space characters to use. FWIW CSS calls it tab-size. But

Re: JDK-8130738 TextFlow's tab width is static

2019-10-15 Thread Phil Race
Hi, I've looked over this and I don't see any issues - meaning gotchas. It just provides a way to over-ride the hard-coded 8, whether using a Text node directly or a TextFlow. Two observations of what one might call limitations 1) This is a rendering time property, which is controlled by the

Re: JDK-8130738 TextFlow's tab width is static

2019-09-30 Thread Kevin Rushforth
Hi Scott, Thanks for the update. I haven't had much time lately between the Skara switch and trying to keep up with jpackage changes... The next step is, as you note, to continue discussion any issues around the API, including whether and how it might interact with a rich text editor that

Re: JDK-8130738 TextFlow's tab width is static

2019-09-30 Thread Scott Palmer
Okay, current work relocated to a clone of the new official Git repo. My initial implementation is here: https://github.com/swpalmer/jfx/commit/cc6193451bf8a693093f3ded5dcbe47af2fcbe8f I would submit it as a pull

Re: JDK-8130738 TextFlow's tab width is static

2019-09-23 Thread Scott Palmer
My current work is here https://github.com/javafxports/openjdk-jfx/compare/develop...swpalmer:jdk-8130738?expand=1 While writing a unit test I realized that the StubToolkit isn’t really running the

Re: JDK-8130738 TextFlow's tab width is static

2019-09-20 Thread Tom Schindl
Hi, Well I'm not sure this API is correct on TextFlow, if it is supposed to render complex texts like (MS Word) it rather needs a Tab-Stop API, not? Have we investigated other text-layout controls from other frameworks like Swing, Qt, WPF, ... ? What API do those expose? Tom On 20.09.19 18:57,

JDK-8130738 TextFlow's tab width is static

2019-09-18 Thread Scott Palmer
I would like to implement this feature, being able to adjust the tab size in a TextFlow or Text node (JDK-8130738 ). It involves new public API, so I want to start a discussion about it here. (My motivation is that RichTextFX suggests an