MigLayout

17 views
Skip to first unread message

Raul_Arabaolaza

unread,
Aug 13, 2010, 8:10:26 AM8/13/10
to SDL/Swing
Hi,

Continuing in my line to ask for things :) May i ask MigLayout
support?? It´s easy to add, it´s the best layout manager out there and
as a dependency is a simple jar.

You only need to add this lines to ComponentBuilder class:

At the end of the configurelayout method:

else if (layoutString.startsWith("mig")) {
cont.setLayout(new MigLayout());
} else {
throw new IllegalArgumentException(layoutString
+ " is not a valid layout");
}

And at the end of the addToParent method:

} else if (layout instanceof MigLayout){
parent.add(child, constraint.toString());
}

Miglayout Constraints are strings like spring layout, i would like to
submit a patch but i don´t have access to the scm.

Regards, Raúl

Dan Leuck

unread,
Aug 13, 2010, 9:53:21 AM8/13/10
to SDL/Swing
Hi Raúl,

> Continuing in my line to ask for things :)

No problem. We really appreciate your feedback!

> May i ask MigLayout
> support?? It´s easy to add, it´s the best layout manager out there and
> as a dependency is a simple jar.

Perhaps instead of specifically building in MigLayout, we should add
the ability to plug-in new layout managers via the API.

> Miglayout Constraints are strings like spring layout

I'm familiar with Mig, and I think its a nice layout manager, but you
can easily achieve the same results with the SDL/Swing layouts such as
LinearLayout. If you describe the layout you want to achieve, I'm
happy to provide the SDL/Swing example code to demonstrate how its
done.

>, i would like to
> submit a patch but i don´t have access to the scm.

Next week we will get our house in order and start offering SVN access
to developers like you who have shown they understand the framework
and can make quality contributions.

Best,
Dan

Raúl Arabaolaza

unread,
Aug 13, 2010, 11:50:27 AM8/13/10
to sdls...@googlegroups.com
Hi Dan,

The ability to plug any layout manager is a most wellcome feature :)

The layout i want to create is the one shown in the attached image,  i´m totally unfamiliar with LinearLayout and the core layouts like spring allways looks too complicated to me to like them. Some examples about LinerLayout would be more than appreciated. In the image the entity buttons are displayed vertically while the entity table is displayed inside a jscrollpane that fills most of the space, also there´re a jlabel and a jxbusy label on the top down of the frame, the jxbusy label is left aligned. To acomplish this i´ve used nested panels:

frame defaultCloseOperation=3 locationRelativeTo=null title="Details" {
menus{
"Create" {
"Persona" do="createPersona"
"Coche" do="createCoche"
}
}
form ID="Scaffold" {
pane  {
vpane loc="east" ID="listContainer" preferredSize="640,480"{
}
ref "menu" loc="west"
pane ID="notification_pane" loc="south" preferredSize="640,35"{
"Generated by Spring Roo using SDL/Swing" border=5 loc="west" 
busy ID="busyFlag" horizontalAlignment=4 visible=false preferredSize="25,25" loc="east"
}
     }  
}
}

SVN access would be superb too :) 

Thanks, Raúl 



2010/8/13 Dan Leuck <dle...@gmail.com>
layout.jpg
Reply all
Reply to author
Forward
0 new messages