Package org.freeplane.view.swing.map.link

Examples of org.freeplane.view.swing.map.link.ILinkView


  public Object detectCollision(final Point p) {
    if (arrowLinkViews == null) {
      return null;
    }
    for (int i = 0; i < arrowLinkViews.size(); ++i) {
      final ILinkView arrowView = arrowLinkViews.get(i);
      if (arrowView.detectCollision(p, true)) {
        return arrowView.getModel();
      }
    }
    for (int i = 0; i < arrowLinkViews.size(); ++i) {
      final ILinkView arrowView = arrowLinkViews.get(i);
      if (arrowView.detectCollision(p, false)) {
        return arrowView.getModel();
      }
    }
    return null;
  }
View Full Code Here


  public Rectangle getInnerBounds() {
    final Rectangle innerBounds = rootView.getBounds();
    final Rectangle maxBounds = new Rectangle(0, 0, getWidth(), getHeight());
    for (int i = 0; i < arrowLinkViews.size(); ++i) {
      final ILinkView arrowView = arrowLinkViews.get(i);
      arrowView.increaseBounds(innerBounds);
    }
    return innerBounds.intersection(maxBounds);
  }
View Full Code Here

            continue;
          }
          final NodeModel source = ref.getSource();
          final NodeView sourceView = getNodeView(source);
          final NodeView targetView = getNodeView(target);
          final ILinkView arrowLink;
          if (sourceView != null && targetView != null
                  && (Shape.EDGE_LIKE.equals(ref.getShape()) || sourceView.getMap().getLayoutType() == MapViewLayout.OUTLINE)
                  && source.isVisible() && target.isVisible()) {
            arrowLink = new EdgeLinkView(ref, getModeController(), sourceView, targetView);
          }
          else {
            arrowLink = new ConnectorView(ref, sourceView, targetView, getBackground());
          }
          arrowLink.paint(graphics);
          arrowLinkViews.add(arrowLink);
        }
      }
    }
    finally {
View Full Code Here

TOP

Related Classes of org.freeplane.view.swing.map.link.ILinkView

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.