本文整理了Java中org.weasis.core.ui.pref.ZoomSetting
类的一些代码示例,展示了ZoomSetting
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoomSetting
类的具体详情如下:
包路径:org.weasis.core.ui.pref.ZoomSetting
类名称:ZoomSetting
暂无
代码示例来源: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();
}
代码示例来源:origin: nroduit/Weasis
public void savePreferences(BundleContext bundleContext) {
Preferences prefs = BundlePreferences.getDefaultPreferences(bundleContext);
zoomSetting.savePreferences(prefs);
// Mouse buttons preferences
mouseActions.savePreferences(prefs);
if (prefs != null) {
Preferences prefNode = prefs.node("mouse.sensivity"); //$NON-NLS-1$
setSliderPreference(prefNode, ActionW.WINDOW);
setSliderPreference(prefNode, ActionW.LEVEL);
setSliderPreference(prefNode, ActionW.SCROLL_SERIES);
setSliderPreference(prefNode, ActionW.ROTATION);
setSliderPreference(prefNode, ActionW.ZOOM);
Preferences containerNode = prefs.node(View2dContainer.class.getSimpleName().toLowerCase());
InsertableUtil.savePreferences(View2dContainer.TOOLBARS, containerNode, Type.TOOLBAR);
InsertableUtil.savePreferences(View2dContainer.TOOLS, containerNode, Type.TOOL);
}
}
代码示例来源:origin: nroduit/Weasis
protected void initActionWState() {
E img = getImage();
actionsInView.put(ActionW.SPATIAL_UNIT.cmd(), img == null ? Unit.PIXEL : img.getPixelSpacingUnit());
actionsInView.put(ZOOM_TYPE_CMD, ZoomType.BEST_FIT);
actionsInView.put(ActionW.ZOOM.cmd(), 0.0);
actionsInView.put(ActionW.DRAWINGS.cmd(), true);
actionsInView.put(LayerType.CROSSLINES.name(), true);
actionsInView.put(ActionW.INVERSESTACK.cmd(), false);
actionsInView.put(ActionW.FILTERED_SERIES.cmd(), null);
actionsInView.put(ActionW.FLIP.cmd(), false);
actionsInView.put(ActionW.ROTATION.cmd(), 0);
OpManager disOp = getDisplayOpManager();
disOp.setParamValue(WindowOp.OP_NAME, WindowOp.P_APPLY_WL_COLOR,
eventManager.getOptions().getBooleanProperty(WindowOp.P_APPLY_WL_COLOR, true));
disOp.setParamValue(AffineTransformOp.OP_NAME, AffineTransformOp.P_INTERPOLATION,
eventManager.getZoomSetting().getInterpolation());
disOp.setParamValue(AffineTransformOp.OP_NAME, AffineTransformOp.P_AFFINE_MATRIX, null);
disOp.setParamValue(FilterOp.OP_NAME, FilterOp.P_KERNEL_DATA, KernelData.NONE);
disOp.setParamValue(PseudoColorOp.OP_NAME, PseudoColorOp.P_LUT, ByteLut.defaultLUT);
disOp.setParamValue(PseudoColorOp.OP_NAME, PseudoColorOp.P_LUT_INVERSE, false);
}
代码示例来源:origin: nroduit/Weasis
zoomSetting.applyPreferences(prefs);
mouseActions.applyPreferences(prefs);
if (prefs != null) {
代码示例来源:origin: nroduit/Weasis
comboBoxInterpolation.setSelectedIndex(eventManager.getZoomSetting().getInterpolation());
panel1.add(comboBoxInterpolation);
代码示例来源:origin: nroduit/Weasis
zoomSetting.applyPreferences(prefs);
mouseActions.applyPreferences(prefs);
代码示例来源:origin: nroduit/Weasis
public void savePreferences(BundleContext bundleContext) {
Preferences prefs = BundlePreferences.getDefaultPreferences(bundleContext);
zoomSetting.savePreferences(prefs);
// Mouse buttons preferences
mouseActions.savePreferences(prefs);
if (prefs != null) {
// Mouse sensitivity
Preferences prefNode = prefs.node("mouse.sensivity"); //$NON-NLS-1$
setSliderPreference(prefNode, ActionW.WINDOW);
setSliderPreference(prefNode, ActionW.LEVEL);
setSliderPreference(prefNode, ActionW.SCROLL_SERIES);
setSliderPreference(prefNode, ActionW.ROTATION);
setSliderPreference(prefNode, ActionW.ZOOM);
prefNode = prefs.node("other"); //$NON-NLS-1$
BundlePreferences.putBooleanPreferences(prefNode, WindowOp.P_APPLY_WL_COLOR,
options.getBooleanProperty(WindowOp.P_APPLY_WL_COLOR, true));
BundlePreferences.putBooleanPreferences(prefNode, WindowOp.P_INVERSE_LEVEL,
options.getBooleanProperty(WindowOp.P_INVERSE_LEVEL, true));
BundlePreferences.putBooleanPreferences(prefNode, PRManager.PR_APPLY,
options.getBooleanProperty(PRManager.PR_APPLY, false));
Preferences containerNode = prefs.node(View2dContainer.class.getSimpleName().toLowerCase());
InsertableUtil.savePreferences(View2dContainer.TOOLBARS, containerNode, Type.TOOLBAR);
InsertableUtil.savePreferences(View2dContainer.TOOLS, containerNode, Type.TOOL);
InsertableUtil.savePreferences(MPRContainer.TOOLBARS,
prefs.node(MPRContainer.class.getSimpleName().toLowerCase()), Type.TOOLBAR);
}
}
内容来源于网络,如有侵权,请联系作者删除!