示例#1
0
    /** @generated */
    private void createContents() {

      fFigureStateVariableLabelFigure = new WrappingLabel();

      fFigureStateVariableLabelFigure.setText("StateVariable");
      fFigureStateVariableLabelFigure.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(10000), getMapMode().DPtoLP(50)));

      this.add(fFigureStateVariableLabelFigure);

      fStateVariableInStateConstraintsCompartmentFigure = new RectangleFigure();

      fStateVariableInStateConstraintsCompartmentFigure.setOutline(false);

      this.add(fStateVariableInStateConstraintsCompartmentFigure);

      fStateVariableOutStateConstraintsCompartmentFigure = new RectangleFigure();

      fStateVariableOutStateConstraintsCompartmentFigure.setOutline(false);

      this.add(fStateVariableOutStateConstraintsCompartmentFigure);

      fStateVariableStateUpdatesCompartmentFigure = new RectangleFigure();

      fStateVariableStateUpdatesCompartmentFigure.setOutline(false);

      this.add(fStateVariableStateUpdatesCompartmentFigure);

      fStateVariableInfluencedByCompartmentFigure = new RectangleFigure();

      fStateVariableInfluencedByCompartmentFigure.setOutline(false);

      this.add(fStateVariableInfluencedByCompartmentFigure);
    }
示例#2
0
 @Override
 protected IFigure createContentPane() {
   RectangleFigure rectangle = new RectangleFigure();
   rectangle.setForegroundColor(ColorConstants.lightGray);
   rectangle.setFill(true);
   return rectangle;
 }
 /**
  * Sets the name.
  *
  * @param name the new name
  */
 @Override
 public void setName(String name) {
   text.setText(name);
   textFigure.setSize(width, 10);
   text.setSize(width, 10);
   text.setLocation(getLocation());
   textFigure.setLocation(getLocation());
 }
 /**
  * Creates the figure used for feedback.
  *
  * @return the new feedback figure
  */
 protected IFigure createDragSourceFeedbackFigure() {
   // Use a ghost rectangle for feedback
   RectangleFigure r = new RectangleFigure();
   FigureUtilities.makeGhostShape(r);
   r.setLineStyle(Graphics.LINE_DOT);
   r.setForegroundColor(ColorConstants.white);
   r.setBounds(getInitialFeedbackBounds());
   addFeedback(r);
   return r;
 }
 /** @generated */
 protected IFigure createSelectionFeedbackFigure() {
   if (getHostFigure() instanceof Label) {
     Label feedbackFigure = new Label();
     feedbackFigure.setOpaque(true);
     feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
     feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
     return feedbackFigure;
   } else {
     RectangleFigure feedbackFigure = new RectangleFigure();
     feedbackFigure.setFill(false);
     return feedbackFigure;
   }
 }
示例#6
0
    /** @generated */
    private void createContents() {

      fFigureIfFigureNameLabel = new WrappingLabel();
      fFigureIfFigureNameLabel.setText("");

      this.add(fFigureIfFigureNameLabel);

      fFigureIfFigureContainer = new RectangleFigure();
      fFigureIfFigureContainer.setLineWidth(1);

      this.add(fFigureIfFigureContainer);
      fFigureIfFigureContainer.setLayoutManager(new StackLayout());
    }
示例#7
0
  private void createContents() {
    nameLabel = new WrappingLabel();
    GridData data = GridDataFactory.fillDefaults().grab(true, false).getData();
    nameLabel.setTextPlacement(PositionConstants.WEST);
    this.add(nameLabel, data);

    /** Compartment container * */
    compartmentPane = new RectangleFigure();
    compartmentPane.setOutline(false);
    compartmentPane.setLayoutManager(new StackLayout());
    compartmentPane.setFill(false);
    this.add(compartmentPane, GridDataFactory.fillDefaults().grab(true, true).getData());
  }
    /** @generated */
    private void createContents() {

      fFigureSequenceFigureNameLabel = new WrappingLabel();
      fFigureSequenceFigureNameLabel.setText("");

      this.add(fFigureSequenceFigureNameLabel);

      fFigureSequenceFigureCompartment = new RectangleFigure();
      fFigureSequenceFigureCompartment.setLineWidth(1);

      this.add(fFigureSequenceFigureCompartment);
      fFigureSequenceFigureCompartment.setLayoutManager(new StackLayout());
    }
    /** @generated */
    private void createContents() {

      fFigureSplitJoinLabelFigure = new WrappingLabel();
      fFigureSplitJoinLabelFigure.setText("SplitJoin");
      fFigureSplitJoinLabelFigure.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(10000), getMapMode().DPtoLP(50)));

      this.add(fFigureSplitJoinLabelFigure);

      fSplitJoinComponentsCompartmentFigure = new RectangleFigure();
      fSplitJoinComponentsCompartmentFigure.setOutline(false);
      fSplitJoinComponentsCompartmentFigure.setLineWidth(1);

      this.add(fSplitJoinComponentsCompartmentFigure);
    }
