/** * */ package com.topsun.posclient.application; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; public class TitleBarCreatorCompositeCreator implements ICompositeCreator { public Composite createComposite(Composite parent, int style, int expectedChildrenNum) { Composite compositeToUse = new Composite(parent, SWT.NONE); compositeToUse.setLayoutData(new GridData(GridData.FILL_BOTH)); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = expectedChildrenNum; gridLayout.verticalSpacing = gridLayout.marginHeight = 0; gridLayout.horizontalSpacing = gridLayout.marginWidth = 0; compositeToUse.setLayout(gridLayout); return compositeToUse; } }