Bug 127861 [DataBinding] Mark API provisional
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/layout/GridDataFactory.java
/**
     * Returns a copy of the given GridData 
     * 
     * @param data GridData to copy
     * @return a copy of the argument
     */
    public static GridData copyData(GridData data) {
        GridData newData = new GridData(data.horizontalAlignment, data.verticalAlignment, data.grabExcessHorizontalSpace, data.grabExcessVerticalSpace, data.horizontalSpan,
                data.verticalSpan);
        newData.exclude = data.exclude;
        newData.heightHint = data.heightHint;
        newData.horizontalIndent = data.horizontalIndent;
        newData.minimumHeight = data.minimumHeight;
        newData.minimumWidth = data.minimumWidth;
        newData.verticalIndent = data.verticalIndent;
        newData.widthHint = data.widthHint;
        return newData;
    }
    /**
     * Sets the layout data on the given control. Creates a new GridData instance and
     * assigns it to the control by calling control.setLayoutData.
     *  
     * @param control control whose layout data will be initialized
     */
    public void applyTo(Control control) {
        control.setLayoutData(create());
    }
}