Examples of MainView


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

    }
 
  private EditNodeBase createEditor(final NodeModel node, final EditedComponent parent, final String text,
                                                       final IEditControl editControl) {
    final ZoomableLabel parentComponent;
    final MainView mainView = (MainView) getComponent(node);
        final NodeView nodeView = mainView.getNodeView();
    if(EditedComponent.TEXT.equals(parent))
      parentComponent = mainView;
    else if(EditedComponent.DETAIL.equals(parent)) {
      final JComponent component = nodeView.getContent(NodeView.DETAIL_VIEWER_POSITION);
          if(component instanceof ZoomableLabel)
View Full Code Here

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

  private Integer width;
    private ConnectorLocation startConnectorLocation;
    private ConnectorLocation endConnectorLocation;

  protected void createStart() {
        final MainView mainView = source.getMainView();
        final MainView targetMainView = target.getMainView();
       
        final Point relativeLocation = source.getRelativeLocation(target);
        relativeLocation.x += targetMainView.getWidth()/2;
        relativeLocation.y += targetMainView.getHeight()/2;
        start = mainView.getConnectorPoint(relativeLocation);
        startConnectorLocation = mainView.getConnectorLocation(relativeLocation);
               
        relativeLocation.x -= targetMainView.getWidth()/2;
        relativeLocation.y -= targetMainView.getHeight()/2;
        relativeLocation.x = - relativeLocation.x + mainView.getWidth()/2;
        relativeLocation.y = - relativeLocation.y + mainView.getHeight()/2;
    end = target.getMainView().getConnectorPoint(relativeLocation);
    endConnectorLocation = targetMainView.getConnectorLocation(relativeLocation);
  }
View Full Code Here

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

      }
        final Component component = findMapComponent(e);
        if(! (component instanceof MainView)){
          return;
        }
        MainView mainView = (MainView) component;
        final NodeModel model = mainView.getNodeView().getModel();
        switch(e.getClickCount()){
          case 1:
            final MapController mapController = Controller.getCurrentModeController().getMapController();
        mapController.setFolded(model, ! model.isFolded());
            break;
View Full Code Here

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

/**
* The NodeDragListener which belongs to every NodeView
*/
public class MNodeDragListener implements DragGestureListener {
  public void dragGestureRecognized(final DragGestureEvent e) {
    final MainView mainView = (MainView) e.getComponent();
    final NodeView nodeView = mainView.getNodeView();
    final MapView mapView = nodeView.getMap();
    mapView.select();
    if(! nodeView.isSelected()){
      nodeView.getMap().getModeController().getController().getSelection().selectAsTheOnlyOneSelected(nodeView.getModel());
    }
    Rectangle bounds = new Rectangle(0, 0, mainView.getWidth(), mainView.getHeight());
    if(!bounds.contains(e.getDragOrigin()))
      return;
    final int dragActionType = e.getDragAction();
    if (dragActionType == DnDConstants.ACTION_MOVE) {
      final NodeModel node = nodeView.getModel();
View Full Code Here

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

      add(getResetZoom());
    }
  }

  protected void maybeShowPopup(final MouseEvent e) {
    MainView mv = null;
    if (e.isPopupTrigger()) {
      for (final Component cmp : e.getComponent().getParent().getComponents()) {
        if (cmp instanceof MainView) {
          mv = (MainView) cmp;
          node = mv.getNodeView().getModel();
          viewer = (Controller.getCurrentController().getModeController().getExtension(
              ViewerController.class));
          break;
        }
      }
View Full Code Here

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

        final NodeModel node = Controller.getCurrentModeController().getMapController().getSelectedNode();
        final NodeView nodeView = mapView.getNodeView(node);
        final JPopupMenu popupmenu = modeController.getUserInputListenerFactory().getNodePopupMenu();
        if (popupmenu != null) {
          popupmenu.addHierarchyListener(new ControllerPopupMenuListener());
          final MainView mainView = nodeView.getMainView();
          popupmenu.show(mainView, mainView.getX(), mainView.getY());
        }
    }
  }
View Full Code Here

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

  @Override
  public void mouseClicked(final MouseEvent e) {
    if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2
        && doubleClickTimer.getDelay() > 0) {
      final MainView mainView = (MainView) e.getComponent();
      if (mainView.getMouseArea().equals(MouseArea.MOTION)) {
        final Controller controller = Controller.getCurrentController();
        MLocationController locationController = (MLocationController) LocationController
            .getController(controller.getModeController());
        if (e.getModifiersEx() == 0) {
          final NodeView nodeV = getNodeView(e);
View Full Code Here

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

  @Override
    public void mouseMoved(final MouseEvent e) {
    if (isDragActive())
      return;
    final MainView v = (MainView) e.getSource();
    if (v.isInDragRegion(e.getPoint())) {
      v.setMouseArea(MouseArea.MOTION);
      v.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
      return;
    }
    super.mouseMoved(e);
  }
View Full Code Here

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

          NodeModel node = null;
          if (e.getSource().getClass() == LatexViewer.class) {
            final LatexViewer lv = (LatexViewer) e.getSource();
            for (int i = 0; i < lv.getParent().getComponentCount(); i++) {
              if (lv.getParent().getComponent(i) instanceof MainView) {
                final MainView mv = (MainView) lv.getParent().getComponent(i);
                node = mv.getNodeView().getModel();
                break;
              }
            }
            if (node == null) {
              node = Controller.getCurrentModeController().getMapController().getSelectedNode();
View Full Code Here

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

    return false;
  }

  @Override
  protected void createStart() {
    final MainView startMainView = getSource().getMainView();
    start = new Point(startMainView.getWidth(), startMainView.getHeight() / 2);
    final MainView targetMainView = getTarget().getMainView();
    end = new Point(targetMainView.getWidth(), targetMainView.getHeight() / 2);
  }
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.