Package org.openbp.cockpit.modeler.figures.process

Examples of org.openbp.cockpit.modeler.figures.process.ProcessElementContainer


    if (e != null)
    {
      Point p = e.getPoint();
      p = applyScale(p, true);

      ProcessElementContainer pec = (ProcessElementContainer) FigureUtil.findInnermostFigure(((ProcessDrawing) drawing()), p.x, p.y, ProcessElementContainer.class);

      if (pec != null)
      {
        // No tool tip for the drawing itself
        if (pec != drawing())
          // We can use the getInfoText Method of ModelObject
          return TextUtil.convertToHTML(pec.getReferredProcessElement().getInfoText(), true, 1, 50);
      }
    }

    return null;
  }
View Full Code Here


    boolean rightButton = InputState.isRightButtonDown();
    if (rightButton)
    {
      Figure f = null;

      ProcessElementContainer pec = (ProcessElementContainer) FigureUtil.findInnermostFigure(((ProcessDrawing) drawing()), x, y, ProcessElementContainer.class);
      if (pec != null && pec != drawing())
      {
        f = pec;
      }
      else
      {
        f = FigureUtil.findInnermostFigure(((ProcessDrawing) drawing()), x, y, VisualElement.class);
      }

      if (f != null && f != drawing())
      {
        view.displayPopupMenu(f, e);

        lastFigure = (ProcessDrawing) drawing();
      }
    }
    else if (e.getClickCount() == 2)
    {
      // Double click caught, cancel pending in place editor timer
      if (inPlaceEditorDelayTimer != null)
      {
        inPlaceEditorDelayTimer.cancel();
        inPlaceEditorDelayTimer = null;
      }

      Figure figure = drawing().findFigure(x, y);

      if (figure instanceof VisualElement)
      {
        // Let the figure itself handle the doubleclick
        if (((VisualElement) figure).handleEvent(new VisualElementEvent(VisualElementEvent.DOUBLE_CLICK, editor, e, x, y)))
        {
          // Handled by the element itself
          return;
        }
      }

      if (figure instanceof ProcessElementContainer)
      {
        // Let's see if the process element behind the figure can handle this...
        ProcessElementContainer pec = (ProcessElementContainer) FigureUtil.findInnermostFigure(figure, x, y, ProcessElementContainer.class);

        // Double click means opening the item, pass to association plugin
        JaspiraEventMgr.fireGlobalEvent("plugin.association.open", new BasicTransferable(pec.getReferredProcessElement()));
      }
    }

    // Update input state
    InputState.updateStateOnMouseUpEvent(e);
View Full Code Here

    if (qualifier != null && modeler.getProcessQualifier().matches(qualifier, ModelQualifier.COMPARE_MODEL | ModelQualifier.COMPARE_ITEM | ModelQualifier.COMPARE_TYPE))
    {
      modeler.focusPlugin();

      ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(qualifier);
      if (pec != null)
      {
        WorkspaceDrawingView view = modeler.getDrawingView();
        view.singleSelect(pec);
      }
View Full Code Here

   * @param je Event
   * @return The event status code
   */
  public JaspiraEventHandlerCode invalidate(QualifierEvent je)
  {
    ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(je.getQualifier());
    if (pec == null)
    {
      // This doesn't seem to be addressed to the current process
      // or the item to show doesn't exist in this process
      return EVENT_IGNORED;
    }

    if (pec instanceof AbstractTagFigure)
    {
      ((AbstractTagFigure) pec).checkDecoratedContentState();
    }
    pec.invalidate();

    return modeler.getPluginComponent().isShowing() ? EVENT_CONSUMED : EVENT_IGNORED;
  }
View Full Code Here

   * @param je Event
   * @return The event status code
   */
  public JaspiraEventHandlerCode show(QualifierEvent je)
  {
    ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(je.getQualifier());
    if (pec == null)
    {
      // This doesn't seem to be addressed to the current process
      // or the item to show doesn't exist in this process
      return EVENT_IGNORED;
View Full Code Here

   * @param je Event
   * @return The event status code
   */
  public JaspiraEventHandlerCode showexact(QualifierEvent je)
  {
    ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(je.getQualifier());
    if (pec == null)
    {
      // This doesn't seem to be addressed to the current process
      // or the item to show doesn't exist in this process
      return EVENT_IGNORED;
View Full Code Here

   * @param je Event
   * @return The event status code
   */
  public JaspiraEventHandlerCode select(QualifierEvent je)
  {
    ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(je.getQualifier());
    if (pec == null)
    {
      // This doesn't seem to be addressed to the current process
      // or the item to show doesn't exist in this process
      return EVENT_IGNORED;
View Full Code Here

   */
  public JaspiraEventHandlerCode getbyqualifier(AskEvent ae)
  {
    if (modeler.getPluginComponent().isShowing())
    {
      ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier((ModelQualifier) ae.getObject());
      if (pec != null)
      {
        ae.setAnswer(pec);
        return EVENT_CONSUMED;
      }
View Full Code Here

    {
      Figure f = fe.nextFigure();

      if (f instanceof ProcessElementContainer)
      {
        ProcessElementContainer pec = (ProcessElementContainer) f;
        ProcessObject pe = pec.getProcessElement();
        ModelQualifier qualifier = pe.getQualifier();

        if (result == null)
        {
          result = new ArrayList();
View Full Code Here

    int n = selectionQualifiers.size();
    for (int i = 0; i < n; ++i)
    {
      ModelQualifier qualifier = (ModelQualifier) selectionQualifiers.get(i);

      ProcessElementContainer pec = modeler.getDrawing().getFigureByQualifier(qualifier);
      if (pec != null)
      {
        view.addToSelection(pec);

        Rectangle db = pec.displayBox();
        if (rect == null)
          rect = new Rectangle(db);
        else
          rect = rect.union(db);
      }
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.modeler.figures.process.ProcessElementContainer

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.