Re: *PropertyBase vs Simple*Property

2014-03-22 Thread Tomas Mikula
Tomas Mikula tomas.mik...@gmail.com: On Fri, Mar 21, 2014 at 8:53 PM, Tom Schindl tom.schi...@bestsolution.at wrote: Hi Richard, Coming back to this old thread and now that we are using lamdas all over I guess we could take one more look into that. I've prototyped an initial version

Blog post: Trigger processing after a period of inactivity

2014-03-22 Thread Tomas Mikula
Hi all, I just want to quickly inform that I have a post on how to defer processing of user input until the user has been inactive for a certain amount of time. http://tomasmikula.github.io/blog/2014/03/22/trigger-processing-after-a-period-of-inactivity.html Best regards, Tomas

EasyBind: custom bindings made easy (with lambdas)

2014-03-19 Thread Tomas Mikula
Hi all, I just released EasyBind (http://www.fxmisc.org/easybind/), a tiny library with several factory methods to create bindings using lambdas. The most prominent feature is probably the type-safe select binding based on this feature request for JavaFX 9:

ReactFX, UndoFX, RichTextFX in Sonatype repository

2014-03-07 Thread Tomas Mikula
Hi all, I just want to quickly inform that all my JavaFX-related projects, ReactFX [1], UndoFX [2] and RichTextFX [3] (previously known as CodeAreaFX), now have snapshots deployed to the Sonatype OSS repository. [1] http://www.reactfx.org [2] https://github.com/TomasMikula/UndoFX [3]

[announce] FXMisc: umbrella project for various JavaFX-related projects.

2014-03-07 Thread Tomas Mikula
I started FXMisc (www.fxmisc.org) to help developers get their project artifacts to Sonatype/Maven repositories under 'org.fxmisc.yourproject' groupId. If you * don't think that your project deserves a dedicated domain name (yet); * find 'org.fxmisc.yourproject' more appealing than

Re: Layout issue

2014-02-12 Thread Tomas Mikula
Hi John, I'm replying to your question from JIRA: Is there perhaps a better place to hook into when you want to have a chance to update the layout as a result of deferred property changes? I took your example and modified it: https://gist.github.com/TomasMikula/6c5d97edc51ec8fa3d9e Perhaps

UndoFX: undo manager for JavaFX

2014-02-06 Thread Tomas Mikula
Hi all, I just published a general-purpose undo manager for JavaFX. https://github.com/TomasMikula/UndoFX I've been using it for a while in CodeAreaFX and thought it would be useful to release it separately. Best regards, Tomas

ReactFX: exploration of reactive programming for JavaFX (was: [announce] InhiBeans: mitigate redundant recalculations)

2014-02-04 Thread Tomas Mikula
and perhaps very useful. John -Original Message- From: openjfx-dev-boun...@openjdk.java.net [mailto: openjfx-dev-boun...@openjdk.java.net] On Behalf Of Tomas Mikula Sent: Monday, December 16, 2013 9:19 AM To: Richard Bair Cc: openjfx-dev@openjdk.java.net Subject: Re: [announce

Re: CodeArea (almost) ready to support a rich-text editor

2014-01-29 Thread Tomas Mikula
Hi list, I put together a prototype of a rich-text editor based on CodeAreaFX: https://github.com/TomasMikula/CodeAreaFX#2-rich-text-editor Regards, Tomas On Thu, Dec 19, 2013 at 7:47 PM, Tomas Mikula tomas.mik...@gmail.comwrote: I made a bunch of improvements to CodeArea [1], most notably

Re: [8u] API Request: RT-25613, ObservableValue should have a hasListener(listener) method

2014-01-22 Thread Tomas Mikula
Hi Randahl, I'm curious about an example where you would take advantage of the behavior where multiple addListener(listener) calls add the listener just once. Anyway, here [1] are helper classes InvalidationSubscriber and ChangeSubscriber that allow you to do that: InvalidationSubscriber

Re: [announce] InhiBeans: mitigate redundant recalculations

2014-01-16 Thread Tomas Mikula
Hi Alexander, On Thu, Jan 16, 2014 at 10:24 AM, Alexander Kouznetsov alexander.kouznet...@oracle.com wrote: There are two other options you may want to consider: 1) Use XXXBinding as following: value.bind(new DoubleBinding() { { bind(widthProperty(), heightProperty()); } @Override

Re: CSS metadata boilerplate

2014-01-08 Thread Tomas Mikula
+1. I ended up creating such property subclasses myself, too. And I don't provide the static getClassCssMetaData() either. Tomas On Wed, Jan 8, 2014 at 7:05 AM, Tom Eugelink t...@tbee.org wrote: Yes, I had similar considerations. I was thinking about providing exactly such extended Property

Re: Future of Skins

2014-01-08 Thread Tomas Mikula
On Wed, Jan 8, 2014 at 10:56 PM, John Hendrikx hj...@xs4all.nl wrote: On 7/01/2014 18:11, Tomas Mikula wrote: With a non-reusable skin, dispose is pretty much just removing the listeners. With a reusable instance, I suspect there is more work to reset the state of the instance (e.g

Re: Future of Skins

2014-01-07 Thread Tomas Mikula
Interesting ideas. I'm wondering, do you switch skins often enough that you are worried about performance (and thus care about reusability of skins)? Because I don't see how reusability of skins saves you lines of code - whether the code is in the constructor or in the initialize() method, it is

Re: Future of Skins

2014-01-07 Thread Tomas Mikula
On Tue, Jan 7, 2014 at 4:26 PM, John Hendrikx hj...@xs4all.nl wrote: On 7/01/2014 14:50, Tomas Mikula wrote: Interesting ideas. I'm wondering, do you switch skins often enough that you are worried about performance (and thus care about reusability of skins)? Because I don't see how

CodeArea (almost) ready to support a rich-text editor

2013-12-19 Thread Tomas Mikula
. These will be coming in the next year, so you can start hacking your rich-text editor now. Regards, Tomas [1] https://github.com/TomasMikula/CodeAreaFX On Wed, Oct 9, 2013 at 1:39 AM, Tomas Mikula tomas.mik...@gmail.com wrote: Thanks, Jonathan. On Tue, Oct 8, 2013 at 9:08 PM, Jonathan Giles

Thoughts on going reactive (was: [announce] InhiBeans: mitigate redundant recalculations)

2013-12-17 Thread Tomas Mikula
nets. Regards, Tomas On Tue, Dec 17, 2013 at 8:24 AM, Tomas Mikula tomas.mik...@gmail.com wrote: I had a quick look at Java 8 streams and I'm afraid they are of no use for reactive programming. The fundamental problem is that in java.util.stream, computation is driven by the stream consumer

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
Bindings class. Scott On Sun, Dec 15, 2013 at 5:49 PM, Tomas Mikula tomas.mik...@gmail.comwrote: On Sun, Dec 15, 2013 at 6:39 PM, Scott Palmer swpal...@gmail.com wrote: Interesting idea. There is a case I have been curious about and wonder what the best practices are for it. Suppose you

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
On Mon, Dec 16, 2013 at 12:17 PM, Tomas Mikula tomas.mik...@gmail.com wrote: On Mon, Dec 16, 2013 at 7:56 AM, Tom Eugelink t...@tbee.org wrote: I understand what you are trying to do. I was wondering if a more coarse grained approach would be preferable, so a central registration of whether

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
On Mon, Dec 16, 2013 at 1:47 AM, Tomas Mikula tomas.mik...@gmail.com wrote: On Mon, Dec 16, 2013 at 1:07 AM, Scott Palmer swpal...@gmail.com wrote: Interesting, no worse than John's pattern though. I thought of using a try/finally to make sure release was called and that naturally lead

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
:-). Richard On Dec 16, 2013, at 8:09 AM, Tomas Mikula tomas.mik...@gmail.com wrote: On Mon, Dec 16, 2013 at 1:47 AM, Tomas Mikula tomas.mik...@gmail.com wrote: On Mon, Dec 16, 2013 at 1:07 AM, Scott Palmer swpal...@gmail.com wrote: Interesting, no worse than John's pattern though. I thought of using

Re: [ListView] `b.bind(a)` not behaviorally equivalent to `a.addListener(o - b.set(a.get()))`

2013-12-16 Thread Tomas Mikula
regards, Anthony On 12/13/2013 11:17 PM, Tomas Mikula wrote: I guess my main question is: should I file a bug on ListView? Tomas On Fri, Dec 13, 2013 at 8:15 PM, Tomas Mikula tomas.mik...@gmail.com wrote: I just came across a strange case when these two are not equivalent. Maybe

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
://github.com/Netflix/RxJava by chance? I've been dying to see somebody do an RxJava in JavaFX ever since devoxx and it looks like you may have inadvertently started down that path :-). Richard On Dec 16, 2013, at 8:09 AM, Tomas Mikula tomas.mik...@gmail.com wrote: On Mon, Dec 16, 2013

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
Are there helpers for this sort of situation? Are there guidelines in the JavaFX docs somewhere? Regards, Scott On Sat, Dec 14, 2013 at 11:54 PM, Tomas Mikula tomas.mik...@gmail.com wrote: Hello, I just published a small extension of javafx bindings and properties that can help you reduce redundant

[announce] InhiBeans: mitigate redundant recalculations

2013-12-14 Thread Tomas Mikula
Hello, I just published a small extension of javafx bindings and properties that can help you reduce redundant recalculations. They provide two additional methods: public void block(); public void release(); Call p.block() when you suspect your actions will lead to multiple invalidations of p,

[ListView] `b.bind(a)` not behaviorally equivalent to `a.addListener(o - b.set(a.get()))`

2013-12-13 Thread Tomas Mikula
I just came across a strange case when these two are not equivalent. Maybe that is no surprise to you, but it was to me. The case I stumbled upon most likely has to do with ListView internals. Substitute a := ListView.widthProperty() b := ListCell.prefWidthProperty() and the code that

Re: [ListView] `b.bind(a)` not behaviorally equivalent to `a.addListener(o - b.set(a.get()))`

2013-12-13 Thread Tomas Mikula
I guess my main question is: should I file a bug on ListView? Tomas On Fri, Dec 13, 2013 at 8:15 PM, Tomas Mikula tomas.mik...@gmail.com wrote: I just came across a strange case when these two are not equivalent. Maybe that is no surprise to you, but it was to me. The case I stumbled upon

Re: how to scroll ListView to make a specific item visible (only when not visible already)

2013-12-13 Thread Tomas Mikula
On Wed, Sep 25, 2013 at 10:04 PM, Tomas Mikula tomas.mik...@gmail.com wrote: Hi, does anyone know of a way to make a specific ListView item visible, but don't scroll the ListView at all if the item is already in the viewport? I will answer my question from months ago: I have to dig up

Re: discussion about touch events

2013-11-11 Thread Tomas Mikula
On Mon, Nov 11, 2013 at 1:28 PM, Philipp Dörfler phdoerf...@gmail.com wrote: I see the need to be aware of the area that is covered by fingers rather than just considering that area's center point. I'd guess that this adds a new layer of complexity, though. For instance: Say we have a button

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
method). When it's not a property you want to recompute, but an internal state (you use to setup the children), layoutChildren() should be the method for you. -Martin On 11/07/2013 02:08 PM, Tomas Mikula wrote: On Thu, Nov 7, 2013 at 11:58 AM, John Hendrikx hj...@xs4all.nl wrote: Hm, I

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
On Thu, Nov 7, 2013 at 3:34 PM, Martin Sladecek martin.slade...@oracle.com wrote: On 11/07/2013 03:18 PM, Tomas Mikula wrote: Hi Martin, On Thu, Nov 7, 2013 at 2:32 PM, Martin Sladecek martin.slade...@oracle.com wrote: This is something different. When properties depends on each other

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
at 8:55 PM, Martin Sladecek martin.slade...@oracle.com wrote: On 11/07/2013 04:03 PM, Tomas Mikula wrote: On Thu, Nov 7, 2013 at 3:34 PM, Martin Sladecek martin.slade...@oracle.com wrote: On 11/07/2013 03:18 PM, Tomas Mikula wrote: Hi Martin, On Thu, Nov 7, 2013 at 2:32 PM, Martin Sladecek

Re: [announce] CodeAreaFX: text area with styled ranges of text

2013-10-08 Thread Tomas Mikula
with GPLv2 with Classpath Exception. Best, Tomas On Mon, Oct 7, 2013 at 7:48 AM, Tomas Mikula tomas.mik...@gmail.com wrote: Hi all, I implemented a text control that supports assigning style classes to portions of text. It is meant to be used for syntax highlighting. https://github.com

Re: [announce] CodeAreaFX: text area with styled ranges of text

2013-10-08 Thread Tomas Mikula
, Tomas Keep up the great work and be sure to keep me in the loop of your progress :-) -- Jonathan On 8/10/2013 2:48 a.m., Tomas Mikula wrote: Hi all, I implemented a text control that supports assigning style classes to portions of text. It is meant to be used for syntax highlighting

[announce] CodeAreaFX: text area with styled ranges of text

2013-10-07 Thread Tomas Mikula
Hi all, I implemented a text control that supports assigning style classes to portions of text. It is meant to be used for syntax highlighting. https://github.com/TomasMikula/CodeAreaFX The code is based on the original TextArea code. This implies the license to be GPLv2 with the Classpath

how to scroll ListView to make a specific item visible (only when not visible already)

2013-09-25 Thread Tomas Mikula
Hi, does anyone know of a way to make a specific ListView item visible, but don't scroll the ListView at all if the item is already in the viewport? I am working on a code editor, displaying lines in a ListView. Whenever the caret moves up/down, I want to bring the current line to the viewport.

<    1   2