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

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

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

[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

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

Re: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
On Sun, Dec 15, 2013 at 8:30 PM, John Hendrikx hj...@xs4all.nl 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

Fwd: [announce] InhiBeans: mitigate redundant recalculations

2013-12-15 Thread Tomas Mikula
15, 2013 at 6:57 PM, Tomas Mikula tomas.mik...@gmail.com wrote: On Sun, Dec 15, 2013 at 11:49 PM, Tomas Mikula tomas.mik...@gmail.com wrote: 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

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

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

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

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

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: [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: [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 tom.schi...@bestsolution.atwrote: 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

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

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

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]

[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

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:

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

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
, Tomas On Sat, Mar 22, 2014 at 2:07 PM, Tomas Mikula tomas.mik...@gmail.com 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

Re: *PropertyBase vs Simple*Property

2014-03-22 Thread Tomas Mikula
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 by introducing a new internal type named

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
) { return obj == delegate; // this == obj } @Override public int hashCode() { return delegate.hashCode(); } Regards, Mario Am 22.03.2014 um 14:22 schrieb Tomas Mikula tomas.mik...@gmail.com: A simpler and more universal solution is to also override

Re: Ability to decorate ChangeListener

2014-03-22 Thread Tomas Mikula
22.03.2014 um 15:55 schrieb Tomas Mikula tomas.mik...@gmail.com: 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 current solution: (+) your equals() stays

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

Re: Ability to decorate ChangeListener

2014-03-24 Thread Tomas Mikula
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 tomas.mik...@gmail.com: Hi Mario, On Mon, Mar 24, 2014 at 8:46 AM, Mario Ivankovits ma...@datenwort.at wrote: Thanks for your answer! One thing, I

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 t...@tbee.org wrote: I came up with this: startXProperty().bind(

Re: add calculating methods to bind

2014-05-21 Thread Tomas Mikula
FXCollections.singletonObservableList(value); } }; } On 2014-5-21 21:34, Tomas Mikula wrote: 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

Re: add calculating methods to bind

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

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
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 be a Group instead of a Pane? The code would look like this: StackPane stack = new

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
at 1:45 PM, Tomas Mikula tomas.mik...@gmail.com 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 popup.show(canvas, x, y); Tomas

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
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: https://github.com/TomasMikula/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/scene/menu

Re: monitor mouse events but not capture them

2014-06-10 Thread Tomas Mikula
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 either. But I like the way it is going. Thanks! Tom On 2014-6-10 16:26, Tomas Mikula wrote: Here it is, using a Popup: https

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

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

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 m...@plan99.net 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

Re: Mirrored observable collections

2014-07-23 Thread Tomas Mikula
On Wed, Jul 23, 2014 at 1:16 PM, Mike Hearn m...@plan99.net 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

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 peter.pen...@gmail.com wrote: Hi All,

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

2014-07-30 Thread Tomas Mikula
this? BR, Peter On Wed, Jul 30, 2014 at 1:22 PM, Tomas Mikula tomas.mik...@gmail.com wrote: What about tab.selectedProperty().addListener((obs, old, selected) - { if(selected) { service.restart(); } else { service.cancel

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 tomas.mik...@gmail.com 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
. Thanks, -- Jonathan On 15/08/2014 10:35 a.m., Tomas Mikula wrote: On Thu, Aug 14, 2014 at 9:01 PM, Sean True sean.t...@gmail.com 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

Re: Request to allow anonymous user access to Jira.

2014-08-25 Thread Tomas Mikula
Brian Beck 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.

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 david.gri...@oracle.com 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

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

Re: Subclassing behavior in JavaFX Controls

2014-09-17 Thread Tomas Mikula
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 appreciated. On Wed, Sep 17, 2014 at 3:02 PM, Tomas Mikula tomas.mik...@gmail.com wrote: Hi Pete

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
Hi Scott, On Fri, Sep 26, 2014 at 7:01 PM, Scott Palmer swpal...@gmail.com 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

Re: Accelerators - odd behavior

2014-09-26 Thread Tomas Mikula
Hi Kevin, On Fri, Sep 26, 2014 at 7:16 PM, Kevin Rushforth kevin.rushfo...@oracle.com 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

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 kevin.rushfo...@oracle.com wrote:

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

Re: Accelerators - odd behavior

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

Re: Accelerators - odd behavior

2014-09-27 Thread Tomas Mikula
On Sat, Sep 27, 2014 at 12:02 AM, Kevin Rushforth kevin.rushfo...@oracle.com 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 Mikula wrote: Anyway

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

2014-10-03 Thread Tomas Mikula
This is just a tip: until the bug is fixed, you can use a subclass of ProgressBar like the one below to avoid a bunch of hacks. class MyProgressBar extends ProgressBar { private final DoubleProperty myProgress = new SimpleDoubleProperty(); public DoubleProperty myProgressProperty() {

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

2014-10-03 Thread Tomas Mikula
Okay :) So you are using opacityProperty() and not visibleProperty(), so my exact workaround would not work anyway. A nice thing about that kind of workaround though is that you would have the workaround in one place and once you remove it, the compiler points you to all other places you need to

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

2014-10-03 Thread Tomas Mikula
BTW animatedBind is a useful utility. It makes it much easier to make cool animations that adjust as the data model changes. Here it is: https://gist.github.com/mikehearn/f639176566d735b676e7 Something like that should be in the framework really. Nice indeed.

Re: Permutation of scene graph children

2014-12-02 Thread Tomas Mikula
Hi Werner, On Tue, Dec 2, 2014 at 11:50 AM, Werner Lehmann lehm...@media-interactive.de wrote: Tom, I know about Collections.swap but it looks like a bad idea to use on scene graph children because it seems to temporarily have a duplicate element in the list and I can't have a node twice in

Re: Scrollbars on *View or better VirtualFlow based UI elements

2014-12-15 Thread Tomas Mikula
To add an idea, semi-transparent scrollbars could be shown over the content when the mouse approaches the edge. This would avoid flickering andto save space at the same time. I realize one could not use this if the scrollbars would cover some interactive controls at the edge of the content. Also,

Re: Scrollbars on *View or better VirtualFlow based UI elements

2014-12-15 Thread Tomas Mikula
Hi Werner, On Mon, Dec 15, 2014 at 4:35 PM, Werner Lehmann lehm...@media-interactive.de wrote: Hi Tomas, On 15.12.2014 16:10, Tomas Mikula wrote: To add an idea, semi-transparent scrollbars could be shown over the content when the mouse approaches the edge. This would avoid flickering

Re: Event Filtering

2015-02-06 Thread Tomas Mikula
On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer swpal...@gmail.com wrote: Is it possible to modify the event in an event filter or otherwise tweak the event that is ultimately received by the target? Let's say I have a TextField and I only want to allow typing of capital letters. That is easy

Re: Event Filtering

2015-02-07 Thread Tomas Mikula
On Fri, Feb 6, 2015 at 8:45 PM, Scott Palmer swpal...@gmail.com wrote: On Feb 6, 2015, at 8:21 PM, Tomas Mikula tomas.mik...@gmail.com wrote: On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer swpal...@gmail.com wrote: Is it possible to modify the event in an event filter or otherwise tweak

How to apply skin?

2015-02-08 Thread Tomas Mikula
Hello list, after adding a node to the scene graph, how do I apply the skin to it, in case it is a Control? Something like an equivalent of applyCss() for skins. My use case is this: I add a node to the scene, and want to know its preferred width. So I call node.applyCss() to make sure CSS is

Re: Selection Events v. Focus Events - order is broken in JavaFX 8?

2015-02-10 Thread Tomas Mikula
Hi Scott, whether that behavior is a bug in JavaFX 8 or not, why not commit on focus lost *or* selection change? Less assumptions means more robust code. Regards, Tomas On Tue, Feb 10, 2015 at 10:15 AM, Scott Palmer swpal...@gmail.com wrote: I have a custom field (my own formatted field done

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
dependencies. Some of the other classes will have compilation errors, but the gauge should run. Tom On 17-2-2015 23:15, Tomas Mikula wrote: Maybe if you can post the relevant part of your layoutChildren method so that others can look if they can suggest an improvement. Tomas On Tue, Feb 17

Re: Event when CSS is applied

2015-02-18 Thread Tomas Mikula
Hmm, my view is rather reverse to yours: The fact that the implementation of layout is best solved with inheritance is a sign that JavaFX does _not_ aim enough at doing things via composition. Tomas On Wed, Feb 18, 2015 at 4:37 PM, Tom Eugelink t...@tbee.org wrote: On 18-2-2015 21:49, Tomas

Re: Event when CSS is applied

2015-02-18 Thread Tomas Mikula
So back to your original question: Basically I would like to be informed when the styling of a node has been applied or changed. Is there some place that can provide this information? Turns out you don't actually need this information ;) Regards, Tomas On Wed, Feb 18, 2015 at 3:20 PM, Tom

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
Hi Tom, suppose you have such an event and can tell whether CSS of your Text has changed. But is changed CSS the only time you want to re-position the Text? I guess you also need to re-position it when the size of the parent changes. I imagine the logic for determining whether you need to

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
On 17-2-2015 19:05, Tomas Mikula wrote: Hi Tom, suppose you have such an event and can tell whether CSS of your Text has changed. But is changed CSS the only time you want to re-position the Text? I guess you also need to re-position it when the size of the parent changes. I imagine

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
Maybe if you can post the relevant part of your layoutChildren method so that others can look if they can suggest an improvement. Tomas On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink t...@tbee.org wrote: On 17-2-2015 20:01, David Grieve wrote: On 2/17/15 1:30 PM, Tom Eugelink wrote: The

Re: TableView API, no lazy retrieval of visible cell content possible?

2015-01-27 Thread Tomas Mikula
Hi Robert, instead of listening to visibleProperty(), listen to sceneProperty() and cancel loading when scene becomes null. Tomas On Tue, Jan 27, 2015 at 1:16 PM, Robert Krüger krue...@lesspain.de wrote: Hi, either I don't see the forest for the trees or something is missing in the

Re: TableView API, no lazy retrieval of visible cell content possible?

2015-01-27 Thread Tomas Mikula
were visible, it was set to non-null for the first 23 items. Am Dienstag, 27. Januar 2015 schrieb Tomas Mikula : Hi Robert, instead of listening to visibleProperty(), listen to sceneProperty() and cancel loading when scene becomes null. Tomas On Tue, Jan 27, 2015 at 1:16 PM, Robert Krüger

Re: How to apply skin?

2015-02-09 Thread Tomas Mikula
On 09.02.2015 00:51, Tomas Mikula wrote: Actually, I want skins to be applied in the whole sub-tree of a node. The node itself may not be a control, but it may contain controls.

Re: How to apply skin?

2015-02-08 Thread Tomas Mikula
Actually, I want skins to be applied in the whole sub-tree of a node. The node itself may not be a control, but it may contain controls. On Sun, Feb 8, 2015 at 6:44 PM, Tomas Mikula tomas.mik...@gmail.com wrote: Hello list, after adding a node to the scene graph, how do I apply the skin

Re: OpenJFX mirror at BitBucket?

2015-03-17 Thread Tomas Mikula
they create their pull request, they can have bitbucket generate the patch file for submission 'the old fashioned way'. -- Jonathan On 18/03/2015 1:03 p.m., Tomas Mikula wrote: Legal issues could be resolved by requiring a signed OCA before each pull request is merged. But anyway, if OpenJDK project

Re: OpenJFX mirror at BitBucket?

2015-03-17 Thread Tomas Mikula
Legal issues could be resolved by requiring a signed OCA before each pull request is merged. But anyway, if OpenJDK project does not accept pull requests, who is going to create the patches? If patches are painful for individual developers, they are going to be super painful for the person who is

Re: The trouble with Skins

2015-03-21 Thread Tomas Mikula
one way to do it. The promise of Skins here is that I could just change the look feel, but unfortunately way too many details of the default look feel leak through in the Control itself. --John Tom On 14-3-2015 04:33, Tomas Mikula wrote: A quick poll: Has anyone ever implemented

  1   2   >