Re: Bug in TreeTableView rendering

2019-10-16 Thread Jeanette Winzenburg



Zitat von Sverre Moe :


A comment on the JDK-8231644 issue was added by Jeanette Winzenburg
https://bugs.openjdk.java.net/browse/JDK-8231644


hmm .. no testing done but: the data object looks pathological - it's

always problematic to have nodes as data (even though technically
possible). That will explode with the known glitches with
graphics/disclosureNode in treeTableRow

I would like to know more about what you are saying here:

1) That OurDataObject and AlsoOurDataObject as data model/type to
TreeTableView is pathological?

2) "Having nodes as data". Are you referring to using a Label node in the
Column CellValueFactory?
column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(
new OurDataObjectLabel(param.getValue().getValue(;



exactly, _class OurDataObjectLabel extends Label_

is a terrible mixing of data with view - simply don't, they should be  
separated for a reason ..




Instead of using:
column.setCellValueFactory(new TreeItemPropertyValueFactory<>("name"));

The reason we are using OurDataObjectLabel, is because we want to style a
specific type of data determined by AlsoOurDataObject.



suboptimal approach: instead let a custom cell style itself based on content


3) What known glitches?


there are a bunch of bugs (don't have references handy, sry) - search  
the bug parade for Tree/Table/Cell andTree/TableRow





Re: Bug in TreeTableView rendering

2019-10-16 Thread Sverre Moe
A comment on the JDK-8231644 issue was added by Jeanette Winzenburg
https://bugs.openjdk.java.net/browse/JDK-8231644

> hmm .. no testing done but: the data object looks pathological - it's
always problematic to have nodes as data (even though technically
possible). That will explode with the known glitches with
graphics/disclosureNode in treeTableRow

I would like to know more about what you are saying here:

1) That OurDataObject and AlsoOurDataObject as data model/type to
TreeTableView is pathological?

2) "Having nodes as data". Are you referring to using a Label node in the
Column CellValueFactory?
column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(
new OurDataObjectLabel(param.getValue().getValue(;

Instead of using:
column.setCellValueFactory(new TreeItemPropertyValueFactory<>("name"));

The reason we are using OurDataObjectLabel, is because we want to style a
specific type of data determined by AlsoOurDataObject.

3) What known glitches?

/Sverre


Re: Bug in TreeTableView rendering

2019-09-30 Thread Kevin Rushforth

Thanks.

-- Kevin


On 9/30/2019 6:59 AM, Sverre Moe wrote:

I filed it on bugreport.java.com 
> We will review your report and have assigned it an internal review 
ID : 9062382.


/Sverre

man. 30. sep. 2019 kl. 14:49 skrev Kevin Rushforth 
mailto:kevin.rushfo...@oracle.com>>:


Hi Sverre,

Thanks for bringing this to our attention. Can you please file a
bug at
bugreport.java.com  [1]?

This seems like a good time to remind everyone that JBS [2] is our
bug
tracking system. This GitHub issue tracker is not actively tracked or
managed. The official GitHub repos in the openjdk organization
will not
have the issue tracker enabled, which should help avoid this
confusion.

-- Kevin

[1] https://bugreport.java.com/
[2] https://bugs.openjdk.java.net/
[3] https://github.com/openjdk/

On 9/30/2019 3:08 AM, Sverre Moe wrote:
> I have created an issue for this on GitHub.
> https://github.com/javafxports/openjdk-jfx/issues/607
>
> /Sverre
>





Re: Bug in TreeTableView rendering

2019-09-30 Thread Kevin Rushforth
Bugs filed at bugreport.java.com will become public once reviewed, which 
usually takes a day or so. I can (and will for the ones filed today) 
speed up the process if needed.


-- Kevin


On 9/30/2019 7:29 AM, Nir Lisker wrote:

I cannot find the bug by searching for the number either as keyword or bug
id.


The bug was still not moved to the public issue tracker (JBS). It first
goes through a behind-the-scenes review to filter irrelevant and security
issues (and maybe other things). That number is clearly stated as "internal
review ID".

On Mon, Sep 30, 2019 at 5:24 PM Magosányi Árpád  wrote:


I cannot find the bug by searching for the number either as keyword or
bug id.

Not having a public issue tracker is kinda defeats being open source.


On 9/30/19 2:59 PM, Sverre Moe wrote:

I filed it on bugreport.java.com

We will review your report and have assigned it an internal review ID :

9062382.

/Sverre

man. 30. sep. 2019 kl. 14:49 skrev Kevin Rushforth <
kevin.rushfo...@oracle.com>:


Hi Sverre,

Thanks for bringing this to our attention. Can you please file a bug at
bugreport.java.com [1]?

This seems like a good time to remind everyone that JBS [2] is our bug
tracking system. This GitHub issue tracker is not actively tracked or
managed. The official GitHub repos in the openjdk organization will not
have the issue tracker enabled, which should help avoid this confusion.

-- Kevin

[1] https://bugreport.java.com/
[2] https://bugs.openjdk.java.net/
[3] https://github.com/openjdk/

On 9/30/2019 3:08 AM, Sverre Moe wrote:

I have created an issue for this on GitHub.
https://github.com/javafxports/openjdk-jfx/issues/607

/Sverre







Re: Bug in TreeTableView rendering

2019-09-30 Thread Nir Lisker
>
> I cannot find the bug by searching for the number either as keyword or bug
> id.
>

The bug was still not moved to the public issue tracker (JBS). It first
goes through a behind-the-scenes review to filter irrelevant and security
issues (and maybe other things). That number is clearly stated as "internal
review ID".

On Mon, Sep 30, 2019 at 5:24 PM Magosányi Árpád  wrote:

>
> I cannot find the bug by searching for the number either as keyword or
> bug id.
>
> Not having a public issue tracker is kinda defeats being open source.
>
>
> On 9/30/19 2:59 PM, Sverre Moe wrote:
> > I filed it on bugreport.java.com
> >> We will review your report and have assigned it an internal review ID :
> > 9062382.
> >
> > /Sverre
> >
> > man. 30. sep. 2019 kl. 14:49 skrev Kevin Rushforth <
> > kevin.rushfo...@oracle.com>:
> >
> >> Hi Sverre,
> >>
> >> Thanks for bringing this to our attention. Can you please file a bug at
> >> bugreport.java.com [1]?
> >>
> >> This seems like a good time to remind everyone that JBS [2] is our bug
> >> tracking system. This GitHub issue tracker is not actively tracked or
> >> managed. The official GitHub repos in the openjdk organization will not
> >> have the issue tracker enabled, which should help avoid this confusion.
> >>
> >> -- Kevin
> >>
> >> [1] https://bugreport.java.com/
> >> [2] https://bugs.openjdk.java.net/
> >> [3] https://github.com/openjdk/
> >>
> >> On 9/30/2019 3:08 AM, Sverre Moe wrote:
> >>> I have created an issue for this on GitHub.
> >>> https://github.com/javafxports/openjdk-jfx/issues/607
> >>>
> >>> /Sverre
> >>>
> >>
>
>


Re: Bug in TreeTableView rendering

2019-09-30 Thread Magosányi Árpád


I cannot find the bug by searching for the number either as keyword or
bug id.

Not having a public issue tracker is kinda defeats being open source.


On 9/30/19 2:59 PM, Sverre Moe wrote:
> I filed it on bugreport.java.com
>> We will review your report and have assigned it an internal review ID :
> 9062382.
>
> /Sverre
>
> man. 30. sep. 2019 kl. 14:49 skrev Kevin Rushforth <
> kevin.rushfo...@oracle.com>:
>
>> Hi Sverre,
>>
>> Thanks for bringing this to our attention. Can you please file a bug at
>> bugreport.java.com [1]?
>>
>> This seems like a good time to remind everyone that JBS [2] is our bug
>> tracking system. This GitHub issue tracker is not actively tracked or
>> managed. The official GitHub repos in the openjdk organization will not
>> have the issue tracker enabled, which should help avoid this confusion.
>>
>> -- Kevin
>>
>> [1] https://bugreport.java.com/
>> [2] https://bugs.openjdk.java.net/
>> [3] https://github.com/openjdk/
>>
>> On 9/30/2019 3:08 AM, Sverre Moe wrote:
>>> I have created an issue for this on GitHub.
>>> https://github.com/javafxports/openjdk-jfx/issues/607
>>>
>>> /Sverre
>>>
>>



Re: Bug in TreeTableView rendering

2019-09-30 Thread Sverre Moe
I filed it on bugreport.java.com
> We will review your report and have assigned it an internal review ID :
9062382.

/Sverre

man. 30. sep. 2019 kl. 14:49 skrev Kevin Rushforth <
kevin.rushfo...@oracle.com>:

> Hi Sverre,
>
> Thanks for bringing this to our attention. Can you please file a bug at
> bugreport.java.com [1]?
>
> This seems like a good time to remind everyone that JBS [2] is our bug
> tracking system. This GitHub issue tracker is not actively tracked or
> managed. The official GitHub repos in the openjdk organization will not
> have the issue tracker enabled, which should help avoid this confusion.
>
> -- Kevin
>
> [1] https://bugreport.java.com/
> [2] https://bugs.openjdk.java.net/
> [3] https://github.com/openjdk/
>
> On 9/30/2019 3:08 AM, Sverre Moe wrote:
> > I have created an issue for this on GitHub.
> > https://github.com/javafxports/openjdk-jfx/issues/607
> >
> > /Sverre
> >
>
>


Re: Bug in TreeTableView rendering

2019-09-30 Thread Nir Lisker
Hi Michael,

doesn't this again exclude all external developers from discussing issues
> with other developers?
>

The mailing lists were established as the place where these discussions
should take place, and anyone can write there. The situation with the
javafxports/openjfx repo was a problematic, at least for me. People would
discuss issues there and submit a fix to them only for the mailing list to
be notified when it was ready for review. Anyone who does not keep constant
track of the GitHub issues would not have a chance to say anything until
that point. I have, by chance, caught several discussions there on topics
relevant to me that I would have have liked to know about. It could also
easily cause two people to work on the same issue in two different channels
because many who used GitHub were not even registered to the mailing lists
until the official fix submission.

To my opinion disabling the issue tracker defeats the whole purpose of
> using GitHub at all
>

GitHub's main strengths for contributors are the ease of code reviewing
(inline comments etc.) compared to discussions on JIRA (JBS), and the ease
of submitting a fix - PR with automated tests - compared to the current
Webrev with manual tests. Having another issue tracker was actually a
disadvantage.

- Nir

On Mon, Sep 30, 2019 at 4:05 PM Michael Paus  wrote:

> Hi,
> doesn't this again exclude all external developers from discussing
> issues with other developers?
> To my opinion disabling the issue tracker defeats the whole purpose of
> using GitHub at all, or
> did I misunderstand something here?
> Michael
>
>
> Am 30.09.19 um 14:45 schrieb Kevin Rushforth:
> > The official GitHub repos in the openjdk organization will not have
> > the issue tracker enabled, which should help avoid this confusion.
> >
> > -- Kevin
>
>


Re: Bug in TreeTableView rendering

2019-09-30 Thread Kevin Rushforth
This mailing list would be the place for discussion of issues. If there 
is additional relevant information that comes out of the discussion, 
someone with an OpenJDK ID can add it to the bug report.


One problem with an enabled issue tracker, which is what we have now in 
the javafxports/openjdk-jfx sandbox, is that it gives the illusion that 
it is being used to track issues. It isn't and never has been. Both the 
README and CONTRIBUTING docs state that "while the issue tracker in this 
Github project can be a convenient place to file an issue (either a bug 
or an enhancement request), the official bug database for OpenJFX is 
JBS.", but we still get people asking about the status of an "issue" 
filed there.


-- Kevin


On 9/30/2019 6:04 AM, Michael Paus wrote:

Hi,
doesn't this again exclude all external developers from discussing 
issues with other developers?
To my opinion disabling the issue tracker defeats the whole purpose of 
using GitHub at all, or

did I misunderstand something here?
Michael


Am 30.09.19 um 14:45 schrieb Kevin Rushforth:
The official GitHub repos in the openjdk organization will not have 
the issue tracker enabled, which should help avoid this confusion.


-- Kevin 






Re: Bug in TreeTableView rendering

2019-09-30 Thread Michael Paus

Hi,
doesn't this again exclude all external developers from discussing 
issues with other developers?
To my opinion disabling the issue tracker defeats the whole purpose of 
using GitHub at all, or

did I misunderstand something here?
Michael


Am 30.09.19 um 14:45 schrieb Kevin Rushforth:
The official GitHub repos in the openjdk organization will not have 
the issue tracker enabled, which should help avoid this confusion.


-- Kevin 




Re: Bug in TreeTableView rendering

2019-09-30 Thread Kevin Rushforth

Hi Sverre,

Thanks for bringing this to our attention. Can you please file a bug at 
bugreport.java.com [1]?


This seems like a good time to remind everyone that JBS [2] is our bug 
tracking system. This GitHub issue tracker is not actively tracked or 
managed. The official GitHub repos in the openjdk organization will not 
have the issue tracker enabled, which should help avoid this confusion.


-- Kevin

[1] https://bugreport.java.com/
[2] https://bugs.openjdk.java.net/
[3] https://github.com/openjdk/

On 9/30/2019 3:08 AM, Sverre Moe wrote:

I have created an issue for this on GitHub.
https://github.com/javafxports/openjdk-jfx/issues/607

/Sverre





Re: Bug in TreeTableView rendering

2019-09-30 Thread Sverre Moe
I have created an issue for this on GitHub.
https://github.com/javafxports/openjdk-jfx/issues/607

/Sverre

man. 26. aug. 2019 kl. 20:03 skrev Sverre Moe :

> I think I have found a bug/regression with Java 11 regarding TreeTableView.
> This has worked fine on JavaFX 8, but is messed up with JavaFX 11.
> 1) The arrow button is on the text
> 2) No text indentation levels: Each row (no matter the level) is at the
> left edge of the TreeTableView.
>
> I can file an issue at GitHub if this is a real bug/regression. I just
> wanted to check first here.
>
> TreeTableColumn column = new
> TreeTableColumn<>("Column");
> column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(new
> OurDataObjectLabel(param.getValue().getValue(;
>
> We are using Label here so we can set StyleClass based on some information
> in the OurDataObject.
>
> class OurDataObject {
> private String name;
> public String getName() { return name; }
> }
>
> class AlsoOurDataObject extends OurDataObject {
> public boolean isSomething() { ... }
> }
>
> class OurDataObjectLabel extends Label() {
> public OurDataObjectLabel(OurDataObject ourDataObject) {
> setText(ourDataObject.getName());
> if (ourDataObject instanceof AlsoOurDataObject) {
> if (((AlsoOurDataObject) ourDataObject).isSomething()) {
> getStyleClass().add("style");
> }
> }
> }
> }
>
> A workaround was to use OurDataObject for both types in the
> TreeTableColumn, create a CellFactory to do what has been done in
> OurDataObjectLabel and in addition to the CellValueFactory.
>
> Code Example for reproducing the problem:
> This is using a String instead of an Object as the data model for
> simplicity.
> I have attached a screenshot that illustrates this problem. Made with the
> example code below.
>
> import javafx.application.Application;
> import javafx.beans.property.ReadOnlyObjectWrapper;
> import javafx.scene.Scene;
> import javafx.scene.control.TreeItem;
> import javafx.scene.control.TreeTableColumn;
> import javafx.scene.control.TreeTableView;
> import javafx.scene.layout.StackPane;
> import javafx.scene.text.Text;
> import javafx.stage.Stage;
>
> public class App extends Application {
>
> public static void main(String[] args) {
> App.launch(args);
> }
>
> @Override
> public void start(Stage stage) throws Exception {
> StackPane root = new StackPane();
>
> TreeTableView treeTableView = new TreeTableView<>();
> treeTableView.setShowRoot(false);
> root.getChildren().add(treeTableView);
>
> TreeTableColumn column = new
> TreeTableColumn<>("Column");
> column.setPrefWidth(200);
> treeTableView.getColumns().add(column);
>
> column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(
> new Text(param.getValue().getValue(;
>
> TreeItem rootItem = new TreeItem<>("");
> treeTableView.setRoot(rootItem);
>
> TreeItem item1 = new TreeItem<>("LEVEL1");
> item1.setExpanded(true);
> rootItem.getChildren().add(item1);
>
> TreeItem item2 = new TreeItem<>("LEVEL2");
> item2.setExpanded(true);
> item1.getChildren().add(item2);
>
> TreeItem item3 = new TreeItem<>("LEVEL2_1");
> item3.setExpanded(true);
> item2.getChildren().add(item3);
>
> Scene scene = new Scene(root, 250, 150);
>
> stage.setTitle("JavaFX11");
> stage.setScene(scene);
> stage.show();
> }
> }
>
>
> /Sverre
>
>


Bug in TreeTableView rendering

2019-08-26 Thread Sverre Moe
I think I have found a bug/regression with Java 11 regarding TreeTableView.
This has worked fine on JavaFX 8, but is messed up with JavaFX 11.
1) The arrow button is on the text
2) No text indentation levels: Each row (no matter the level) is at the
left edge of the TreeTableView.

I can file an issue at GitHub if this is a real bug/regression. I just
wanted to check first here.

TreeTableColumn column = new
TreeTableColumn<>("Column");
column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(new
OurDataObjectLabel(param.getValue().getValue(;

We are using Label here so we can set StyleClass based on some information
in the OurDataObject.

class OurDataObject {
private String name;
public String getName() { return name; }
}

class AlsoOurDataObject extends OurDataObject {
public boolean isSomething() { ... }
}

class OurDataObjectLabel extends Label() {
public OurDataObjectLabel(OurDataObject ourDataObject) {
setText(ourDataObject.getName());
if (ourDataObject instanceof AlsoOurDataObject) {
if (((AlsoOurDataObject) ourDataObject).isSomething()) {
getStyleClass().add("style");
}
}
}
}

A workaround was to use OurDataObject for both types in the
TreeTableColumn, create a CellFactory to do what has been done in
OurDataObjectLabel and in addition to the CellValueFactory.

Code Example for reproducing the problem:
This is using a String instead of an Object as the data model for
simplicity.
I have attached a screenshot that illustrates this problem. Made with the
example code below.

import javafx.application.Application;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeTableColumn;
import javafx.scene.control.TreeTableView;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class App extends Application {

public static void main(String[] args) {
App.launch(args);
}

@Override
public void start(Stage stage) throws Exception {
StackPane root = new StackPane();

TreeTableView treeTableView = new TreeTableView<>();
treeTableView.setShowRoot(false);
root.getChildren().add(treeTableView);

TreeTableColumn column = new
TreeTableColumn<>("Column");
column.setPrefWidth(200);
treeTableView.getColumns().add(column);

column.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(
new Text(param.getValue().getValue(;

TreeItem rootItem = new TreeItem<>("");
treeTableView.setRoot(rootItem);

TreeItem item1 = new TreeItem<>("LEVEL1");
item1.setExpanded(true);
rootItem.getChildren().add(item1);

TreeItem item2 = new TreeItem<>("LEVEL2");
item2.setExpanded(true);
item1.getChildren().add(item2);

TreeItem item3 = new TreeItem<>("LEVEL2_1");
item3.setExpanded(true);
item2.getChildren().add(item3);

Scene scene = new Scene(root, 250, 150);

stage.setTitle("JavaFX11");
stage.setScene(scene);
stage.show();
}
}


/Sverre