Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text moves when paragraphsize exceedes the editorwindow. #25

Closed
Ambior opened this issue Mar 19, 2014 · 6 comments
Closed

Text moves when paragraphsize exceedes the editorwindow. #25

Ambior opened this issue Mar 19, 2014 · 6 comments

Comments

@Ambior
Copy link

Ambior commented Mar 19, 2014

First off all, a great project:

But, i've got a problem.
Wenn the current paragraphheight exceedes the editorwindow, moving the caret makes the text hop up and down .
The behaviour is reproducible in the sample implementation.
Just type a large text in one paragraph until the srollbar is shown.

@TomasMikula
Copy link
Member

Thanks for reporting. The hopping is caused by the implementation of VirtualFlow, which is used to implement ListView. I reported this to the JavaFX team. Let's see if they will be willing to fix this even though VirtualFlow is not part of the public JavaFX API.

There is another problem with large paragraphs, though. Following the caret as you type is implemented as only bringing the paragraph with the caret to the viewport. This means that when a large paragraph is brought to the viewport, the line with the caret could still be out of view. Let's look at this once the hopping problem is solved.

@Ambior
Copy link
Author

Ambior commented Apr 29, 2014

Hi Tomas,

i've voted the Ticket. Is there a chance that this problem ist to be solved in near furture? It makes the control unuseable for us as an editor (what would be a real shame). Is there a possible workarround?

greetings , Roel

@TomasMikula
Copy link
Member

It is scheduled for JavaFX 9. Given how busy JavaFX devs are, I don't think it's going to be fixed much earlier.

In the ticket, I proposed how the VirtualFlow.show(T cell) method could be fixed. You could try to write a static method show(VirtualFlow flow, T cell) that would simulate the fixed show method. You would need to use reflection to access VirtualFlow's private members. Then do the same for VirtualFlow.show(int index). Then in MyListView, replace every occurrence of flow.show(...) with your static method. A pull request would be nice ;)

@TomasMikula
Copy link
Member

Because of this and other ongoing issues with JavaFX ListView, I decided implemented my own VirtualFlow. It fixes this issue. You can try the latest snapshot, or wait until the 0.4 release.

@ghost
Copy link

ghost commented Jul 7, 2014

Hi Tomas, I tried the new snapshot (finally figured out how to do it). The text flows now correctly! Things look awesome!
Can you add your Virtual flow to Java's build? They should totally use it!
Best,
maher

@TomasMikula
Copy link
Member

I'm going to release 0.4 today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants