Re: scenebuilder and migpane

2014-01-06 Thread Richard Bair
 MigLayout is a very popular layout engine in Swing and SWT (and also gaining 
 ground on Android), I think it would be good for SceneBuilder to better 
 support MigLayout.

+1, I’d love to see enough support in SceneBuilder that any 3rd party layout 
container could supply editor support, so that the SceneBuilder team doesn’t 
have to hard code support for different layout containers. This was one of the 
goals of the “Design Time API for Java Beans” JSR (273, or 277? I don’t 
remember) to do the same for Swing. We haven’t got that far with Scene Builder 
but I think the idea is great. MigLayout is widely used enough that we could 
just add hard-coded support for it (maybe you or another person could 
contribute that?). Ideally it would be something any 3rd party layout vendor 
could provide — but in practice there are not that many widely used 3rd party 
layouts — even in the Swing world.

Richard

Re: scenebuilder and migpane

2014-01-06 Thread Eric Le Ponner

Le 6 janv. 2014 à 17:19, Richard Bair richard.b...@oracle.com a écrit :

 MigLayout is a very popular layout engine in Swing and SWT (and also gaining 
 ground on Android), I think it would be good for SceneBuilder to better 
 support MigLayout.
 
 +1, I’d love to see enough support in SceneBuilder that any 3rd party layout 
 container could supply editor support, so that the SceneBuilder team doesn’t 
 have to hard code support for different layout containers. This was one of 
 the goals of the “Design Time API for Java Beans” JSR (273, or 277? I don’t 
 remember) to do the same for Swing. We haven’t got that far with Scene 
 Builder but I think the idea is great.

The idea is great I agree.
However defining an API that opens the user interactive gestures of a tool like 
SB
is not a trivial task. And FXML brings some additional complexity.
IMHO the Design Time API from JSR 273 would require several amendments to be 
implementable in the context of SB.

May be for SB 4.0 ?… ;)

 MigLayout is widely used enough that we could just add hard-coded support for 
 it (maybe you or another person could contribute that?). Ideally it would be 
 something any 3rd party layout vendor could provide — but in practice there 
 are not that many widely used 3rd party layouts — even in the Swing world.

In the middle term, I think hard-coded support is probably the best option, I 
think.

 
 Richard

Eric



Re: scenebuilder and migpane

2014-01-06 Thread Tom Eugelink


On 2014-1-6 17:19, Richard Bair wrote:

MigLayout is a very popular layout engine in Swing and SWT (and also gaining 
ground on Android), I think it would be good for SceneBuilder to better support 
MigLayout.

+1, I’d love to see enough support in SceneBuilder that any 3rd party layout 
container could supply editor support, so that the SceneBuilder team doesn’t 
have to hard code support for different layout containers. This was one of the 
goals of the “Design Time API for Java Beans” JSR (273, or 277? I don’t 
remember) to do the same for Swing. We haven’t got that far with Scene Builder 
but I think the idea is great. MigLayout is widely used enough that we could 
just add hard-coded support for it (maybe you or another person could 
contribute that?). Ideally it would be something any 3rd party layout vendor 
could provide — but in practice there are not that many widely used 3rd party 
layouts — even in the Swing world.



Sure, if I can get some help getting started. (Aka if somebody tells me which 
class needs implementing and -reading that one post- how to build SceneBuilder, 
I'll bring the MigPane knowledge to the party.)

Tom




Re: scenebuilder and migpane

2014-01-03 Thread Tobias Bley
That would be great! We only using MigPane for all our layouts…


Am 03.01.2014 um 10:10 schrieb Tom Eugelink t...@tbee.org:

 
 Would it be possible to offer MigPane as a Container in SceneBuilder?
 
 Tom
 



Re: scenebuilder and migpane

2014-01-03 Thread Tom Eugelink


Well, I figure the helper lines will be a problem anyhow. But I was planning on 
just trying it.

Tom


On 2014-1-3 11:04, Eric Le Ponner wrote:

I guess it's worth trying to drop MigPane JAR file in SB2 library panel and see.
However SB2 makes some assumptions about containers.
So that might not work straight away.

Eric


Le 3 janv. 2014 à 10:10, Tom Eugelink t...@tbee.org a écrit :


Would it be possible to offer MigPane as a Container in SceneBuilder?

Tom






Re: scenebuilder and migpane

2014-01-03 Thread Tom Eugelink


Simply dropping the jars is not possible, because MigLayout is split into two 
jars; core and javafx. Core does not contain any JavaFX classes and thus 
SceneBuilder does not import it (button is disabled). After manually merging 
the two jars into one, MigPane is listed in SB as a custom control.

Dropping nodes onto MigPane works; they are put next to each other, as the default layout logic of 
MigPane does things. But for each node there should be a possibility to specify a constraint 
string, the cc property is not listed in the inspector (unlike, for example, hgrow in a 
HBox). I've created a special FXML MigPane class to contain the FXML scaffolding, this class has a 
static void setCc(Node, String) method. What determines when such a static method is 
displayed in the inspector's layout tab?

Missing are the helper lines to show the grid, like GridPane has. I'm assuming 
there is some kind of helper class to better embed the layouts in SB?

MigLayout is a very popular layout engine in Swing and SWT (and also gaining 
ground on Android), I think it would be good for SceneBuilder to better support 
MigLayout.

Tom


On 2014-1-3 11:04, Eric Le Ponner wrote:

I guess it's worth trying to drop MigPane JAR file in SB2 library panel and see.
However SB2 makes some assumptions about containers.
So that might not work straight away.

Eric


Le 3 janv. 2014 à 10:10, Tom Eugelink t...@tbee.org a écrit :


Would it be possible to offer MigPane as a Container in SceneBuilder?

Tom