Package org.emftrace.ui.editors.builders.parts

Examples of org.emftrace.ui.editors.builders.parts.ListPartWithButtons


   */
  @Override
  protected void doBuild() {
    super.doBuild();

    final ListPartWithButtons constraintsListPart = new ListPartWithButtons(
        bodyComposite, "constraints", false);
    final Composite composite = constraintsListPart.getChildrenComposite();
    constraintPartMap = new HashMap<Constraint, ConstraintPart>();

    for (Constraint constraint : assignedConstraintsSet
        .getAssignedConstraints()) {
      addPart(constraint, composite, constraintPartMap);
    }


    assignedConstraintsSet
        .addModelElementChangeListener(new ModelElementChangeListener() {

          @Override
          public void onRuntimeExceptionInListener(
              RuntimeException exception) {
          }

          @Override
          public void onChange(final Notification notification) {
            Display.getDefault().syncExec(new Runnable() {
              public void run() {

                if (notification.getEventType() == Notification.REMOVE) {

                  removePart((Constraint) notification
                      .getOldValue());
                  constraintsListPart.pack();

                } else if (notification.getEventType() == Notification.ADD) {
                  addPart((Constraint) notification
                      .getNewValue(), composite,
                      constraintPartMap);
                  constraintsListPart.pack();
                }
              }

           
            });

          }
        });

    constraintsListPart.setNewButtonTooltip("create a new constraint using a wizard");

   
    constraintsListPart  .addNewButtonSelectionListener(new SelectionListener() {

          @Override
          public void widgetSelected(SelectionEvent e) {

            NewConstraintWizard wizard = new NewConstraintWizard(
                assignedConstraintsSet,
                ((Toolbox) assignedConstraintsSet.eContainer()
                    .eContainer().eContainer())
                    .getPropertiesCatalogue());

            WizardDialog dialog = new WizardDialog(parentComposite
                .getShell(), wizard);
            dialog.create();
            dialog.open();
          }

          @Override
          public void widgetDefaultSelected(SelectionEvent e) {
          }
        });
   
    constraintsListPart.setDeleteAllButtonTooltip("delete all assigned constraints");
    constraintsListPart.setDeleteAllButtonImage(PlatformUI.getWorkbench().getSharedImages()
        .getImage(ISharedImages.IMG_TOOL_DELETE));

   
    constraintsListPart.addDeleteButtonSelectionListener( new SelectionListener() {
     
      @Override
      public void widgetSelected(SelectionEvent e) {
       
        int messageBoxStyle = SWT.ICON_WARNING | SWT.YES | SWT.NO ;
View Full Code Here


   * emffit_gui.builders.guis.AbstractFactorTableGUIBuilder#buildEntriesListPart
   * (org.eclipse.swt.widgets.Composite)
   */
  @Override
  protected ListPartWithButtons buildEntriesListPart(Composite composite) {
    return new ListPartWithButtons(composite, "Entries", false);
  }
View Full Code Here

   */
  @Override
  protected ListPartWithButtons buildInfluencingFactorsListPart(
      Composite composite) {

    return new ListPartWithButtons(composite, "influencing factors", true);
  }
View Full Code Here

   * emffit_gui.builders.guis.AbstractIssueCardGUIBuilder#buildRelatedIssuesPart
   * (org.eclipse.swt.widgets.Composite)
   */
  @Override
  protected ListPart buildRelatedIssuesPart(Composite composite) {
    return new ListPartWithButtons(composite, "related issues", true);
  }
View Full Code Here

   * emffit_gui.builders.guis.AbstractIssueCardGUIBuilder#createSolutionPart
   * (org.eclipse.swt.widgets.Composite)
   */
  @Override
  protected ListPartWithButtons createSolutionPart(Composite composite) {
    return new ListPartWithButtons(composite, "solution", false);
  }
View Full Code Here

   * @param composite
   *            the parent Composite
   */
  protected void addEntriesPart(FactorTable ft, Composite composite) {

    ListPartWithButtons part = buildEntriesListPart(composite);
    setEntriesListPartValues(ft, part);

    addFTEntries(ft.getEntries(), part.getChildrenComposite());

    setEntriesPartListeners(ft, part);
    setFactorTableEntriesChangeListeners(ft, part);
  }
View Full Code Here

TOP

Related Classes of org.emftrace.ui.editors.builders.parts.ListPartWithButtons

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.