Search in sources :

Example 1 with DiscriminatorColumnComposite

use of org.eclipse.jpt.jpa.ui.internal.details.DiscriminatorColumnComposite in project jbosstools-hibernate by jbosstools.

the class HibernateAbstractInheritanceComposite method initializeLayout.

@SuppressWarnings("unchecked")
@Override
protected void initializeLayout(Composite container) {
    int groupBoxMargin = getGroupBoxMargin();
    Composite subPane = addSubPane(container, 0, groupBoxMargin, 0, groupBoxMargin);
    // Strategy widgets
    this.addLabel(subPane, JptJpaUiDetailsMessages.INHERITANCE_COMPOSITE_STRATEGY);
    this.addStrategyCombo(container);
    // addLabeledComposite(
    // subPane,
    // JptUiDetailsMessages.InheritanceComposite_strategy,
    // addStrategyCombo(subPane),
    // JpaHelpContextIds.ENTITY_INHERITANCE_STRATEGY
    // );
    // Discriminator Value widgets
    PropertyValueModel<Boolean> dvEnabled = this.buildDiscriminatorValueEnabledHolder();
    // Combo discriminatorValueCombo = addEditableCombo(
    // subPane,
    // buildDiscriminatorValueListHolder(),
    // buildDiscriminatorValueHolder(),
    // buildDiscriminatorValueConverter(),
    // dvEnabled
    // );
    // Label discriminatorValueLabel = addLabel(
    // subPane,
    // JptUiDetailsMessages.InheritanceComposite_discriminatorValue,
    // dvEnabled
    // );
    this.addLabel(subPane, JptJpaUiDetailsMessages.INHERITANCE_COMPOSITE_DISCRIMINATOR_VALUE, dvEnabled);
    this.addEditableCombo(subPane, buildDiscriminatorValueListHolder(), buildDiscriminatorValueHolder(), buildDiscriminatorValueConverter(), dvEnabled);
    if (getSubject() instanceof HibernateJavaEntity) {
        new HibernateDiscriminatorColumnComposite((Pane<? extends HibernateJavaEntity>) this, container);
    } else {
        new DiscriminatorColumnComposite<Entity>(this, container);
    }
    // Primary Key Join Columns widgets
    addPrimaryKeyJoinColumnsComposite(addSubPane(container, 5));
}
Also used : AbstractEntityComposite(org.eclipse.jpt.jpa.ui.internal.details.AbstractEntityComposite) Composite(org.eclipse.swt.widgets.Composite) DiscriminatorColumnComposite(org.eclipse.jpt.jpa.ui.internal.details.DiscriminatorColumnComposite) DiscriminatorColumnComposite(org.eclipse.jpt.jpa.ui.internal.details.DiscriminatorColumnComposite) HibernateJavaEntity(org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntity)

Aggregations

AbstractEntityComposite (org.eclipse.jpt.jpa.ui.internal.details.AbstractEntityComposite)1 DiscriminatorColumnComposite (org.eclipse.jpt.jpa.ui.internal.details.DiscriminatorColumnComposite)1 Composite (org.eclipse.swt.widgets.Composite)1 HibernateJavaEntity (org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntity)1