Example #1
0
  /** Brand new shiny start edit part. */
  public StartNodeEditPart() {
    // Initialize images for fault and event handler decorations
    this.faultImage = BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_FAULT_INDICATOR);
    org.eclipse.swt.graphics.Rectangle r = faultImage.getBounds();
    this.faultImageWidth = r.width;
    this.faultImageHeight = r.height;

    this.eventImage = BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_EVENT_INDICATOR);
    r = eventImage.getBounds();
    this.eventImageWidth = r.width;
    this.eventImageHeight = r.height;
  }
Example #2
0
  @SuppressWarnings("nls")
  protected void init() {
    super.init();
    setText(Messages.BPELDuplicateAction_Duplicate_1);
    setToolTipText(Messages.BPELDuplicateAction_Duplicate_2);

    setId(ACTION_ID);

    setImageDescriptor(
        BPELUIPlugin.INSTANCE.getImageDescriptor(IBPELUIConstants.ICON_DUPLICATE_16_E));
    setDisabledImageDescriptor(
        BPELUIPlugin.INSTANCE.getImageDescriptor(IBPELUIConstants.ICON_DUPLICATE_16_D));
    setEnabled(false);
  }
Example #3
0
  /**
   * Creates the two pane element selector.
   *
   * @param parent the parent shell.
   * @param elementRenderer the element renderer.
   * @param qualifierRenderer the qualifier renderer.
   */
  public ListAndViewDialog(Shell parent, ILabelProvider elementRenderer) {
    super(parent, elementRenderer);
    setSize(75, 15);
    setAllowDuplicates(true);

    fSettings = BPELUIPlugin.INSTANCE.getDialogSettingsFor(this);
    setDialogBoundsSettings(fSettings, getDialogBoundsStrategy());
  }
Example #4
0
  @Override
  protected IFigure createFigure() {
    // TODO: Shouldn't have to initialize labels in each subclass.
    initializeLabels();
    if (collapsedImage == null) {
      // Create the actual figure for the collapsed edit part
      ILabeledElement element = BPELUtil.adapt(getActivity(), ILabeledElement.class);
      collapsedImage = element.getSmallImage(getActivity());
    }
    this.collapsedImageLabel = new Label(collapsedImage);
    this.collapsedNameLabel = new Label(getLabel());

    // TODO: Shouldn't have to set the decorator in each subclass.
    editPartMarkerDecorator =
        new BPELEditPartMarkerDecorator(
            (EObject) getModel(),
            new CollapsableDecorationLayout(/*collapsedImage.getBounds().width*/ 0));
    editPartMarkerDecorator.addMarkerMotionListener(getMarkerMotionListener());

    this.parentFigure = new Figure();
    AlignedFlowLayout layout = new AlignedFlowLayout();
    layout.setHorizontal(true);
    layout.setHorizontalSpacing(0);
    layout.setVerticalSpacing(0);
    parentFigure.setLayoutManager(layout);

    this.contentFigure = new CollapsableScopeContainerFigure(getModel(), getImage(), getLabel());
    contentFigure.addMouseMotionListener(getMouseMotionListener());
    contentFigure.setEditPart(this);
    contentFigure.setForegroundColor(
        BPELUIPlugin.INSTANCE.getColorRegistry().get(IBPELUIConstants.COLOR_BLACK));
    parentFigure.add(contentFigure);

    // Configure the border and contents based on collapsed state
    if (isCollapsed()) {
      configureCollapsedFigure(contentFigure);
    } else {
      configureExpandedFigure(contentFigure);
    }

    boolean isHorizontal = ModelHelper.isHorizontalLayout(getModel());

    this.auxilaryFigure = new AuxiliaryFigure();
    layout = new AlignedFlowLayout();
    layout.setHorizontal(!isHorizontal);
    auxilaryFigure.setLayoutManager(layout);
    contentFigure.addFigureListener(auxilaryFigure);

    parentFigure.add(auxilaryFigure);

    ScopeBorder border = getScopeBorder();
    border.setShowFault(getFaultHandler() != null);
    border.setShowCompensation(getCompensationHandler() != null);
    border.setShowTermination(getTerminationHandler() != null);
    border.setShowEvent(getEventHandler() != null);

    return editPartMarkerDecorator.createFigure(parentFigure);
  }
 /** @see org.eclipse.bpel.ui.actions.editpart.IEditPartAction#getIcon() */
 public ImageDescriptor getIcon() {
   return BPELUIPlugin.INSTANCE.getImageDescriptor(
       IBPELUIConstants.ICON_ACTION_TERMINATIONHANDLER);
 }
Example #6
0
 public Image getImageIcon() {
   return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_ACTION_CASE);
 }
Example #7
0
 public ImageDescriptor getIcon() {
   return BPELUIPlugin.INSTANCE.getImageDescriptor(IBPELUIConstants.ICON_ACTION_CASE);
 }
 public Image getIconImg() {
   return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_ACTION_EVENTHANDLER);
 }
 public Image getLargeImage(Object object) {
   return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_OTHERWISE_32);
 }
 public Image getSmallImage(Object object) {
   return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_OTHERWISE_16);
 }
Example #11
0
 public ImageDescriptor getIcon() {
   return BPELUIPlugin.INSTANCE.getImageDescriptor(IBPELUIConstants.ICON_VARIABLE_16);
 }