示例#10
0
 protected void updateChildrenBounds() {
   roiRectFigure.setBounds(roiGeoBounds);
   for (ResizeHandler handler : resizeHandlers) {
     handler.setBounds(handler.getHandlerBoundsCalulator().calcBoundsFromROIBounds(roiGeoBounds));
   }
   if (roiInfoProvider != null) repaint();
 }
 private void createResizeHandle(
     LifelineEditPart host, List<Handle> list, RectangleFigure fig, int location) {
   Locator locator = new RelativeHandleLocator(fig, location);
   Cursor cursor = Cursors.getDirectionalCursor(location, fig.isMirrored());
   ResizeHandle westResizer = new ResizeHandle((GraphicalEditPart) host, locator, cursor);
   ResizeTracker resizeTracker = new ResizeTracker(host, location);
   westResizer.setDragTracker(resizeTracker);
   list.add(westResizer);
 }
示例#12
0
 @Override
 public boolean containsPoint(int x, int y) {
   x = x - getBounds().x;
   y = y - getBounds().y;
   boolean contain = false;
   for (ResizeHandler handler : resizeHandlers) {
     contain = contain || handler.containsPoint(x, y);
   }
   return contain || roiRectFigure.containsPoint(x, y);
 }
    @Override
    public void mousePressed(MouseEvent me) {

      EditPart root = editPart;
      while (root.getParent() instanceof BlockExtendedEditPart) {
        root = root.getParent();
      }
      // getting compartment holder figure
      BlockExtendedEditPart blockExtendedEditPart = (BlockExtendedEditPart) root;
      BlockFigure primaryShape = blockExtendedEditPart.getPrimaryShape();
      RectangleFigure rectangleFigure = (RectangleFigure) primaryShape.getChildren().get(1);

      // based on visibility status, hide or show the compartment
      if (rectangleFigure.isVisible()) {
        hide(rectangleFigure, blockExtendedEditPart);
      } else {
        show(rectangleFigure, blockExtendedEditPart);
      }
    }
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.gef.editpolicies.LayoutEditPolicy#createSizeOnDropFeedback
   * (org.eclipse.gef.requests.CreateRequest)
   */
  protected IFigure createSizeOnDropFeedback(CreateRequest createRequest) {
    IFigure figure;

    if (createRequest.getNewObject() instanceof Circuit) figure = new CircuitFeedbackFigure();
    else if (createRequest.getNewObject() instanceof LogicFlowContainer)
      figure = new LogicFlowFeedbackFigure();
    else if (createRequest.getNewObject() instanceof LogicLabel) figure = new LabelFeedbackFigure();
    else {
      figure = new RectangleFigure();
      ((RectangleFigure) figure).setXOR(true);
      ((RectangleFigure) figure).setFill(true);
      figure.setBackgroundColor(LogicColorConstants.ghostFillColor);
      figure.setForegroundColor(ColorConstants.white);
    }

    addFeedback(figure);

    return figure;
  }
  public DashboardFigure() {
    imgReg = Activator.getDefault().getImageRegistry();
    add(
        logoFigure =
            new ImageFigure() {

              @Override
              protected void paintFigure(Graphics graphics) {
                if (getImage() != null) {
                  graphics.drawImage(
                      getImage(), new Rectangle(getImage().getBounds()), getBounds());
                }
              }
            });
    Image logoImage = imgReg.get(Activator.IMG_MDA_ID);
    if (logoImage != null) {
      logoFigure.setImage(logoImage);
    }
    initFigure.setSize(20, 20);
    initFigure.setBackgroundColor(DASHBOARD_FG);
    add(initFigure);
    add(methodoFigure = createMethodologyFigure("Methodology"));
    add(processFigure = createProcessFigure("Process"));
    endFigure.setSize(20, 20);
    endFigure.setBackgroundColor(DASHBOARD_FG);
    add(endFigure);
    add(init2methoFlow = createFlowFigure(true));
    add(metho2processFlow = createFlowFigure(true));
    add(process2endFlow = createFlowFigure(true));
    add(statusFigure = new Figure());
    statusFigure.setFont(JFaceResources.getBannerFont());
    ToolbarLayout statusLayout = new ToolbarLayout();
    statusLayout.setStretchMinorAxis(false);
    statusFigure.setLayoutManager(statusLayout);
    statusFigure.add(new Label());
    statusFigure.add(new Label());
    setLayoutManager(new DashboardLayout());
    setBorder(new MarginBorder(10));
    setBackgroundColor(DASHBOARD_BG);
    setForegroundColor(DASHBOARD_FG);
  }
 /**
  * Show the compartment, adjust height according to the blockd procedures
  *
  * @param rectangleFigure
  * @param blockExtendedEditPart
  */
 protected void show(
     RectangleFigure rectangleFigure, BlockExtendedEditPart blockExtendedEditPart) {
   rectangleFigure.setVisible(true);
   Block block = (Block) (((View) blockExtendedEditPart.getModel()).getElement());
   if (block.getProcedures().size() <= 1) {
     BoundsRefreshment.refreshBounds(blockExtendedEditPart, null, 89);
   } else {
     BoundsRefreshment.refreshBounds(
         blockExtendedEditPart, null, 89 + ((block.getProcedures().size() - 1) * 45));
   }
   blockExtendedEditPart.putInnerMargin();
 }
 @Override
 protected void fillShape(Graphics graphics) {
   if (shouldUseGradient()) {
     graphics.pushState();
     graphics.setBackgroundColor(DiagramColorConstants.white);
     graphics.setForegroundColor(getBackgroundColor());
     graphics.fillGradient(getBounds(), true);
     graphics.popState();
   } else {
     super.fillShape(graphics);
   }
 }
