public Control createGrowing(Composite parent)
{
TabFolder tabbedPane = new TabFolder(parent, DOUBLE_BUFFER);
// All tab
MigLayout allLM = new MigLayout("",
"[pref!][grow,fill]",
"[]15[]");
TabItem allTab = createTabPanel(tabbedPane, "All", allLM);
createLabel(allTab, "Fixed", "");
createLabel(allTab, "Gets all extra space", "wrap");
createTextField(allTab, " ", "");
createTextField(allTab, " ", "");
// Half tab
MigLayout halfLM = new MigLayout("",
"[pref!][grow,fill]",
"[]15[]");
TabItem halfTab = createTabPanel(tabbedPane, "Half", halfLM);
createLabel(halfTab, "Fixed", "");
createLabel(halfTab, "Gets half of extra space", "");
createLabel(halfTab, "Gets half of extra space", "wrap");
createTextField(halfTab, " ", "");
createTextField(halfTab, " ", "");
createTextField(halfTab, " ", "");
// Percent 1 tab
MigLayout p1LM = new MigLayout("",
"[pref!][0:0,grow 25,fill][0:0,grow 75,fill]",
"[]15[]");
TabItem p1Tab = createTabPanel(tabbedPane, "Percent 1", p1LM);
createLabel(p1Tab, "Fixed", "");
createLabel(p1Tab, "Gets 25% of extra space", "");
createLabel(p1Tab, "Gets 75% of extra space", "wrap");
createTextField(p1Tab, " ", "");
createTextField(p1Tab, " ", "");
createTextField(p1Tab, " ", "");
// Percent 2 tab
MigLayout p2LM = new MigLayout("",
"[0:0,grow 33,fill][0:0,grow 67,fill]",
"[]15[]");
TabItem p2Tab = createTabPanel(tabbedPane, "Percent 2", p2LM);
createLabel(p2Tab, "Gets 33% of extra space", "");
createLabel(p2Tab, "Gets 67% of extra space", "wrap");
createTextField(p2Tab, " ", "");
createTextField(p2Tab, " ", "");
// Vertical 1 tab
MigLayout v1LM = new MigLayout("flowy",
"[]15[]",
"[][c,pref!][c,grow 25,fill][c,grow 75,fill]");
TabItem v1Tab = createTabPanel(tabbedPane, "Vertical 1", v1LM);
createLabel(v1Tab, "Fixed", "skip");
createLabel(v1Tab, "Gets 25% of extra space", "");
createLabel(v1Tab, "Gets 75% of extra space", "wrap");
createLabel(v1Tab, "new Text(SWT.MULTI | SWT.WRAP | SWT.BORDER)", "");
createTextArea(v1Tab, "", "hmin 4*13");
createTextArea(v1Tab, "", "hmin 4*13");
createTextArea(v1Tab, "", "hmin 4*13");
// Vertical 2 tab
MigLayout v2LM = new MigLayout("flowy",
"[]15[]",
"[][c,grow 33,fill][c,grow 67,fill]");
TabItem v2Tab = createTabPanel(tabbedPane, "Vertical 2", v2LM);
createLabel(v2Tab, "Gets 33% of extra space", "skip");
createLabel(v2Tab, "Gets 67% of extra space", "wrap");