replace a section of ObservableList in one operation?

2013-09-02 Thread Tomas Mikula
Hi, I cannot find a way to replace a section of ObservableList in one operation. I'm looking for something like ObservableList#setAll(int from, int to, Collection col) or list.subList(from, to).setAll(col). In the latter case, ObservableList#subList() would have to return an instance of Observ

Re: replace a section of ObservableList in one operation?

2013-09-02 Thread Tomas Mikula
Hi Tom, > I don't think there's API for this so the only idea is to copy the list > to an ArrayList, do the replace there and afterwards call > ObservableList#setAll(). yes, that solves the problem of generating just a single change, but the change is unnecessarily big. Martin, thanks for openin

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.

[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 Excep

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

2013-10-08 Thread Tomas Mikula
n the OpenJFX code, so I guess I'm stuck with GPLv2 with Classpath Exception. Best, Tomas > > > On Mon, Oct 7, 2013 at 7:48 AM, Tomas Mikula wrote: >> >> Hi all, >> >> I implemented a text control that supports assigning style classes to >> portion

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

2013-10-08 Thread Tomas Mikula
community and from my own needs. I'm open to feedback and suggestions. Regards, 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 imple

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
On Thu, Nov 7, 2013 at 11:58 AM, John Hendrikx wrote: > Hm, I found it googling, and since it showed up here: > > http://docs.oracle.com/javafx/2/api/javafx/scene/Scene.ScenePulseListener.html > > I figured it was public, but I just noticed the class is defined package > private. Although not par

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
ed as an argument to it's 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: >&g

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
On Thu, Nov 7, 2013 at 3:34 PM, Martin Sladecek wrote: > On 11/07/2013 03:18 PM, Tomas Mikula wrote: >> >> Hi Martin, >> >> On Thu, Nov 7, 2013 at 2:32 PM, Martin Sladecek >> wrote: >>> >>> This is something different. When properties depe

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
Good to know that the problems I described don't apply to your use case. Regards, Tomas On Thu, Nov 7, 2013 at 5:28 PM, John Hendrikx wrote: > On 7/11/2013 14:08, Tomas Mikula wrote: >> >> On Thu, Nov 7, 2013 at 11:58 AM, John Hendrikx wrote: >>> >>>

Re: Use ScenePulseListener to avoid expensive recalculations?

2013-11-07 Thread Tomas Mikula
2013 at 8:55 PM, Martin Sladecek wrote: > On 11/07/2013 04:03 PM, Tomas Mikula wrote: >> >> On Thu, Nov 7, 2013 at 3:34 PM, Martin Sladecek >> wrote: >>> >>> On 11/07/2013 03:18 PM, Tomas Mikula wrote: >>>> >>>> Hi Martin, &

Re: discussion about touch events

2013-11-11 Thread Tomas Mikula
On Mon, Nov 11, 2013 at 1:28 PM, Philipp Dörfler 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 on some background

[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 demonstrate

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 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 most likely

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 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

[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,

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
etHeight(); relaxedArea.release(); Only one change of relaxedArea is emitted. Best, Tomas > > 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 Mi

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
On Sun, Dec 15, 2013 at 8:30 PM, John Hendrikx wrote: > Since you are only allowed to modify properties on the JavaFX thread (in > most cases), I've been using Platform.runLater() to make sure I observe only > complete changes. > > Basically I register an InvalidationListener on the properties tha

Fwd: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
try block. Regards, Tomas > > > Scott > > > > On Sun, Dec 15, 2013 at 6:57 PM, Tomas Mikula > wrote: >> >> On Sun, Dec 15, 2013 at 11:49 PM, Tomas Mikula >> wrote: >> > On Sun, Dec 15, 2013 at 6:39 PM, Scott Palmer >> > wrote: >>

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
> On 2013-12-16 0:39, Scott Palmer wrote: >> >> Good stuff! This is the sort of thing that might make a good >> contribution >> to extend the standard Bindings class. >> >> Scott >> >> >> On Sun, Dec 15, 2013 at 5:49 PM, Toma

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
On Mon, Dec 16, 2013 at 12:17 PM, Tomas Mikula wrote: > On Mon, Dec 16, 2013 at 7:56 AM, Tom Eugelink 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 wrote: > On Mon, Dec 16, 2013 at 1:07 AM, Scott Palmer 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 to thinking of

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
have inadvertently started down that path :-). > > Richard > > On Dec 16, 2013, at 8:09 AM, Tomas Mikula wrote: > >> On Mon, Dec 16, 2013 at 1:47 AM, Tomas Mikula wrote: >>> On Mon, Dec 16, 2013 at 1:07 AM, Scott Palmer wrote: >>>> Interesting, no w

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

2013-12-16 Thread Tomas Mikula
hen. > > -- > best 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 >> wrote: >>&

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-16 Thread Tomas Mikula
ive programming >> (http://lampwww.epfl.ch/~imaier/pub/DeprecatingObserversTR2010.pdf) with >> JavaFX properties using Java 8 lambdas and streams would be quite >> interesting and perhaps very useful. >> >> John >> >> -Original Message- >> From: openjfx-dev-boun.

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 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, rat

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

2013-12-19 Thread Tomas Mikula
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 wrote: > Thanks, Jonathan. > > On Tue, Oct 8, 2013 at 9:08 PM, Jonathan Giles > wrot

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 th

Re: Future of Skins

2014-01-07 Thread Tomas Mikula
On Tue, Jan 7, 2014 at 4:26 PM, John Hendrikx 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

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 wrote: > > Yes, I had similar considerations. I was thinking about providing exactly > such extended Property classes in

Re: Future of Skins

2014-01-08 Thread Tomas Mikula
On Wed, Jan 8, 2014 at 10:56 PM, John Hendrikx 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

Re: [announce] InhiBeans: mitigate redundant recalculations

2014-01-16 Thread Tomas Mikula
;>> >>> obj.setWidth(w); >>> obj.setHeight(h); >>> >>> and have only ONE recalculation of the area property happen. Currently >>> the >>> way bindings work the area will be calculated twice. The intermediate >>> calculation is reall

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

2014-01-22 Thread Tomas Mikula
On Wed, Jan 22, 2014 at 11:27 AM, Tom Schindl wrote: > On 22.01.14 11:07, Martin Sladecek wrote: > > Hi all, > > I would like to start discussion about an addition to API in Observable, > > ObservableValue and all Observable collections. > > There were multiple requests for a way how to avoid dupl

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 subscri

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

2014-01-22 Thread Tomas Mikula
There is no official API for this, right? > > Randahl > > > > > > On 22 Jan 2014, at 13:34, Tomas Mikula wrote: > > Hi Randahl, > > I'm curious about an example where you would take advantage of the > behavior where multiple addListener(listener) call

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

2014-01-22 Thread Tomas Mikula
> > I know we can write removeListener(ourListener) followed by > addListener(ourListener), and while that would work, I would much rather > have the listener list ensure that there are no duplicates, since I believe > that it is always a bug to register the same listener twice.

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 wrote: > I made a bunch of improvements to CodeArea [1], most notably two: > 1

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

2014-02-04 Thread Tomas Mikula
g 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

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

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

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] https://gith

[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 'com.github.y

Re: FX-9: Plans for InputMap?

2016-03-19 Thread Tomas Mikula
Hi Jeanette, before reimplementing the whole thing, please check out my writeup of some use cases [1] and whether WellBehavedFX would serve your needs. Best, Tomas [1] http://htmlpreview.github.io/?https://github.com/TomasMikula/InputMapAPI/blob/master/use-cases.html On Fri, Mar 18, 2016 at 5:4

Re: Handling Enter key presses on Buttons in JavaFX

2016-06-07 Thread Tomas Mikula
What about forgetting the whole notion of a "default button" and the only effect of setting the default property to true being that the button will start as focused? So I add a question: 3) Would anyone miss the "default button"? Tomas On Tue, Jun 7, 2016 at 5:47 PM, Jonathan Giles wrote: > H

Re: Handling Enter key presses on Buttons in JavaFX

2016-06-07 Thread Tomas Mikula
On Tue, Jun 7, 2016 at 6:10 PM, Michael Berry wrote: > On 7 June 2016 at 23:04, Tomas Mikula wrote: > >> What about forgetting the whole notion of a "default button" and the only >> effect of setting the default property to true being that the button will >>

Re: Handling Enter key presses on Buttons in JavaFX

2016-06-07 Thread Tomas Mikula
On Tue, Jun 7, 2016 at 6:33 PM, Stefan Fuchs wrote: > Hi, > > well, if my dialog would include a TextField, an cancel- and an > ok-button, I would obviously want to have the TextField the initial focus. > > Once the dialog opens I can immediately type some text. > When I'm done, I hit enter to c

Re: Handling Enter key presses on Buttons in JavaFX

2016-06-07 Thread Tomas Mikula
On Tue, Jun 7, 2016 at 6:48 PM, Michael Berry wrote: > On 7 June 2016 at 23:30, Tomas Mikula wrote: > >> >> >> On Tue, Jun 7, 2016 at 6:10 PM, Michael Berry wrote: >> >>> On 7 June 2016 at 23:04, Tomas Mikula wrote: >>> >>>> What abo

Re: Handling Enter key presses on Buttons in JavaFX

2016-06-07 Thread Tomas Mikula
On Tue, Jun 7, 2016 at 7:08 PM, Michael Berry wrote: > On 7 June 2016 at 23:57, Tomas Mikula wrote: > >> >> >> On Tue, Jun 7, 2016 at 6:48 PM, Michael Berry wrote: >> >>> On 7 June 2016 at 23:30, Tomas Mikula wrote: >>> >>>> >>

Re: Looking forward to JavaFX 9!

2016-06-14 Thread Tomas Mikula
Felix, I'm sure the JavaFX engineers are the first ones who wish that Oracle invested more resources in JavaFX. Therefore I'm afraid that the anger is targeted at the wrong crowd here. Tomas On Tue, Jun 14, 2016 at 8:52 AM, Felix Bembrick wrote: > OK, I have learned my lesson - I will be caref

Re: Bootstrapping in Java9

2016-06-21 Thread Tomas Mikula
I think what Tom proposes makes sense even regardless of Java 9. Another benefit is not requiring a no-arg constructor. Regards, Tomas On Tue, Jun 21, 2016 at 5:19 AM, Tom Schindl wrote: > Hi, > > I was playing around with Java9 a bit yesterday things worked fine but > what disturbs me a bit is

Re: Bootstrapping in Java9

2016-06-21 Thread Tomas Mikula
ease) if > there were enough interest in doing this. > > -- Kevin > > > > Tomas Mikula wrote: > > I think what Tom proposes makes sense even regardless of Java 9. Another > benefit is not requiring a no-arg constructor. > > Regards, > Tomas > > On Tue, Jun 21, 201

RichTextFX and Flowless looking for new maintainers (and home)

2017-09-11 Thread Tomas Mikula
Hi everyone, since I don't work with JavaFX (or GUI applications, or that matter) anymore, it is hard for me to keep up with the maintenance of my JavaFX projects. I am therefore looking for new maintainers (and possibly new home) of my most active JavaFX project, RichTextFX ( https://github.com/T

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: https://javafx-jira.kenai.com/browse/RT-

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
The suspicious thing about your solution is that your smart implementation of equals() is not symmetric. In case the observable value is visible only within your project, you could do this: interface Subscription { void unsubscribe(); } class MyObservableValue implements Obse

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
Sat, Mar 22, 2014 at 2:07 PM, Tomas Mikula wrote: > The suspicious thing about your solution is that your smart > implementation of equals() is not symmetric. > > In case the observable value is visible only within your project, you > could do this: > > interface Subscrip

Re: *PropertyBase vs Simple*Property

2014-03-22 Thread Tomas Mikula
On Fri, Mar 21, 2014 at 8:53 PM, Tom Schindl 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 by introducing a new internal type > named InvalidatedSimpleObjectP

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
jects do not live in the same > HashSet/Map …. for sure - but why should they? > > @Override > public boolean equals(Object obj) > { > return obj == delegate; // && this == obj > } > > @Override > public int hashCode() > { >

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
her) method. > > > Am 22.03.2014 um 15:55 schrieb Tomas Mikula : > > Hi Mario, > > even if your proposal gets accepted, you would still depend on an > implementation detail of JavaFX, which is always good to avoid. > > To sum up, my second proposal compared to your cur

Re: *PropertyBase vs Simple*Property

2014-03-22 Thread Tomas Mikula
. Tomas > > Tom > > Von meinem iPhone gesendet > >> Am 22.03.2014 um 16:23 schrieb Tom Schindl : >> >> Why not i expect the property to be fully initialize so this would be a >> breaking change in behavior. >> >> Tom >> >> Von meinem

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

Re: Ability to decorate ChangeListener

2014-03-24 Thread Tomas Mikula
ke a transparent proxy. >>> >>> Even if this breaks the equals paradigm, in this special case I can >>> perfectly live with an equals/hashCode implementation like this below. >>> It won’t break your app; as long as both objects do not live in the same >&

Re: Ability to decorate ChangeListener

2014-03-24 Thread Tomas Mikula
are other risks too. > I am pretty well aware about stuff like that. > > > PS: I would love to explain in detail why I decorate change listener, but > this is out of scope of this thread. > > Regards, > Mario > > > Am 24.03.2014 um 14:04 schrieb Tomas Mikula :

Monadic operations on ObservableValue

2014-03-26 Thread Tomas Mikula
EasyBind [1] now adds monadic operations on ObservableValue: http://tomasmikula.github.io/blog/2014/03/26/monadic-operations-on-observablevalue.html [1] http://www.fxmisc.org/easybind/

LiveDirsFX: directory tree model for TreeView that watches the filesystem for changes

2014-04-09 Thread Tomas Mikula
Hello all, I would like to announce that I have published LiveDirsFX [1], which is a combination of a directory watcher, a directory-tree model (usable in TreeView) and a simple asynchronous I/O facility. The added value of this combination, compared to using them all separately, is this: 1. The

Re: add calculating methods to bind

2014-05-21 Thread Tomas Mikula
Hi Tom, it seems to me that in your custom DoubleBinding implementation `other` is not its dependency, thus it does not react to it's invalidations. Tomas On Wed, May 21, 2014 at 9:25 PM, Tom Eugelink wrote: > I came up with this: > > startXProperty().bind( *snap(*heightProperty().multiply(0.2)

Re: add calculating methods to bind

2014-05-21 Thread Tomas Mikula
ide > public ObservableList getDependencies() { > return FXCollections.singletonObservableList(value); > } > }; > > } > > > > On 2014-5-21 21:34, Tomas Mikula wrote: >> >> Hi Tom, >> >> it seems to me that