示例#18
0
  /**
   * Constructor of ROI figure.
   *
   * @param name name of the ROI. It must be unique for this graph.
   * @param color color of the ROI.
   * @param roiListener listener on ROI updates. Can be null.
   * @param roiInfoProvider provides information for the ROI. Can be null.
   */
  public ROIFigure(
      IntensityGraphFigure intensityGraphFigure,
      String name,
      Color color,
      IROIListener roiListener,
      IROIInfoProvider roiInfoProvider) {
    this.intensityGraphFigure = intensityGraphFigure;
    this.name = name;
    this.roiListener = roiListener;
    this.roiInfoProvider = roiInfoProvider;
    setToolTip(new Label(name));
    setBackgroundColor(ColorConstants.white);
    setForegroundColor(ColorConstants.black);
    roiRectFigure =
        new RectangleFigure() {
          public boolean containsPoint(int x, int y) {
            if (!super.containsPoint(x, y)) return false;
            return !Rectangle.SINGLETON.setBounds(getBounds()).shrink(3, 3).contains(x, y);
          }
        };
    roiRectFigure.setCursor(Cursors.SIZEALL);
    roiRectFigure.setFill(false);
    roiRectFigure.setOutline(true);
    roiRectFigure.setForegroundColor(color);
    ROIRectDragger roiRectDragger = new ROIRectDragger();
    roiRectFigure.addMouseListener(roiRectDragger);
    roiRectFigure.addMouseMotionListener(roiRectDragger);
    setFocusTraversable(true);
    setRequestFocusEnabled(true);
    resizeHandlers = new ResizeHandler[HANDLERS_COUNT];
    add(roiRectFigure);
    for (int i = 0; i < HANDLERS_COUNT; i++) {
      resizeHandlers[i] = new ResizeHandler(i);
      add(resizeHandlers[i]);
    }

    addFocusListener(
        new FocusListener() {
          public void focusGained(FocusEvent fe) {
            for (Figure handler : resizeHandlers) {
              handler.setVisible(true);
            }
          }

          public void focusLost(FocusEvent fe) {
            for (Figure handler : resizeHandlers) {
              handler.setVisible(false);
            }
          }
        });
    intensityGraphFigure.addCroppedDataSizeListener(
        new ICroppedDataSizeListener() {

          public void croppedDataSizeChanged(int croppedDataWidth, int croppedDataHeight) {
            updateROIGeoBounds();
            updateChildrenBounds();
          }
        });
  }
  /**
   * Instantiates a new node figure.
   *
   * @param name the name
   * @param width the weight
   */
  public SimpleNodeFigure(Node node, int width, MouseListener mouseListener) {
    super();

    this.node = node;

    LineBorder b = new LineBorder();
    b.setColor(NodeUtil.FG_COLOR);
    setBorder(b);

    textFigure = new RectangleFigure();
    text = new Label(getNodeName());
    text.setForegroundColor(NodeUtil.FG_COLOR_DARK);

    setSize(width, 10);

    textFigure.add(text);

    hideButton = new RectangleFigure();

    hideSymbol = new Label(getSymbol());
    hideSymbol.setSize(10, 10);
    hideSymbol.setTextAlignment(PositionConstants.CENTER);

    hideSymbol.setFont(hideButtonFont);
    hideSymbol.setForegroundColor(NodeUtil.FG_COLOR_DARK);
    hideButton.add(hideSymbol);
    hideButton.setBackgroundColor(exitClor);
    hideButton.addMouseListener(mouseListener);
    hideButton.addMouseMotionListener(
        new MouseMotionListener() {

          @Override
          public void mouseMoved(MouseEvent me) {}

          @Override
          public void mouseHover(MouseEvent me) {}

          @Override
          public void mouseExited(MouseEvent me) {
            hideButton.setBackgroundColor(exitClor);
          }

          @Override
          public void mouseEntered(MouseEvent me) {
            hideButton.setBackgroundColor(entredClor);
          }

          @Override
          public void mouseDragged(MouseEvent me) {}
        });
    hideButton.setSize(10, 10);

    setLayoutManager(new XYLayout());

    add(textFigure);
  }
