Package org.freeplane.features.nodelocation

Examples of org.freeplane.features.nodelocation.LocationModel


      UITools.convertPointToAncestor(nodeV, point, JScrollPane.class);
      ModeController c = Controller.getCurrentController().getModeController();
      final Point dragNextPoint = point;
      if (!Compat.isCtrlEvent(e)) {
        final NodeModel node = nodeV.getModel();
        final LocationModel locationModel = LocationModel.createLocationModel(node);
        final int hGapChange = getHGapChange(dragNextPoint, node);
        if(hGapChange != 0){
          locationModel.setHGap(originalHGap + hGapChange);
        }
        final int shiftYChange = getNodeShiftYChange(dragNextPoint, node);
        if(shiftYChange != 0){
          locationModel.setShiftY(originalShiftY + shiftYChange);
        }
        if(hGapChange != 0 || shiftYChange != 0)
          c.getMapController().nodeRefresh(node);
        else
          return;
View Full Code Here


  }

  /**
   */
  private void resetPositions(final NodeModel node) {
    final LocationModel locationModel = LocationModel.getModel(node.getParentNode());
    locationModel.setVGap(originalParentVGap);
    LocationModel.getModel(node).setHGap(originalHGap);
    LocationModel.getModel(node).setShiftY(originalShiftY);
  }
View Full Code Here

  private final int shiftX;
  private final NodeModel node;
  private final int oldShiftX;

  ChangeShiftXActor(final NodeModel node, final int shiftX){
    final LocationModel locationModel = LocationModel.getModel(node);
    oldShiftX = locationModel.getHGap();
    this.node = node;
    this.shiftX = shiftX;
  }
View Full Code Here

  public String getDescription() {
    return "moveNodePosition";
  }

  private void setShiftX(final NodeModel node, final int hGap) {
    final LocationModel locationModel = LocationModel.createLocationModel(node);
    locationModel.setHGap(hGap);
    Controller.getCurrentModeController().getMapController().nodeChanged(node);
  }
View Full Code Here

  private final NodeModel node;
  private final int oldVgap;
  private final int vGap;

  ChangeVGapActor(final NodeModel node, final int vGap){
    final LocationModel locationModel = LocationModel.getModel(node);
    oldVgap = locationModel.getVGap();
    this.node = node;
    this.vGap = vGap;
  }
View Full Code Here

  private final NodeModel node;
  private final int oldShiftY;
  private final int shiftY;

  ChangeShiftYActor(final NodeModel node, final int shiftY){
    final LocationModel locationModel = LocationModel.getModel(node);
    oldShiftY = locationModel.getShiftY();
    this.node = node;
    this.shiftY = shiftY;
  }
View Full Code Here

  public String getDescription() {
    return "moveNodePosition";
  }

  private void setShiftY(final NodeModel node, final int shiftY) {
    final LocationModel locationModel = LocationModel.createLocationModel(node);
    locationModel.setShiftY(shiftY);
    Controller.getCurrentModeController().getMapController().nodeChanged(node);
  }
View Full Code Here

  /**
     * @return Returns the sHIFT.s
     */
  public int getShift() {
    final LocationModel locationModel = LocationModel.getModel(model);
    return map.getZoomed(calcShiftY(locationModel));
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.nodelocation.LocationModel

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.