Re: add calculating methods to bind

2014-05-21 Thread Tomas Mikula
eBinding. EasyBind is at http://www.fxmisc.org/easybind/ Tomas On Wed, May 21, 2014 at 9:47 PM, Tomas Mikula wrote: > Yeah, and you could also eliminate "Observable... dependencies" from > snap's signature, since now you are not using them to invalidate your > binding. > >

Re: monitor mouse events but not capture them

2014-06-09 Thread Tomas Mikula
Hi Tom, I am in favor of the menu being a PopupWindow, but alternatively, could your "canvas" be a Group instead of a Pane? The code would look like this: StackPane stack = new StackPane(); Group canvas = new Group(); canvas.setManaged(false); stack.setOnMousePressed(e -> {

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
t mysterious how those MenuItems get > rendered. I would expect maybe a skin, but I'm not finding it. > > > On 2014-6-9 13:48, Tomas Mikula wrote: > >> Hi Tom, >> >> I am in favor of the menu being a PopupWindow, but alternatively, >> could your "canvas&quo

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
heers, Tomas On Tue, Jun 10, 2014 at 1:45 PM, Tomas Mikula wrote: > What about using Popup, which is a subclass of PopupWindow? You just need to > populate its content > > popup.getContent().addAll(Node...); > > and then show it at the right position, relative to any node >

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
#x27;t Popup remove the need for a stackpane? > > Tom > > > > > On 2014-6-10 15:38, Tomas Mikula wrote: >> >> Since talk is cheap, I slightly reworked your code (not using >> PopupWindow) and it seems to work. >> >> CircularPopupMenu: >> >&g

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
. On Tue, Jun 10, 2014 at 3:57 PM, Tomas Mikula wrote: > Just because I wanted to make minimal changes to your code, which was > already using StackPane. Yes, Popup would remove the need for a > StackPane. > > On Tue, Jun 10, 2014 at 3:52 PM, Tom Eugelink wrote: >> >>

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
could of course... >> Uncertain about that. >> >> Anyhow, the only remaining problem is hiding when the mouse exits. Stage >> does not send the mouse events to addEventFilter. The node.addEventFilter >> does not solve that and on scene I'm not getting the events eithe

Re: Double skin addition

2014-06-11 Thread Tomas Mikula
Hi Randahl, you should override your Skin's dispose() method that removes the label. Possible reasons I can imagine why JavaFX does not clear the child list itself: 1. The control could have some children on it's own, which shouldn't be deleted when applying a skin. This will be the case for a co

Re: Is JavaFX keyboard event handling too rigid?

2014-06-13 Thread Tomas Mikula
Hi Randahl, I think the general advice is to avoid subclassing controls if possible. You can create your custom control that embeds a text field and filter events on your custom control so they never reach the embedded text field. Tomas On Fri, Jun 13, 2014 at 10:11 AM, Randahl Fink Isaksen wro

RichTextFX news

2014-06-18 Thread Tomas Mikula
Hi all, I would like to briefly inform about the recent additions in RichTextFX [1]. RichTextFX is a text area that supports styled text. Its original goal is to support code editing. To this end, it now features: 1) Displaying line numbers and, more generally, any graphic in front of each line.

Re: Mirrored observable collections

2014-07-22 Thread Tomas Mikula
Nice! On Tue, Jul 22, 2014 at 6:09 PM, Mike Hearn wrote: > I have what I imagine is a fairly typical JavaFX application (once it's > released I'll post more about it). It has a GUI, some mostly asynchronous > state management, and interactions with various servers that can change the > apps state

Re: Mirrored observable collections

2014-07-23 Thread Tomas Mikula
On Wed, Jul 23, 2014 at 1:16 PM, Mike Hearn wrote: > Thanks Tomas! I'm a big fan of your work and blog. > > I learned about ReactFX after I started writing my current project, seems > like a very useful abstraction indeed, although so far I've found the basic > JFX stuff to be nearly sufficient (a

Re: How to pause service when it's not visible in TabPane

2014-07-30 Thread Tomas Mikula
What about tab.selectedProperty().addListener((obs, old, selected) -> { if(selected) { service.restart(); } else { service.cancel(); } }); ? Best, Tomas On Wed, Jul 30, 2014 at 9:07 AM, Peter Penzov wrote: > Hi All, >I have a TabPane

Re: How to pause service when it's not visible in TabPane

2014-07-30 Thread Tomas Mikula
d to implement this? > > BR, > Peter > > > On Wed, Jul 30, 2014 at 1:22 PM, Tomas Mikula > wrote: >> >> What about >> >> tab.selectedProperty().addListener((obs, old, selected) -> { >> if(selec

Re: How to pause service when it's not visible in TabPane

2014-07-30 Thread Tomas Mikula
On Thu, Jul 31, 2014 at 12:51 AM, Tomas Mikula wrote: > I'm not sure I understand: you have many service subclasses, each of > them associated with a tab? If so, they can take the tab as an > argument to the constructor: > > abstract class TabService extends Service {

Re: Calculating the preferred size of a node before layout takes place?

2014-08-04 Thread Tomas Mikula
If you are interested in the preferred height, prefHeight(-1) should get you what you want. If this is before the first layout pass takes place, you will also want to call applyCss() before prefHeight(-1). Note: prefHeight(-1) is what autosize() calls internally, but it does not call applyCss().

Re: Overhead for table columns.

2014-08-14 Thread Tomas Mikula
On Thu, Aug 14, 2014 at 9:01 PM, Sean True wrote: > We've been looking at very large tables for use in data grid display. > > Row count scales very nicely indeed, but column count is much more > problematic. To explain your observation: TableView is based on VirtualFlow, which optimizes the numbe

Re: Overhead for table columns.

2014-08-14 Thread Tomas Mikula
ld appreciate adding your specific use case to my suite of > tests. > > Thanks, > > -- Jonathan > > > On 15/08/2014 10:35 a.m., Tomas Mikula wrote: >> >> On Thu, Aug 14, 2014 at 9:01 PM, Sean True wrote: >>> >>> We've been looking at very large ta

Re: Request to allow anonymous user access to Jira.

2014-08-25 Thread Tomas Mikula
Brian Beck writes: > > Hi John: > > It's a reasonable idea and one that we're actually discussing right > now. There are related issues to consider which may take some time to > sort out but I would hope to have it all figured out in a month or so. > Will keep the list posted. > > Brian. (JIRA

CSS: Use "none" or "null"?

2014-08-26 Thread Tomas Mikula
Just a quick question: Which one is correct, -fx-fill: none; or -fx-fill: null; ? Thanks, Tomas

Re: CSS: Use "none" or "null"?

2014-08-26 Thread Tomas Mikula
Thanks for the quick answer. Tomas On Tue, Aug 26, 2014 at 10:24 PM, David Grieve wrote: > Either one. > > > On 8/26/14, 4:21 PM, Tomas Mikula wrote: >> >> Just a quick question: Which one is correct, >> >> -fx-fill: none; >> >> or >> >> -fx-fill: null; >> >> ? >> >> Thanks, >> Tomas > >

Re: Does JavaFX lack a public Property.getObservable() method?

2014-09-12 Thread Tomas Mikula
Hi Randahl, if on button click you only want to update an external boolean property, bidirectional binding suggested by Martin should be all you need. If the problem is more complex, it might be useful to recognize that your toggle button serves two distinct functions: 1. It reflects the state (o

Re: Subclassing behavior in JavaFX Controls

2014-09-17 Thread Tomas Mikula
Hi Pete, work on this is tracked in https://javafx-jira.kenai.com/browse/RT-21598 In terms of the current API, I think the best solution is to add event handlers and/or event filters on the TableView. Regarding your proposed fixes, I have a blog post where I argue that the wiring between the Beh

Re: Subclassing behavior in JavaFX Controls

2014-09-17 Thread Tomas Mikula
ace, yes, but not subclass (augment). I believe that overriding keyboard shortcuts should be doable without subclassing the skin (or behavior). I'm working on something right now and hope to publish something soon. Best, Tomas > > Again, any suggestions for workarounds would be apprecia

Re: Subclassing behavior in JavaFX Controls

2014-09-25 Thread Tomas Mikula
Hi Pete, On Wed, Sep 17, 2014 at 9:57 PM, Tomas Mikula wrote: > > I believe that overriding keyboard shortcuts should be doable without > subclassing the skin (or behavior). I'm working on something right now > and hope to publish something soon. have a look at https://githu

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
Hi Scott, On Fri, Sep 26, 2014 at 7:01 PM, Scott Palmer wrote: > Note: With the second combination above I really wanted something that > worked for both MINUS and SUBTRACT simultaneously - since they both type > the same Character and only one accelerator can be set on a MenuItem. according to

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
Hi Kevin, On Fri, Sep 26, 2014 at 7:16 PM, Kevin Rushforth wrote: > It seems to me that this is working as designed. You have created two > different KeyCombinations and asked that both fire your runnable. Further, > both of the KeyCombinations match your key input since both a KeyPressed and >

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
The explanation could be that on some systems the KeyCharacterCombination("-").match picks the same key code as the one produced by key press (e.g. MINUS), while on other systems it picks the other one (SUBTRACT). On Fri, Sep 26, 2014 at 7:24 PM, Kevin Rushforth wrote: > Is this on a Mac or on Wi

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
The cause of the problem seems clear to me. This is what I observe on my (Linux) system. Pressing '-' on the main part of the keyboard produces MINUS key code pressed. Pressing '-' on the numeric keypad produces SUBTRACT key code pressed. KeyCharacterCombination("-") matches MINUS pressed, but do

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
= KEY_PRESSED && (event.getCode() == MINUS || event.getCode() == SUBTRACT); } }; menuItem.setAccelerator(CtrlMinus); On Fri, Sep 26, 2014 at 8:05 PM, Tomas Mikula wrote: > The cause of the problem seems clear to me. This is what I observe on > my (Linux)

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
> That doesn't explain why this isn't happening for PLUS. KeyCodeCombination(KeyCode.PLUS, KeyCombination.CONTROL_DOWN) is never matched. It might even be impossible to get a KEY_PRESSED event with key code PLUS with English keyboard layout. When I switch keyboard layout to Slovak, which has the

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
d and then compare the characters. This way your first attempt to capture both MINUS and SUBTRACT with a single KeyCharacterCombination("-") would work, as well as capturing all of Shift-EQUALS, PLUS, ADD with a single KeyCharacterCombination("+"). Tomas On Fri, Sep 26, 2014

Re: Accelerators - odd behavior

2014-09-27 Thread Tomas Mikula
On Sat, Sep 27, 2014 at 12:02 AM, Kevin Rushforth wrote: > Can you add this information to the JIRA? > > https://javafx-jira.kenai.com/browse/RT-38830 I added it to https://javafx-jira.kenai.com/browse/RT-27602. Tomas > > Thanks. > > -- Kevin > > > Tomas M

Re: How do I find out why the render loop is running?

2014-09-30 Thread Tomas Mikula
There might be some kind of infinite loop which is not apparent due to asynchrony, such as recursive Platform.runLater void foo() { Platform.runLater(this::foo); } or an infinite loop in layout: void layoutChildren() { Platform.runLater(this::requestLayout); } On

  1   2   >