11

Are there any commercial or open source Java Swing widgets that implement a rule/predicate editor UI? As an example of what I'm looking for, this image shows Cocoa's (excellent) NSPredicateEditor UI for editing a predicate expression:

enter image description here

Barry Wark
  • 107,306
  • 24
  • 181
  • 206
  • I couldn't find any either, probably because there's no standard predicate package in Java. However, there is the [Google predicate class](http://stackoverflow.com/questions/2955043/predicate-in-java/2955081#2955081) (although it's so simple that you could simply write one yourself). Depending on the level of complexity you require, I'd happily create one for you for a bounty commission. :) – BoffinBrain Mar 25 '11 at 15:07

2 Answers2

3

I recently built something that does pretty much this for my application. It's somewhat application specific, but I think it should be possible to make it application agnostic. This is a screenshot of what I built: enter image description here

In my scratching about, I didn't come across anything pre-built that would give me this "for free". But I could just be awful at finding such things.

Gabriel
  • 613
  • 7
  • 12
  • this looks very close to what I'm after. Would you be willing to share the code (free or commercial license)? – Barry Wark Apr 01 '11 at 04:09
  • @Barry Somehow I missed your reply - didn't receive a notification. I'd be willing to share the code. How can I get in contact? I couldn't see any way of privately emailing you outside this site? – Gabriel Apr 06 '11 at 07:05
  • my profile (http://stackoverflow.com/users/2140/barry-wark) has an email address. Or dm me, @barryjwark. – Barry Wark Apr 06 '11 at 12:55
  • Sorry, been away. I see no email address on your profile (maybe it's hidden?) And I'm not sure what "dm"ing is... I don't see anything on my StackOverflow pages that would allow me to do that. – Gabriel Apr 27 '11 at 02:43
  • @Gabriel Can you email me at randall.h.wood@alexandriasoftware.com about possibly reusing your predicate editor code in an open source (GPL) project? – Randall Feb 20 '12 at 14:01
0

We built our own and are releasing it under the BSD license. Code is available at https://github.com/physion/java-predicate-editor

Barry Wark
  • 107,306
  • 24
  • 181
  • 206