gpt4 book ai didi

org.weasis.core.ui.editor.image.ZoomWin.setLocation()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 05:22:31 27 4
gpt4 key购买 nike

本文整理了Java中org.weasis.core.ui.editor.image.ZoomWin.setLocation()方法的一些代码示例,展示了ZoomWin.setLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoomWin.setLocation()方法的具体详情如下:
包路径:org.weasis.core.ui.editor.image.ZoomWin
类名称:ZoomWin
方法名:setLocation

ZoomWin.setLocation介绍

暂无

代码示例

代码示例来源:origin: nroduit/Weasis

public void centerZoomWin() {
  int magPosx = (view2d.getWidth() / 2) - (getWidth() / 2);
  int magPosy = (view2d.getHeight() / 2) - (getHeight() / 2);
  setLocation(magPosx, magPosy);
}

代码示例来源:origin: nroduit/Weasis

bound.x = (bound.x + centerx) * w / oldSize.width - centerx;
bound.y = (bound.y + centery) * h / oldSize.height - centery;
lens.setLocation(bound.x, bound.y);

代码示例来源:origin: nroduit/Weasis

bound.x = (bound.x + centerx) * w / oldSize.width - centerx;
bound.y = (bound.y + centery) * h / oldSize.height - centery;
lens.setLocation(bound.x, bound.y);

代码示例来源:origin: nroduit/Weasis

public ZoomWin(DefaultView2d<E> view2d) {
  super(null);
  this.view2d = view2d;
  this.setOpaque(false);
  ImageViewerEventManager<E> manager = view2d.getEventManager();
  this.imageLayer = new RenderedImageLayer<>();
  SimpleOpManager operations = imageLayer.getDisplayOpManager();
  operations.addImageOperationAction(new AffineTransformOp());
  ActionState zoomAction = manager.getAction(ActionW.LENSZOOM);
  if (zoomAction instanceof SliderChangeListener) {
    actionsInView.put(ActionW.ZOOM.cmd(), ((SliderChangeListener) zoomAction).getRealValue());
  }
  this.popup = new PopUpMenuOnZoom(this);
  this.popup.setInvoker(this);
  this.setCursor(DefaultView2d.MOVE_CURSOR);
  ZoomSetting z = manager.getZoomSetting();
  OpManager disOp = getDisplayOpManager();
  disOp.setParamValue(AffineTransformOp.OP_NAME, AffineTransformOp.P_INTERPOLATION, z.getInterpolation());
  disOp.setParamValue(AffineTransformOp.OP_NAME, AffineTransformOp.P_AFFINE_MATRIX, null);
  actionsInView.put(SYNCH_CMD, z.isLensSynchronize());
  actionsInView.put(ActionW.DRAWINGS.cmd(), z.isLensShowDrawings());
  actionsInView.put(FREEZE_CMD, SyncType.NONE);
  Color bckColor = UIManager.getColor("Panel.background"); //$NON-NLS-1$
  this.setLensDecoration(z.getLensLineWidth(), z.getLensLineColor(), bckColor, z.isLensRound());
  this.setSize(z.getLensWidth(), z.getLensHeight());
  this.setLocation(-1, -1);
  this.imageLayer.addLayerChangeListener(this);
  this.mouseHandler = new MouseHandler();
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com