| /******************************************************************************* |
| * Copyright (c) 2007, 2013 Oracle. All rights reserved. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License 2.0, which accompanies this distribution |
| * and is available at https://www.eclipse.org/legal/epl-2.0/. |
| * |
| * Contributors: |
| * Oracle - initial API and implementation |
| ******************************************************************************/ |
| package org.eclipse.jpt.jpa.ui.internal.jpa2.details.java; |
| |
| import org.eclipse.jface.resource.ResourceManager; |
| import org.eclipse.jpt.common.ui.WidgetFactory; |
| import org.eclipse.jpt.common.utility.model.value.PropertyValueModel; |
| import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable; |
| import org.eclipse.jpt.jpa.ui.JptJpaUiMessages; |
| import org.eclipse.jpt.jpa.ui.internal.details.AbstractEmbeddableComposite; |
| import org.eclipse.jpt.jpa.ui.internal.details.AccessTypeComboViewer; |
| import org.eclipse.swt.widgets.Composite; |
| import org.eclipse.swt.widgets.Control; |
| import org.eclipse.ui.forms.widgets.Section; |
| |
| public class JavaEmbeddableComposite2_0 |
| extends AbstractEmbeddableComposite<JavaEmbeddable> |
| { |
| public JavaEmbeddableComposite2_0( |
| PropertyValueModel<? extends JavaEmbeddable> embeddableModel, |
| Composite parentComposite, |
| WidgetFactory widgetFactory, |
| ResourceManager resourceManager) { |
| super(embeddableModel, parentComposite, widgetFactory, resourceManager); |
| } |
| |
| @Override |
| protected Control buildEmbeddableSectionClient(Section embeddableSection) { |
| Composite sectionClient = this.addSubPane(embeddableSection, 2, 0, 0, 0, 0); |
| |
| // Access type widgets |
| this.addLabel(sectionClient, JptJpaUiMessages.ACCESS_TYPE_COMPOSITE_ACCESS); |
| new AccessTypeComboViewer(this, this.buildAccessReferenceModel(), sectionClient); |
| |
| return sectionClient; |
| } |
| } |