Examples of NodeView


Examples of org.freeplane.view.swing.map.NodeView

  public Dimension getPreferredScrollableViewportSize() {
    if (!isValid()) {
      validate();
    }
    final Dimension dimension = super.getPreferredSize();
    NodeView nodeView = (NodeView) SwingUtilities.getAncestorOfClass(NodeView.class, this);
    if(nodeView != null){
      final MapView map = nodeView.getMap();
      final ModeController modeController = map.getModeController();
      final NodeStyleController nsc = NodeStyleController.getController(modeController);
      dimension.width = Math.min(map.getZoomed(nsc.getMaxWidth(nodeView.getModel())), dimension.width);
      dimension.height = Math.min(map.getZoomed(AttributeTable.MAX_HEIGTH) - getTableHeaderHeight(), dimension.height);
    }
    else{
      dimension.width = Math.min(MAX_WIDTH, dimension.width);
      dimension.height = Math.min(MAX_HEIGTH, dimension.height);
View Full Code Here

Examples of org.freeplane.view.swing.map.NodeView

        public void run() {
          if (focusedTable != null) {
            final Component newNodeViewInFocus = SwingUtilities.getAncestorOfClass(NodeView.class,
                focusedTable);
            if (newNodeViewInFocus != null) {
              final NodeView viewer = (NodeView) newNodeViewInFocus;
              if (viewer != viewer.getMap().getSelected()) {
                viewer.getMap().selectAsTheOnlyOneSelected(viewer, false);
              }
            }
          }
        }
      });
View Full Code Here

Examples of org.freeplane.view.swing.map.NodeView

    }
    return length / 2;
  }

  private ModeController getModeController() {
    NodeView nodeView = source;
    if (source == null) {
      nodeView = target;
    }
    final MapView mapView = nodeView.getMap();
    return mapView.getModeController();
  }
View Full Code Here

Examples of org.freeplane.view.swing.map.NodeView

            }
        }

        public void onSelect(NodeModel node) {
            removeOldView();
            final NodeView nodeView = (NodeView) Controller.getCurrentController()
                .getMapViewManager().getSelectedComponent();
            if (nodeView == null)
                return;
            AttributeController.getController(modeController).createAttributeTableModel(node);
            attributeView = new AttributeView(nodeView, false);
View Full Code Here

Examples of org.freeplane.view.swing.map.NodeView

    edgeView.setColor(color);
  }

  public boolean detectCollision(final Point p, final boolean selectedOnly) {
    if (selectedOnly) {
      final NodeView source = edgeView.getSource();
      if ((source == null || !source.isSelected())) {
        final NodeView target = edgeView.getTarget();
        if ((target == null || !target.isSelected())) {
          return false;
        }
      }
    }
    return edgeView.detectCollision(p);
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.