Package org.freeplane.view.swing.map

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


      }
    });
  }

  private void calculateSize() {
    final MapView mapView = (MapView) SwingUtilities.getAncestorOfClass(MapView.class, this);
    final float mapZoom = mapView.getZoom();
    if (mapZoom == zoom) {
      return;
    }
    zoom = mapZoom;
    final Icon latexIcon = teXFormula.createTeXIcon(TeXConstants.STYLE_DISPLAY, DEFAULT_FONT_SIZE * zoom);
 
View Full Code Here


  public void export(MapModel map, File chosenFile) {
    if (!ExportController.getContoller().checkCurrentMap(map)){
      return;
    }
    try {
      final MapView view = (MapView) Controller.getCurrentController().getMapViewManager().getMapViewComponent();
      if (view == null) {
        return;
      }
      Controller.getCurrentController().getViewController().setWaitingCursor(true);
      final SVGGraphics2D g2d = fillSVGGraphics2D(view);
View Full Code Here

  public void export(MapModel map, File chosenFile) {
    if (!ExportController.getContoller().checkCurrentMap(map)){
      return;
    }
    try {
      final MapView view = (MapView) Controller.getCurrentController().getMapViewManager().getMapViewComponent();
      if (view == null) {
        return;
      }
      Controller.getCurrentController().getViewController().setWaitingCursor(true);
      final SVGGraphics2D g2d = fillSVGGraphics2D(view);
View Full Code Here

  }

  public void actionPerformed(final ActionEvent e) {
    final MapModel map = Controller.getCurrentController().getMap();
    org.freeplane.plugin.script.FormulaUtils.clearCache(map);
    MapView mapView = (MapView)Controller.getCurrentController().getMapViewManager().getMapViewComponent();
    mapView.getRoot().updateAll();
  }
View Full Code Here

    final float zoom = getZoom();
    final int col = event.getColumnNumber();
    final AttributeTableLayoutModel layoutModel = (AttributeTableLayoutModel) event.getSource();
    final int width = layoutModel.getColumnWidth(col);
    getColumnModel().getColumn(col).setPreferredWidth((int) (width * zoom));
    final MapView map = attributeView.getMapView();
    final NodeModel node = attributeView.getNode();
    map.getModeController().getMapController().nodeChanged(node);
  }
View Full Code Here

      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

    final JTableHeader tableHeader = getTableHeader();
    return tableHeader != null ? tableHeader.getPreferredSize().height : 0;
  }

  float getZoom() {
        final MapView mapView = attributeView.getMapView();
      if(SwingUtilities.isDescendingFrom(this, mapView)) {
            return mapView.getZoom();
        }
      return 1f;
  }
View Full Code Here

       
            boolean isSelected = false;
            boolean hasFocus = false;
       
            // Only indicate the selection and focused cell if not printing
            MapView map = (MapView) SwingUtilities.getAncestorOfClass(MapView.class, this);
            if (map == null || ! map.isPrinting()) {
                isSelected = isCellSelected(row, column);
       
                boolean rowIsLead =
                    (selectionModel.getLeadSelectionIndex() == row);
                boolean colIsLead =
View Full Code Here

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

  private final EdgeView edgeView;

  public EdgeLinkView(final ConnectorModel model, final ModeController modeController, final NodeView source,
                      final NodeView target) {
    super(model, source, target);
    final MapView map = source.getMap();
    if (map.getLayoutType() == MapViewLayout.OUTLINE) {
      edgeView = new OutlineLinkView(source, target, map);
    }
    else{
      edgeView = EdgeViewFactory.getInstance().getEdge(source, target, map);
    }
View Full Code Here

TOP

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

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.