示例#20
0
    /** @generated */
    private void createContents() {

      fFigureFormNameFigure = new WrappingLabel();

      fFigureFormNameFigure.setText("<...>");

      this.add(fFigureFormNameFigure, BorderLayout.TOP);

      fFigureFormElementsCompartmentFigure = new RectangleFigure();

      fFigureFormElementsCompartmentFigure.setBorder(
          new LineBorder(FFIGUREFORMELEMENTSCOMPARTMENTFIGURE_BORDER, getMapMode().DPtoLP(1)));

      this.add(fFigureFormElementsCompartmentFigure, BorderLayout.CENTER);
    }
示例#21
0
    /** @generated */
    private void createContents() {

      fFigureDeploymentSetLabelFigure = new WrappingLabel();

      fFigureDeploymentSetLabelFigure.setText("DeploymentSet");
      fFigureDeploymentSetLabelFigure.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(10000), getMapMode().DPtoLP(50)));

      this.add(fFigureDeploymentSetLabelFigure);

      fDeploymentSetDeploymentsCompartmentFigure = new RectangleFigure();

      fDeploymentSetDeploymentsCompartmentFigure.setOutline(false);

      this.add(fDeploymentSetDeploymentsCompartmentFigure);
    }
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.draw2d.Figure#repaint()
   */
  @Override
  public void repaint() {
    int x = getLocation().x;
    int y = getLocation().y;

    if (collapsing) {
      width = Constants.SIZE_16;
      height = Constants.SIZE_18;
      getBounds().height = height;
      getBounds().width = width;
    } else {

      if (hideButton != null) {

        if (hide) {
          super.setSize(width, 18);
        } else {
          super.setSize(width, height);
        }
        textFigure.setSize(width, 10);
        text.setSize(width, 15);
        text.setLocation(new Point(x, y));

        if (getChildren().size() > 1) {
          if (!textFigure.getChildren().contains(hideButton)) {
            textFigure.add(hideButton);
          }
          hideButton.setLocation(new Point(x + width - 11, y + 1));
        } else {
          if (textFigure.getChildren().contains(hideButton)) {
            textFigure.remove(hideButton);
          }
        }
      }

      for (int i = 0; i < getChildren().size(); i++) {
        IFigure figure = (IFigure) getChildren().get(i);

        if (figure == textFigure || hide) {
          figure.setSize(width, 16);
          figure.setLocation(new Point(x, y));
        } else {
          figure.setSize(width - 5, 15);
          figure.setLocation(new Point(x + 5, y + 16 + 15 * i));
        }
      }
    }

    super.repaint();
  }
