Examples of VisualElement


Examples of org.openbp.cockpit.modeler.figures.VisualElement

      objectUnderCursor = lastHandle;
    }
    else
    {
      // We look for the figure under the cursor
      VisualElement figure = (VisualElement) FigureUtil.findInnermostFigure(((ProcessDrawing) drawing()), x, y, VisualElement.class);
      if (figure != null)
      {
        objectUnderCursor = figure;
      }

      if (figure != lastFigure)
      {
        // Mouse moved to another figure, update figure hover effect if not entering a child element
        if (lastFigure != null && (figure == null || figure.getParentElement() != lastFigure))
        {
          // Tell the figure it is not hovered by the cursor any more
          lastFigure.invalidate();
          lastFigure.handleEvent(new VisualElementEvent(VisualElementEvent.CURSOR_LEFT, editor, e, x, y));
        }

        if (figure != null)
        {
          // Tell the figure it is hovered by the cursor
          figure.handleEvent(new VisualElementEvent(VisualElementEvent.CURSOR_ENTERED, editor, e, x, y));
        }

        lastFigure = figure;
        view.setFigureUnderCursor(figure);

        if (figure != null)
        {
          figure.invalidate();
        }
        view.repairDamage();
      }
    }
View Full Code Here

Examples of org.openbp.cockpit.modeler.figures.VisualElement

    if (! moved)
    {
      if (wasSelected)
      {
        VisualElement lastFigure = getToolSupport().getLastFigure();
        if (lastFigure instanceof ProcessElementContainer)
        {
          getToolSupport().toggleInPlaceEditor((ProcessElementContainer) lastFigure, true);
        }
      }
View Full Code Here

Examples of org.openbp.cockpit.modeler.figures.VisualElement

    }
  }

  public void mouseUp(MouseEvent e, int x, int y)
  {
    VisualElement clickedFigure = (VisualElement) FigureUtil.findInnermostFigure(((ProcessDrawing) getDrawing()), x, y, VisualElement.class);
    if (clickedFigure instanceof ProcessElementContainer && ! (clickedFigure instanceof ProcessDrawing) && e.getClickCount() == 1)
    {
      if (saveEdit())
      {
        // Toggle
View Full Code Here

Examples of org.openbp.cockpit.modeler.figures.VisualElement

    super.mouseUp(e, x, y);

    if (! moved && wasSelected && e.getClickCount() == 1)
    {
      VisualElement lastFigure = getToolSupport().getLastFigure();
      if (lastFigure instanceof ProcessElementContainer)
      {
        getToolSupport().toggleInPlaceEditor((ProcessElementContainer) lastFigure, true);
      }
    }
View Full Code Here

Examples of org.openbp.cockpit.modeler.figures.VisualElement

    changed();
  }

  public boolean handleEvent(VisualElementEvent event)
  {
    VisualElement child = (VisualElement) FigureUtil.findChildFigure(this, event.x, event.y, VisualElement.class);
    if (child != null)
    {
      return child.handleEvent(event);
    }
    return false;
  }
View Full Code Here

Examples of org.openbp.cockpit.modeler.figures.VisualElement

  public boolean handleEvent(VisualElementEvent event)
  {
    if (event.mouseEvent != null)
    {
      // Pass to child element, if any
      VisualElement child = (VisualElement) FigureUtil.findChildFigure(this, event.x, event.y, VisualElement.class);
      if (child != null)
        return child.handleEvent(event);
    }
    else
    {
      if (event.type == VisualElementEvent.UPDATE_STATE)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.