Package org.freeplane.view.swing.map

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


  public LinkNavigatorMouseListener() {
    super();
  }

  public void mouseMoved(final MouseEvent e) {
      final ZoomableLabel node = ((ZoomableLabel) e.getComponent());
      String link = node.getLink(e.getPoint());
      boolean followLink = link != null;
      Controller currentController = Controller.getCurrentController();
        final int requiredCursor;
        if(followLink){
        currentController.getViewController().out(link);
        requiredCursor = Cursor.HAND_CURSOR;
        }
        else{
          requiredCursor = Cursor.DEFAULT_CURSOR;
        }
        if (node.getCursor().getType() != requiredCursor) {
          node.setCursor(requiredCursor != Cursor.DEFAULT_CURSOR ? new Cursor(requiredCursor) : null);
        }
    }
View Full Code Here


          node.setCursor(requiredCursor != Cursor.DEFAULT_CURSOR ? new Cursor(requiredCursor) : null);
        }
    }

  public void mouseClicked(final MouseEvent e) {
      final ZoomableLabel component = (ZoomableLabel) e.getComponent();
      if(e.getClickCount() == 1 && e.getButton() == 1)
        if(Compat.isPlainEvent(e)){
          final String link = component.getLink(e.getPoint());
          if(link != null){
            if (link != null) {
              try {
                UrlManager.getController().loadURL(new URI(link));
              } catch (Exception ex) {
View Full Code Here

    return createEditor(node, editControl, text, true);
    }
 
  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)
            parentComponent = (ZoomableLabel) component;
          else
            parentComponent = null;
        }
        else
      parentComponent = null;
    if(parentComponent == null || ! parentComponent.isVisible()){
      return null;
    }
    final EditNodeTextField textField = new EditNodeTextField(node, (ZoomableLabel) parentComponent, text, editControl);
    if(EditedComponent.TEXT.equals(parent))
      textField.setBackground (nodeView.getTextBackground());
View Full Code Here

        super.mouseClicked(e);
    }
    }

  protected boolean eventFromHideDisplayArea(MouseEvent e) {
    final ZoomableLabel component = (ZoomableLabel) e.getComponent();
      return e.getX() < component.getIconWidth();
    }
View Full Code Here

TOP

Related Classes of org.freeplane.view.swing.map.ZoomableLabel

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.