示例#23
0
    /** @generated */
    private void createContents() {

      WrappingLabel eventFigureTitleLabel0 = new WrappingLabel();
      eventFigureTitleLabel0.setText("Event");

      GridData constraintEventFigureTitleLabel0 = new GridData();
      constraintEventFigureTitleLabel0.verticalAlignment = GridData.CENTER;
      constraintEventFigureTitleLabel0.horizontalAlignment = GridData.CENTER;
      constraintEventFigureTitleLabel0.horizontalIndent = 0;
      constraintEventFigureTitleLabel0.horizontalSpan = 1;
      constraintEventFigureTitleLabel0.verticalSpan = 1;
      constraintEventFigureTitleLabel0.grabExcessHorizontalSpace = false;
      constraintEventFigureTitleLabel0.grabExcessVerticalSpace = false;
      this.add(eventFigureTitleLabel0, constraintEventFigureTitleLabel0);

      fFigureEventFigureTimestampLabel = new WrappingLabel();
      fFigureEventFigureTimestampLabel.setText("");

      GridData constraintFFigureEventFigureTimestampLabel = new GridData();
      constraintFFigureEventFigureTimestampLabel.verticalAlignment = GridData.CENTER;
      constraintFFigureEventFigureTimestampLabel.horizontalAlignment = GridData.CENTER;
      constraintFFigureEventFigureTimestampLabel.horizontalIndent = 0;
      constraintFFigureEventFigureTimestampLabel.horizontalSpan = 1;
      constraintFFigureEventFigureTimestampLabel.verticalSpan = 1;
      constraintFFigureEventFigureTimestampLabel.grabExcessHorizontalSpace = false;
      constraintFFigureEventFigureTimestampLabel.grabExcessVerticalSpace = false;
      this.add(fFigureEventFigureTimestampLabel, constraintFFigureEventFigureTimestampLabel);

      fFigureEventFigureCompartmentRectangle = new RectangleFigure();
      fFigureEventFigureCompartmentRectangle.setLineWidth(1);

      GridData constraintFFigureEventFigureCompartmentRectangle = new GridData();
      constraintFFigureEventFigureCompartmentRectangle.verticalAlignment = GridData.FILL;
      constraintFFigureEventFigureCompartmentRectangle.horizontalAlignment = GridData.FILL;
      constraintFFigureEventFigureCompartmentRectangle.horizontalIndent = 0;
      constraintFFigureEventFigureCompartmentRectangle.horizontalSpan = 1;
      constraintFFigureEventFigureCompartmentRectangle.verticalSpan = 1;
      constraintFFigureEventFigureCompartmentRectangle.grabExcessHorizontalSpace = true;
      constraintFFigureEventFigureCompartmentRectangle.grabExcessVerticalSpace = true;
      this.add(
          fFigureEventFigureCompartmentRectangle, constraintFFigureEventFigureCompartmentRectangle);
    }
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
   */
  @Override
  protected IFigure createFigure() {
    RectangleFigure fig = new RectangleFigure();

    counterLabel = new Label(Integer.toString(getCastedModel().getCounter()));

    fig.setLayoutManager(new XYLayout());

    fig.setFont(SWTResourceManager.getFont("Sans", 13, SWT.BOLD));
    fig.setBackgroundColor(ColorConstants.lightGray);
    fig.setOpaque(true);
    fig.setOutline(false);

    fig.add(counterLabel, new Rectangle(17, 10, 30, 30));
    fig.add(new Label("x"), new Rectangle(0, 9, 30, 30));

    return fig;
  }
