RichTextFX
ReactFX
RichTextFX | ReactFX | |
---|---|---|
9 | 3 | |
1,174 | 370 | |
0.3% | - | |
5.3 | 10.0 | |
6 months ago | over 5 years ago | |
Java | Java | |
BSD 2-clause "Simplified" License | BSD 2-clause "Simplified" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RichTextFX
-
Are We Out of Luck for Rich Text Editing?
RichTextFX isn't great -- documentation is generally unhelpful and not much development lately. I've also found bugs in the component and figuring my way around internals is hard for a new-ish Kotlin dev.
-
Rich Text Editor
RichTextFX is very much Some Assembly Required and there isn't much documentation. I would definitely say it's not easy to use IMHO. I'm currently working on creating a word processing control with it, but it's still very much a work in progress. If you go the route of using RichTextFX, the repo might help you figure some things out.
-
What do you use for building Desktop apps these days?
RichTextFX provides decent syntax highlighting for JavaFX. The project is barely active but works great nevertheless.
-
Missing APIs related to rich text control
RichTextFX issue
-
How to have text wrapping around another component?
This is a tough one. JavaFX doesn't currently have that capability. This would involve a lot of font metrics and line metrics calculations. The API currently does not have public methods for such. Might be added in future versions of javafx.
-
RichTextFX: Open source libraries for making a text viewer / editor
RichTextFX - This fits the bill. It uses following subcomponents..
-
MaterialFX reaches version 11.13.2
VirtualizedFX and TextFlow will be key to creating stylized text editor if you decide to venture that direction. A game changer. RichtextFX is the most popular but uses Flowless as a virtualised container for TextFlow display, hence has many dependencies.
- What languages and libraries would you use to create your own IDE?
ReactFX
-
React is a fractal of bad design
You could also write that in many other languages like Clojure (with cljfx for FP fans), Python, Ruby, JavaScript, and of course Java. It would be less verbose if I used a library that better used Kotlin's features, but the goal here is that you can look up the JavaFX APIs from the link above (there are a couple of implied static imports).
So not much different, but it demonstrates how the text property of the label is bound to a dynamically computed string which is in turn bound to an observable number. When the timer fires, the count increases and the label is recomputed. Everything is done that way so layout computations, for example, won't run unless the size of the label changes. And that's it - no need for VDOMs or prop drilling or state memoization or any of these other performance hacks.
At some point you'll observe that this seems a like like "reactive programming" as used on the server side, and then might want to explore a library like ReactFX which connects these two worlds together.
https://github.com/TomasMikula/ReactFX
There are some other nice features in this type of toolkit that the web community seems to be heading towards. I'd be willing to bet a lot that at some point they'll even reinvent inheritance under a new name, because being able to write code that's generic over component trees is really pretty useful. The hooks/functions model totally wrecks that and has led to this explosion of "design systems" (otherwise known as themes), none of which interoperate properly or can be coded against in an abstracted manner.
None of this is to say that FX is perfect or that React/SolidJS etc are the wrong tools to use. You can run FX apps in a browser using a form of server side rendering - check out https://www.jpro.one to see a fully crawlable website that's actually implemented using JavaFX on the server with no frontend/backend split existing at all. But it only works well if you don't have a fast and reliable server connection, plus a server with plenty of RAM and CPU. Alas browsers pull all sorts of mean tricks to keep people locked inside the HTML5 sandbox so JS frameworks aren't going anywhere, but it would be nice if that community spread its wings a bit and looked at prior art from outside their language. GUIs are old and the challenges involved in them aren't new, and from the outside it looks suspiciously like there is no real progress being made here, only wheel spinning.
-
RichTextFX: Open source libraries for making a text viewer / editor
ReactFX - For cleaner, easier-to-reason event handler composition. Nice!
-
What is this design pattern called is prevalent throughout guava and apache commons?
I've noticed when you look into a lot of classes in some libraries like guava, apache commons, or ReactFX, you'll notice a sort of abstraction pattern. There'll be a class that houses a bunch of common methods. Inside of those methods, instead of putting the relevant logic inside of the method, they'll call an operation-specific class that executes the logic. An example would be PredicateUtils or EventStream. Is there name for this pattern? It doesn't quite seem like it fits the command or service layer patterns.
What are some alternatives?
JFoenix - JavaFX Material Design Library
Flowless - Efficient VirtualFlow for JavaFX
MaterialFX - A library of material components for JavaFX
commons-collections - Apache Commons Collections
Recaf - The modern Java bytecode editor
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
VirtualizedFX
imgui - Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
JITWatch - Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
rich-text-area
javafx-gradle-plugin - Gradle plugin that makes it easy to work with JavaFX 11+