blob: 8dd186679ab2c748b9f685b027ae85834012614e [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Oracle - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.ui.internal.wizards.gen;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.ui.internal.JpaHelpContextIds;
import org.eclipse.jpt.jpa.ui.internal.wizards.gen.DefaultTableGenerationWizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
public class DynamicDefaultTableGenerationWizardPage extends
DefaultTableGenerationWizardPage {
public DynamicDefaultTableGenerationWizardPage(JpaProject jpaProject) {
super(jpaProject);
}
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite = new Composite(parent, SWT.NULL);
int nColumns= 4 ;
GridLayout layout = new GridLayout();
layout.numColumns = nColumns;
composite.setLayout(layout);
this.getHelpSystem().setHelp(composite, JpaHelpContextIds.GENERATE_ENTITIES_WIZARD_CUSTOMIZE_DEFAULT_ENTITY_GENERATION);
defaultTableGenPanel = new DynamicTableGenPanel(composite, 4, true, this);
createDomainJavaClassesPropertiesGroup(composite, 4);
setControl(composite);
this.setPageComplete( true );
}
@Override
protected void createDomainJavaClassesPropertiesGroup(Composite composite, int columns) {
Group parent = new Group( composite, SWT.NONE);
parent.setText( JptJpaEclipseLinkUiEntityGenMessages.GenerateDynamicEntitiesWizard_defaultTablePage_domainJavaClass);
parent.setLayout(new GridLayout( columns, false));
GridData layoutData = new GridData();
layoutData.horizontalSpan = columns;
layoutData.verticalAlignment = SWT.FILL;
layoutData.horizontalAlignment = SWT.FILL;
layoutData.grabExcessHorizontalSpace = true;
layoutData.grabExcessVerticalSpace = false;
parent.setLayoutData(layoutData);
createPackageControls(parent, columns);
}
}