示例#25
0
    /** @generated */
    private void createContents() {

      fFigureMAVOClassLabelFigure = new WrappingLabel();

      fFigureMAVOClassLabelFigure.setText("");
      fFigureMAVOClassLabelFigure.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(10000), getMapMode().DPtoLP(50)));

      this.add(fFigureMAVOClassLabelFigure);

      fFigureClassLabelFigure = new WrappingLabel();

      fFigureClassLabelFigure.setText("Class");
      fFigureClassLabelFigure.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(10000), getMapMode().DPtoLP(50)));

      this.add(fFigureClassLabelFigure);

      fClassOperationsCompartmentFigure = new RectangleFigure();

      fClassOperationsCompartmentFigure.setOutline(false);

      this.add(fClassOperationsCompartmentFigure);
    }
    /** @generated NOT */
    private void createContents() {

      fFigureSceneTopicFigure = new WrappingLabel();
      fFigureSceneTopicFigure.setText("Untitled Scene");

      fFigureSceneTopicFigure.setFont(FFIGURESCENETOPICFIGURE_FONT);

      GridData constraintFFigureSceneTopicFigure = new GridData();
      constraintFFigureSceneTopicFigure.verticalAlignment = GridData.BEGINNING;
      constraintFFigureSceneTopicFigure.horizontalAlignment = GridData.CENTER;
      constraintFFigureSceneTopicFigure.horizontalIndent = 0;
      constraintFFigureSceneTopicFigure.horizontalSpan = 1;
      constraintFFigureSceneTopicFigure.verticalSpan = 1;
      constraintFFigureSceneTopicFigure.grabExcessHorizontalSpace = true;
      constraintFFigureSceneTopicFigure.grabExcessVerticalSpace = false;
      this.add(fFigureSceneTopicFigure, constraintFFigureSceneTopicFigure);

      RectangleFigure dialogueRectangle0 = new RectangleFigure();
      dialogueRectangle0.setFill(false);
      dialogueRectangle0.setOutline(false);
      dialogueRectangle0.setLineWidth(1);

      GridData constraintDialogueRectangle0 = new GridData();
      constraintDialogueRectangle0.verticalAlignment = GridData.BEGINNING;
      constraintDialogueRectangle0.horizontalAlignment = GridData.FILL;
      constraintDialogueRectangle0.horizontalIndent = 0;
      constraintDialogueRectangle0.horizontalSpan = 0;
      constraintDialogueRectangle0.verticalSpan = 0;
      constraintDialogueRectangle0.grabExcessHorizontalSpace = true;
      constraintDialogueRectangle0.grabExcessVerticalSpace = true;
      this.add(dialogueRectangle0, constraintDialogueRectangle0);

      GridLayout layoutDialogueRectangle0 = new GridLayout();
      layoutDialogueRectangle0.numColumns = 1;
      layoutDialogueRectangle0.makeColumnsEqualWidth = true;
      dialogueRectangle0.setLayoutManager(layoutDialogueRectangle0);

      RectangleFigure line1 = new RectangleFigure();
      // line1.setSize(400, 1);
      line1.setFill(false);
      line1.setLineWidth(2);
      line1.setForegroundColor(ColorConstants.black);
      line1.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(1)));

      GridData constraintLine1 = new GridData();
      constraintLine1.verticalAlignment = GridData.BEGINNING;
      constraintLine1.horizontalAlignment = GridData.FILL;
      constraintLine1.horizontalIndent = 0;
      constraintLine1.horizontalSpan = 0;
      constraintLine1.verticalSpan = 0;
      constraintLine1.grabExcessHorizontalSpace = true;
      constraintLine1.grabExcessVerticalSpace = false;
      dialogueRectangle0.add(line1, constraintLine1);

      fFigureDialogueFigure = new WrappingLabel();
      fFigureDialogueFigure.setTextWrap(true);
      fFigureDialogueFigure.setText("Click to edit...");
      fFigureDialogueFigure.setPreferredSize(
          new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(100)));

      GridData constraintFFigureDialogueFigure = new GridData();
      constraintFFigureDialogueFigure.verticalAlignment = GridData.FILL;
      constraintFFigureDialogueFigure.horizontalAlignment = GridData.BEGINNING;
      constraintFFigureDialogueFigure.horizontalIndent = 0;
      constraintFFigureDialogueFigure.horizontalSpan = 1;
      constraintFFigureDialogueFigure.verticalSpan = 1;
      constraintFFigureDialogueFigure.grabExcessHorizontalSpace = true;
      constraintFFigureDialogueFigure.grabExcessVerticalSpace = true;
      dialogueRectangle0.add(fFigureDialogueFigure, constraintFFigureDialogueFigure);

      fFigureSketchesCompartmentFigure = new org.eclipse.draw2d.RectangleFigure();
      fFigureSketchesCompartmentFigure.setLineWidth(1);
      fFigureSketchesCompartmentFigure.setForegroundColor(
          org.eclipse.draw2d.ColorConstants.lightGray);

      org.eclipse.draw2d.GridData constraintFFigureSketchesCompartmentFigure =
          new org.eclipse.draw2d.GridData();
      // constraintFFigureSketchesCompartmentFigure.verticalAlignment =
      // org.eclipse.draw2d.GridData.FILL;
      constraintFFigureSketchesCompartmentFigure.horizontalAlignment =
          org.eclipse.draw2d.GridData.FILL;
      constraintFFigureSketchesCompartmentFigure.horizontalIndent = 0;
      constraintFFigureSketchesCompartmentFigure.horizontalSpan = 1;
      constraintFFigureSketchesCompartmentFigure.verticalSpan = 1;
      constraintFFigureSketchesCompartmentFigure.grabExcessHorizontalSpace = true;
      // constraintFFigureSketchesCompartmentFigure.grabExcessVerticalSpace = true;
      this.add(fFigureSketchesCompartmentFigure, constraintFFigureSketchesCompartmentFigure);
    }
 /**
  * Hide the compartment, decrease the height to only show title of block
  *
  * @param rectangleFigure
  * @param blockExtendedEditPart
  */
 protected void hide(
     RectangleFigure rectangleFigure, BlockExtendedEditPart blockExtendedEditPart) {
   rectangleFigure.setVisible(false);
   BoundsRefreshment.refreshBounds(blockExtendedEditPart, null, 35);
   blockExtendedEditPart.clearBottomMargin();
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * org.eclipse.draw2d.Figure#setLocation(org.eclipse.draw2d.geometry.Point)
  */
 @Override
 public void setLocation(Point p) {
   super.setLocation(p);
   textFigure.setLocation(p);
   text.setLocation(p);
 }
示例#29
0
    /** @generated */
    private void createContents() {

      RectangleFigure innerRectangle0 = new RectangleFigure();

      innerRectangle0.setFill(false);
      innerRectangle0.setOutline(false);

      this.add(innerRectangle0);

      GridLayout layoutInnerRectangle0 = new GridLayout();
      layoutInnerRectangle0.numColumns = 4;
      layoutInnerRectangle0.makeColumnsEqualWidth = false;
      layoutInnerRectangle0.horizontalSpacing = 0;
      layoutInnerRectangle0.verticalSpacing = 0;
      layoutInnerRectangle0.marginWidth = 3;
      layoutInnerRectangle0.marginHeight = 0;
      innerRectangle0.setLayoutManager(layoutInnerRectangle0);

      fFigureMethodNameFigure = new WrappingLabel();

      fFigureMethodNameFigure.setText("");

      fFigureMethodNameFigure.setFont(FFIGUREMETHODNAMEFIGURE_FONT);

      GridData constraintFFigureMethodNameFigure = new GridData();
      constraintFFigureMethodNameFigure.verticalAlignment = GridData.CENTER;
      constraintFFigureMethodNameFigure.horizontalAlignment = GridData.BEGINNING;
      constraintFFigureMethodNameFigure.horizontalIndent = 0;
      constraintFFigureMethodNameFigure.horizontalSpan = 1;
      constraintFFigureMethodNameFigure.verticalSpan = 1;
      constraintFFigureMethodNameFigure.grabExcessHorizontalSpace = false;
      constraintFFigureMethodNameFigure.grabExcessVerticalSpace = false;
      innerRectangle0.add(fFigureMethodNameFigure, constraintFFigureMethodNameFigure);

      fFigureMethodPotencyFigure = new WrappingLabel();

      fFigureMethodPotencyFigure.setText("");

      fFigureMethodPotencyFigure.setFont(FFIGUREMETHODPOTENCYFIGURE_FONT);

      fFigureMethodPotencyFigure.setBorder(
          new MarginBorder(
              getMapMode().DPtoLP(0),
              getMapMode().DPtoLP(0),
              getMapMode().DPtoLP(10),
              getMapMode().DPtoLP(0)));

      GridData constraintFFigureMethodPotencyFigure = new GridData();
      constraintFFigureMethodPotencyFigure.verticalAlignment = GridData.CENTER;
      constraintFFigureMethodPotencyFigure.horizontalAlignment = GridData.BEGINNING;
      constraintFFigureMethodPotencyFigure.horizontalIndent = 0;
      constraintFFigureMethodPotencyFigure.horizontalSpan = 1;
      constraintFFigureMethodPotencyFigure.verticalSpan = 1;
      constraintFFigureMethodPotencyFigure.grabExcessHorizontalSpace = false;
      constraintFFigureMethodPotencyFigure.grabExcessVerticalSpace = false;
      innerRectangle0.add(fFigureMethodPotencyFigure, constraintFFigureMethodPotencyFigure);

      fFigureMethodInputFigure = new WrappingLabel();

      fFigureMethodInputFigure.setText("");

      fFigureMethodInputFigure.setFont(FFIGUREMETHODINPUTFIGURE_FONT);

      GridData constraintFFigureMethodInputFigure = new GridData();
      constraintFFigureMethodInputFigure.verticalAlignment = GridData.CENTER;
      constraintFFigureMethodInputFigure.horizontalAlignment = GridData.BEGINNING;
      constraintFFigureMethodInputFigure.horizontalIndent = 0;
      constraintFFigureMethodInputFigure.horizontalSpan = 1;
      constraintFFigureMethodInputFigure.verticalSpan = 1;
      constraintFFigureMethodInputFigure.grabExcessHorizontalSpace = false;
      constraintFFigureMethodInputFigure.grabExcessVerticalSpace = false;
      innerRectangle0.add(fFigureMethodInputFigure, constraintFFigureMethodInputFigure);

      fFigureMethodOutputFigure = new WrappingLabel();

      fFigureMethodOutputFigure.setText("");

      fFigureMethodOutputFigure.setFont(FFIGUREMETHODOUTPUTFIGURE_FONT);

      GridData constraintFFigureMethodOutputFigure = new GridData();
      constraintFFigureMethodOutputFigure.verticalAlignment = GridData.CENTER;
      constraintFFigureMethodOutputFigure.horizontalAlignment = GridData.BEGINNING;
      constraintFFigureMethodOutputFigure.horizontalIndent = 0;
      constraintFFigureMethodOutputFigure.horizontalSpan = 1;
      constraintFFigureMethodOutputFigure.verticalSpan = 1;
      constraintFFigureMethodOutputFigure.grabExcessHorizontalSpace = false;
      constraintFFigureMethodOutputFigure.grabExcessVerticalSpace = false;
      innerRectangle0.add(fFigureMethodOutputFigure, constraintFFigureMethodOutputFigure);
    }
    /** @generated */
    private void createContents() {

      ScalablePolygonShape deepHistoryFigure_Letter0 = new ScalablePolygonShape();
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(40)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(40), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(40), getMapMode().DPtoLP(40)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(40), getMapMode().DPtoLP(0)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(40), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Letter0.addPoint(
          new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Letter0.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)));
      deepHistoryFigure_Letter0.setFill(true);
      deepHistoryFigure_Letter0.setLineWidth(1);
      deepHistoryFigure_Letter0.setPreferredSize(
          new Dimension(getMapMode().DPtoLP(15), getMapMode().DPtoLP(15)));
      deepHistoryFigure_Letter0.setMaximumSize(
          new Dimension(getMapMode().DPtoLP(15), getMapMode().DPtoLP(15)));

      GridData constraintDeepHistoryFigure_Letter0 = new GridData();
      constraintDeepHistoryFigure_Letter0.verticalAlignment = GridData.FILL;
      constraintDeepHistoryFigure_Letter0.horizontalAlignment = GridData.FILL;
      constraintDeepHistoryFigure_Letter0.horizontalIndent = 0;
      constraintDeepHistoryFigure_Letter0.horizontalSpan = 1;
      constraintDeepHistoryFigure_Letter0.verticalSpan = 1;
      constraintDeepHistoryFigure_Letter0.grabExcessHorizontalSpace = true;
      constraintDeepHistoryFigure_Letter0.grabExcessVerticalSpace = true;
      this.add(deepHistoryFigure_Letter0, constraintDeepHistoryFigure_Letter0);

      RectangleFigure deepHistoryFigure_AsteriskContainer0 = new RectangleFigure();
      deepHistoryFigure_AsteriskContainer0.setFill(false);
      deepHistoryFigure_AsteriskContainer0.setOutline(false);
      deepHistoryFigure_AsteriskContainer0.setLineWidth(1);
      deepHistoryFigure_AsteriskContainer0.setPreferredSize(
          new Dimension(getMapMode().DPtoLP(15), getMapMode().DPtoLP(15)));
      deepHistoryFigure_AsteriskContainer0.setMinimumSize(
          new Dimension(getMapMode().DPtoLP(15), getMapMode().DPtoLP(15)));
      deepHistoryFigure_AsteriskContainer0.setBorder(
          new MarginBorder(
              getMapMode().DPtoLP(0),
              getMapMode().DPtoLP(2),
              getMapMode().DPtoLP(5),
              getMapMode().DPtoLP(0)));

      GridData constraintDeepHistoryFigure_AsteriskContainer0 = new GridData();
      constraintDeepHistoryFigure_AsteriskContainer0.verticalAlignment = GridData.FILL;
      constraintDeepHistoryFigure_AsteriskContainer0.horizontalAlignment = GridData.FILL;
      constraintDeepHistoryFigure_AsteriskContainer0.horizontalIndent = 0;
      constraintDeepHistoryFigure_AsteriskContainer0.horizontalSpan = 1;
      constraintDeepHistoryFigure_AsteriskContainer0.verticalSpan = 1;
      constraintDeepHistoryFigure_AsteriskContainer0.grabExcessHorizontalSpace = true;
      constraintDeepHistoryFigure_AsteriskContainer0.grabExcessVerticalSpace = true;
      this.add(
          deepHistoryFigure_AsteriskContainer0, constraintDeepHistoryFigure_AsteriskContainer0);

      deepHistoryFigure_AsteriskContainer0.setLayoutManager(new StackLayout());

      ScalablePolygonShape deepHistoryFigure_Asterisk1 = new ScalablePolygonShape();
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(7)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(30), getMapMode().DPtoLP(33)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(20), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(30), getMapMode().DPtoLP(7)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(33)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(20), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(40), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Asterisk1.addPoint(
          new Point(getMapMode().DPtoLP(20), getMapMode().DPtoLP(20)));
      deepHistoryFigure_Asterisk1.setFill(true);
      deepHistoryFigure_Asterisk1.setLineWidth(1);

      deepHistoryFigure_AsteriskContainer0.add(deepHistoryFigure_Asterisk1);
    }