public Control createGrouping(Composite parent)
{
TabFolder tabbedPane = new TabFolder(parent, DOUBLE_BUFFER);
// Ungrouped
MigLayout ugM = new MigLayout("", "[]push[][][]", "");
TabItem ugPanel = createTabPanel(tabbedPane, "Ungrouped", ugM);
createButton(ugPanel, "Help", "");
createButton(ugPanel, "< Back", "gap push");
createButton(ugPanel, "Forward >", "");
createButton(ugPanel, "Apply", "gap unrel");
createButton(ugPanel, "Cancel", "gap unrel");
// Grouped Components
MigLayout gM = new MigLayout("nogrid, fillx");
TabItem gPanel = createTabPanel(tabbedPane, "Grouped (Components)", gM);
createButton(gPanel, "Help", "sg");
createButton(gPanel, "< Back", "sg, gap push");
createButton(gPanel, "Forward >", "sg");
createButton(gPanel, "Apply", "sg, gap unrel");
createButton(gPanel, "Cancel", "sg, gap unrel");
// Grouped Columns
MigLayout gcM = new MigLayout("", "[sg,fill]push[sg,fill][sg,fill]unrel[sg,fill]unrel[sg,fill]", "");
TabItem gcPanel = createTabPanel(tabbedPane, "Grouped (Columns)", gcM);
createButton(gcPanel, "Help", "");
createButton(gcPanel, "< Back", "");
createButton(gcPanel, "Forward >", "");
createButton(gcPanel, "Apply", "");
createButton(gcPanel, "Cancel", "");
// Ungrouped Rows
MigLayout ugrM = new MigLayout(); // no "sg" is the only difference to next panel
TabItem ugrPanel = createTabPanel(tabbedPane, "Ungrouped Rows", ugrM);
createLabel(ugrPanel, "File Number:", "");
createTextField(ugrPanel, "30 ", "wrap");
createLabel(ugrPanel, "BL/MBL number:", "");
createTextField(ugrPanel, "7 ", "split 2");
createTextField(ugrPanel, "7 ", "wrap");
createLabel(ugrPanel, "Entry Date:", "");
createTextField(ugrPanel, "7 ", "wrap");
createLabel(ugrPanel, "RFQ Number:", "");
createTextField(ugrPanel, "30 ", "wrap");
createLabel(ugrPanel, "Goods:", "");
createCheck(ugrPanel, "Dangerous", "wrap");
createLabel(ugrPanel, "Shipper:", "");
createTextField(ugrPanel, "30 ", "wrap");
createLabel(ugrPanel, "Customer:", "");
createTextField(ugrPanel, "", "split 2,growx");
createButton(ugrPanel, "...", "width 60px:pref,wrap");
createLabel(ugrPanel, "Port of Loading:", "");
createTextField(ugrPanel, "30 ", "wrap");
createLabel(ugrPanel, "Destination:", "");
createTextField(ugrPanel, "30 ", "wrap");
// Grouped Rows
MigLayout grM = new MigLayout("", "[]", "[sg]"); // "sg" is the only difference to previous panel
TabItem grPanel = createTabPanel(tabbedPane, "Grouped Rows", grM);
createLabel(grPanel, "File Number:", "");
createTextField(grPanel, "30 ","wrap");
createLabel(grPanel, "BL/MBL number:", "");
createTextField(grPanel, "7 ","split 2");