org.weasis.core.api.service.WProperties.getBooleanProperty()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(10.9k)|赞(0)|评价(0)|浏览(131)

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

WProperties.getBooleanProperty介绍

暂无

代码示例

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

@Override
public ImportDicom createDicomImportPage(Hashtable<String, Object> properties) {
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.import.dicom.qr", true)) { //$NON-NLS-1$
    return new DicomQrView();
  }
  return null;
}

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

@Override
public void resetoDefaultValues() {
  BundleTools.SYSTEM_PREFERENCES.resetProperty(DOWNLOAD_IMMEDIATELY, Boolean.TRUE.toString());
  downloadImmediatelyCheckbox
    .setSelected(BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(DOWNLOAD_IMMEDIATELY, true));
}

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

@Override
public ExportDicom createDicomExportPage(Hashtable<String, Object> properties) {
  if (properties != null && BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.export.dicom.send", true)) { //$NON-NLS-1$
    DicomModel dicomModel = (DicomModel) properties.get(DicomModel.class.getName());
    CheckTreeModel treeModel = (CheckTreeModel) properties.get(CheckTreeModel.class.getName());
    if (dicomModel != null && treeModel != null) {
      return new SendDicomView(dicomModel, treeModel);
    }
  }
  return null;
}

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

public static DefaultAction buildExportAction(Component parent, DicomModel model, String actionName) {
    return new DefaultAction(actionName,
      new ImageIcon(ExportToolBar.class.getResource("/icon/16x16/dcm-export.png")), event -> { //$NON-NLS-1$
        if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.export.dicom", true)) { //$NON-NLS-1$
          ImportToolBar.showAction(parent, model, Messages.getString("LocalExport.local_dev"), true); //$NON-NLS-1$
        } else {
          JOptionPane.showMessageDialog((Component) event.getSource(),
            Messages.getString("DicomExplorer.export_perm")); //$NON-NLS-1$
        }
      });
  }
}

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

public static DefaultAction buildImportAction(Component parent, DicomModel model, String actionName) {
  return new DefaultAction(actionName,
    new ImageIcon(ImportToolBar.class.getResource("/icon/16x16/dcm-import.png")), event -> { //$NON-NLS-1$
      if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.import.dicom", true)) { //$NON-NLS-1$
        showAction(parent, model, Messages.getString("LocalImport.local_dev"), false); //$NON-NLS-1$
      } else {
        JOptionPane.showMessageDialog((Component) event.getSource(),
          Messages.getString("DicomExplorer.export_perm")); //$NON-NLS-1$
      }
    });
}

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

public JMenu getLutMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> lutAction = getAction(ActionW.LUT, ComboItemListener.class);
    if (lutAction.isPresent()) {
      menu = lutAction.get().createUnregisteredRadioMenu(Messages.getString("ImageTool.lut"));//$NON-NLS-1$
    }
  }
  return menu;
}

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

private void downloadManifest(Iterator<String> iter) throws DownloadException {
  try {
    URI uri = NetworkUtil.getURI(iter.next());
    Collection<LoadSeries> wadoTasks = DownloadManager.buildDicomSeriesFromXml(uri, dicomModel);
    iter.remove();
    if (wadoTasks != null) {
      loadSeriesList.addAll(wadoTasks);
      boolean downloadImmediately = BundleTools.SYSTEM_PREFERENCES
        .getBooleanProperty(SeriesDownloadPrefView.DOWNLOAD_IMMEDIATELY, true);
      startDownloadingSeries(wadoTasks, downloadImmediately);
    }
  } catch (URISyntaxException | MalformedURLException e) {
    LOGGER.error("Loading manifest", e); //$NON-NLS-1$
  }
}

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

public JMenu getFilterMenu(String prop) {
    JMenu menu = null;
    if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
      Optional<ComboItemListener> filterAction = getAction(ActionW.FILTER, ComboItemListener.class);
      if (filterAction.isPresent()) {
        menu = filterAction.get().createUnregisteredRadioMenu(Messages.getString("ImageTool.filter")); //$NON-NLS-1$
      }
    }
    return menu;
  }
}

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

public JMenu getLutShapeMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> lutShapeAction = getAction(ActionW.LUT_SHAPE, ComboItemListener.class);
    if (lutShapeAction.isPresent()) {
      menu = lutShapeAction.get().createUnregisteredRadioMenu(ActionW.LUT_SHAPE.getTitle());
    }
  }
  return menu;
}

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

public JCheckBoxMenuItem getLutInverseMenu(String prop) {
  JCheckBoxMenuItem menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ToggleButtonListener> inverseLutAction = getAction(ActionW.INVERT_LUT, ToggleButtonListener.class);
    if (inverseLutAction.isPresent()) {
      menu = inverseLutAction.get().createUnregiteredJCheckBoxMenuItem(ActionW.INVERT_LUT.getTitle());
    }
  }
  return menu;
}

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

public JCheckBoxMenuItem getLutInverseMenu(String prop) {
  JCheckBoxMenuItem menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ToggleButtonListener> inverseLutAction = getAction(ActionW.INVERT_LUT, ToggleButtonListener.class);
    if (inverseLutAction.isPresent()) {
      menu = inverseLutAction.get().createUnregiteredJCheckBoxMenuItem(ActionW.INVERT_LUT.getTitle());
    }
  }
  return menu;
}

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

