gpt4 book ai didi

org.weasis.core.ui.editor.image.ZoomToolBar类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:45:48 27 4
gpt4 key购买 nike

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

ZoomToolBar介绍

暂无

代码示例

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

private JPopupMenu getZoomPopupMenuButton(DropDownButton dropDownButton,
  final ImageViewerEventManager<?> eventManager) {
  JPopupMenu popupMouseButtons = new JPopupMenu();
  for (JMenuItem jMenuItem : getZoomListMenuItems(eventManager)) {
    popupMouseButtons.add(jMenuItem);
  }
  return popupMouseButtons;
}

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

public MPRContainer(GridBagLayoutModel layoutModel, String uid) {
  super(EventManager.getInstance(), layoutModel, uid, MPRFactory.NAME, MPRFactory.ICON, null);
  setSynchView(SynchView.NONE);
  if (!initComponents) {
    initComponents = true;
    // Add standard toolbars
    // WProperties props = (WProperties) BundleTools.SYSTEM_PREFERENCES.clone();
    // props.putBooleanProperty("weasis.toolbar.synchbouton", false); //$NON-NLS-1$
    EventManager evtMg = EventManager.getInstance();
    Optional<Toolbar> importBar = View2dContainer.TOOLBARS.stream().filter(b -> b instanceof ImportToolBar).findFirst();
    importBar.ifPresent(TOOLBARS::add);
    Optional<Toolbar> exportBar = View2dContainer.TOOLBARS.stream().filter(b -> b instanceof ExportToolBar).findFirst();
    exportBar.ifPresent(TOOLBARS::add);
    Optional<Toolbar> viewBar = View2dContainer.TOOLBARS.stream().filter(b -> b instanceof ViewerToolBar).findFirst();
    viewBar.ifPresent(TOOLBARS::add);
    TOOLBARS.add(new MeasureToolBar(evtMg, 11));
    TOOLBARS.add(new ZoomToolBar(evtMg, 20, true));
    TOOLBARS.add(new RotationToolBar(evtMg, 30));
    TOOLBARS.add(new DcmHeaderToolBar(evtMg, 35));
    TOOLBARS.add(new LutToolBar(evtMg, 40));
    final BundleContext context = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
    Preferences prefs = BundlePreferences.getDefaultPreferences(context);
    if (prefs != null) {
      String className = this.getClass().getSimpleName().toLowerCase();
      InsertableUtil.applyPreferences(TOOLBARS, prefs, context.getBundle().getSymbolicName(), className,
        Type.TOOLBAR);
    }
  }
}

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

public ZoomToolBar(final ImageViewerEventManager<?> eventManager, int index, boolean showLens) {
  super(Messages.getString("ZoomToolBar.zoomBar"), index); //$NON-NLS-1$
  if (eventManager == null) {
    throw new IllegalArgumentException("EventManager cannot be null"); //$NON-NLS-1$
  }
  final DropDownButton zoom = new DropDownButton("zoom", new DropButtonIcon(new ImageIcon(MouseActions.class //$NON-NLS-1$
    .getResource("/icon/32x32/zoom.png")))) { //$NON-NLS-1$
    @Override
    protected JPopupMenu getPopupMenu() {
      return getZoomPopupMenuButton(this, eventManager);
    }
  };
  zoom.setToolTipText(Messages.getString("ZoomToolBar.zoom_type")); //$NON-NLS-1$
  add(zoom);
  ActionState zoomAction = eventManager.getAction(ActionW.ZOOM);
  if (zoomAction != null) {
    zoomAction.registerActionState(zoom);
  }
  if (showLens) {
    final JToggleButton jButtonLens =
      new JToggleButton(new ImageIcon(MouseActions.class.getResource("/icon/32x32/zoom-lens.png"))); //$NON-NLS-1$
    jButtonLens.setToolTipText(Messages.getString("ViewerToolBar.show_lens")); //$NON-NLS-1$
    ActionState lens = eventManager.getAction(ActionW.LENS);
    if (lens instanceof ToggleButtonListener) {
      ((ToggleButtonListener) lens).registerActionState(jButtonLens);
    }
    add(jButtonLens);
  }
}

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

public JMenu getZoomMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<SliderChangeListener> zoomAction = getAction(ActionW.ZOOM, SliderChangeListener.class);
    if (zoomAction.isPresent()) {
      menu = new JMenu(ActionW.ZOOM.getTitle());
      menu.setIcon(ActionW.ZOOM.getSmallIcon());
      menu.setEnabled(zoomAction.get().isActionEnabled());
      if (zoomAction.get().isActionEnabled()) {
        for (JMenuItem jMenuItem : ZoomToolBar.getZoomListMenuItems(this)) {
          menu.add(jMenuItem);
        }
      }
    }
  }
  return menu;
}

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

TOOLBARS.add(new ZoomToolBar(evtMg, 20, true));

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

public JMenu getZoomMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<SliderChangeListener> zoomAction = getAction(ActionW.ZOOM, SliderChangeListener.class);
    if (zoomAction.isPresent()) {
      menu = new JMenu(ActionW.ZOOM.getTitle());
      menu.setIcon(ActionW.ZOOM.getSmallIcon());
      menu.setEnabled(zoomAction.get().isActionEnabled());
      if (zoomAction.get().isActionEnabled()) {
        for (JMenuItem jMenuItem : ZoomToolBar.getZoomListMenuItems(this)) {
          menu.add(jMenuItem);
        }
      }
    }
  }
  return menu;
}

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

TOOLBARS.add(new ZoomToolBar(evtMg, 20, true));

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