public JMenu getLutMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> lutAction = getAction(ActionW.LUT, ComboItemListener.class);
    if (lutAction.isPresent()) {
      menu = lutAction.get().createUnregisteredRadioMenu(Messages.getString("ImageTool.lut"));//$NON-NLS-1$
    }
  }
  return menu;
}

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

public JMenu getFilterMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> filterAction = getAction(ActionW.FILTER, ComboItemListener.class);
    if (filterAction.isPresent()) {
      menu = filterAction.get().createUnregisteredRadioMenu(Messages.getString("ImageTool.filter")); //$NON-NLS-1$
    }
  }
  return menu;
}

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

@Override
public void resetoDefaultValues() {
  sliderWindow.setValue(realValueToslider(1.25));
  sliderLevel.setValue(realValueToslider(1.25));
  sliderScroll.setValue(realValueToslider(0.1));
  sliderRotation.setValue(realValueToslider(0.25));
  sliderZoom.setValue(realValueToslider(0.1));
  comboBoxInterpolation.setSelectedIndex(1);
  // Get the default server configuration and if no value take the default value in parameter.
  EventManager eventManager = EventManager.getInstance();
  eventManager.getOptions().resetProperty(WindowOp.P_APPLY_WL_COLOR, Boolean.TRUE.toString());
  checkBoxWLcolor.setSelected(eventManager.getOptions().getBooleanProperty(WindowOp.P_APPLY_WL_COLOR, true));
  checkBoxLevelInverse.setSelected(eventManager.getOptions().getBooleanProperty(WindowOp.P_INVERSE_LEVEL, true));
  checkBoxApplyPR.setSelected(eventManager.getOptions().getBooleanProperty(PRManager.PR_APPLY, false));
}

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

public ImportToolBar(int index) {
    super(Messages.getString("ImportToolBar.import_img_bar"), index); //$NON-NLS-1$

    if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.import.images", true)) { //$NON-NLS-1$
      AbstractAction action = new AbstractAction() {

        @Override
        public void actionPerformed(ActionEvent e) {
          ViewerFactory.getOpenImageAction(e);
        }
      };
      action.putValue(Action.LARGE_ICON_KEY, new ImageIcon(SeriesViewerFactory.class.getResource("/icon/32x32/img-import.png"))); //$NON-NLS-1$
      final JButton btnImport = new JButton(action);
      btnImport.setToolTipText(Messages.getString("ImportToolBar.open_img")); //$NON-NLS-1$
      add(btnImport);
    }
  }
}

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

public JMenu getSortStackMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> sortStackAction = getAction(ActionW.SORTSTACK, ComboItemListener.class);
    if (sortStackAction.isPresent()) {
      menu =
        sortStackAction.get().createUnregisteredRadioMenu(Messages.getString("View2dContainer.sort_stack")); //$NON-NLS-1$
      Optional<ToggleButtonListener> inverseStackAction =
        getAction(ActionW.INVERSESTACK, ToggleButtonListener.class);
      if (inverseStackAction.isPresent()) {
        menu.add(new JSeparator());
        menu.add(inverseStackAction.get()
          .createUnregiteredJCheckBoxMenuItem(Messages.getString("View2dContainer.inv_stack"))); //$NON-NLS-1$
      }
    }
  }
  return menu;
}

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

public ExportToolBar(int index, DicomExplorer explorer) {
  super(Messages.getString("ExportToolBar.dcm_export_bar"), index); //$NON-NLS-1$
  setAttachedInsertable(explorer);
  
  final DicomModel model = (DicomModel) explorer.getDataExplorerModel();
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty("weasis.export.dicom", true)) { //$NON-NLS-1$
    final JButton btnExport =
      new JButton(new ImageIcon(ExportToolBar.class.getResource("/icon/32x32/dcm-export.png"))); //$NON-NLS-1$
    btnExport.setToolTipText(Messages.getString("ExportToolBar.export_dcm")); //$NON-NLS-1$
    btnExport.addActionListener(e -> ImportToolBar.showAction(ExportToolBar.this, model,
      Messages.getString("LocalExport.local_dev"), true)); //$NON-NLS-1$
    add(btnExport);
  }
}

代码示例来源: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

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

public JMenu getPresetMenu(String prop) {
  JMenu menu = null;
  if (BundleTools.SYSTEM_PREFERENCES.getBooleanProperty(prop, true)) {
    Optional<ComboItemListener> presetAction = getAction(ActionW.PRESET, ComboItemListener.class);
    if (presetAction.isPresent()) {
      menu = presetAction.get().createUnregisteredRadioMenu(Messages.getString("View2dContainer.presets"));//$NON-NLS-1$
      menu.setIcon(ActionW.WINLEVEL.getSmallIcon());
      for (Component mitem : menu.getMenuComponents()) {
        RadioMenuItem ritem = (RadioMenuItem) mitem;
        PresetWindowLevel preset = (PresetWindowLevel) ritem.getUserObject();
        if (preset.getKeyCode() > 0) {
          ritem.setAccelerator(KeyStroke.getKeyStroke(preset.getKeyCode(), 0));
        }
      }
    }
  }
  return menu;
}

相关文章