gpt4 book ai didi

org.weasis.core.api.gui.util.WinUtil类的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 07:37:05 28 4
gpt4 key购买 nike

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

WinUtil介绍

[英]The Class WinUtil.
[中]WinUtil类。

代码示例

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

public static Window getApplicationWindow() {
  return WinUtil.getParentWindow(UIManager.BASE_AREA);
}

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

public static void centerOnScreen(Component component) {
  Dimension dimension = getScreenSize();
  center(component, 0, 0, dimension.width, dimension.height);
}

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

private static void center(Component component) {
  Container container = component != null ? component.getParent() : null;
  Window window = SwingUtilities.getWindowAncestor(container);
  if (window == null) {
    centerOnScreen(component);
  } else {
    center(component, window);
  }
}

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

centerOnScreen(cp);
  return;
Rectangle screenBounds;
Insets screenInsets;
GraphicsConfiguration gc = getGraphicsDeviceConfig(p);
if (gc != null) {

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

public void resetMaximizedSelectedImagePane(final ViewCanvas<E> viewCanvas) {
  if (grid.getComponentCount() == 1) {
    Dialog fullscreenDialog = WinUtil.getParentDialog(grid);
    if (fullscreenDialog != null
      && fullscreenDialog.getTitle().equals(Messages.getString("ImageViewerPlugin.fullscreen"))) { //$NON-NLS-1$
      maximizedSelectedImagePane(viewCanvas, null);
    }
  }
}

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

ViewerPlugin p = UIManager.VIEWER_PLUGINS.get(i);
  if (p.getDockable().isExternalizable()) {
    Dialog dialog = WinUtil.getParentDialog(p);
    if (dialog != null && screenBound.equals(WinUtil.getClosedScreenBound(dialog.getBounds()))) {
      oldWin = p;
      break;
ConfiguredBackgroundPanel parent = WinUtil.getParentOfClass(oldWin, ConfiguredBackgroundPanel.class);
if (parent == null) {
  return false;

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

Dialog fullscreenDialog = WinUtil.getParentDialog(grid);
  Frame frame = WinUtil.getParentFrame(this);
  fullscreenDialog =
    new JDialog(detachedWindow ? oldDialog : frame, titleDialog, ModalityType.APPLICATION_MODAL);

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

@SuppressWarnings("rawtypes")
protected boolean isDrawActionActive() {
  ViewerPlugin container = WinUtil.getParentOfClass(this, ViewerPlugin.class);
  if (container != null) {
    final ViewerToolBar toolBar = container.getViewerToolBar();
    if (toolBar != null) {
      return toolBar.isCommandActive(ActionW.MEASURE.cmd()) || toolBar.isCommandActive(ActionW.DRAW.cmd());
    }
  }
  return false;
}

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

public static void center(Component component, Point point, Dimension dimension) {
  center(component, point.x, point.y, dimension.width, dimension.height);
}

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

public ScrollPopupMenu(Point screenPt) {
  super();
  scroll = new JScrollPane();
  panelMenus = new JPanel();
  panelMenus.setLayout(new GridLayout(0, 1));
  scroll.setViewportView(panelMenus);
  scroll.setBorder(null);
  GraphicsConfiguration gc = WinUtil.getGraphicsDeviceConfig(screenPt);
  scroll.setMaximumSize(new Dimension(scroll.getMaximumSize().width, this.getToolkit().getScreenSize().height
    - this.getToolkit().getScreenInsets(gc).top - this.getToolkit().getScreenInsets(gc).bottom - 4));
  super.add(scroll);
}

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

if (gd.length > 1) {
  Rectangle bound = WinUtil.getClosedScreenBound(rootPaneContainer.getRootPane().getBounds());

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

Dialog dialog = WinUtil.getParentDialog(this);
if (dialog instanceof DicomImport) {
  DicomImport dcmImport = (DicomImport) dialog;

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

.ifPresent(a -> a.setSelectedItem(MeasureToolBar.selectionGraphic));
ImageViewerPlugin<?> container = WinUtil.getParentOfClass(view.getJComponent(), ImageViewerPlugin.class);
if (container != null) {
  final ViewerToolBar<?> toolBar = container.getViewerToolBar();

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

public static void center(Component component, Component component1) {
  if (component1 == null) {
    center(component);
  } else {
    center(component, component1.getLocation(), component1.getSize());
  }
}

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

if (dicomState.getStatus() != Status.Success && dicomState.getStatus() != Status.Cancel) {
  LOGGER.error("Dicom send error: {}", dicomState.getMessage()); //$NON-NLS-1$
  JOptionPane.showMessageDialog(WinUtil.getParentWindow(AcquirePublishPanel.this),

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

Runnable runnable = () -> {
  try {
    WinUtil.getParentDialog(GeneralSetting.this).setVisible(false);

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

public AcquirePublishPanel() {
  // setBorder(new TitledBorder(null, "Publish", TitledBorder.LEADING, TitledBorder.TOP, null, null));
  publishBtn.addActionListener(e -> {
    final AcquirePublishDialog dialog = new AcquirePublishDialog(AcquirePublishPanel.this);
    JMVUtils.showCenterScreen(dialog, WinUtil.getParentWindow(AcquirePublishPanel.this));
  });
  publishBtn.setPreferredSize(new Dimension(150, 40));
  publishBtn.setFont(FontTools.getFont12Bold());
  add(publishBtn);
  add(progressBar);
  progressBar.setVisible(false);
}

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

Runnable runnable = () -> {
  try {
    Dialog dialog = WinUtil.getParentDialog(GeneralSetting.this);
    UIManager.setLookAndFeel(finalLafClassName);
    SwingUtilities.updateComponentTreeUI(dialog);

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

public ImportPanel(AcquireThumbnailListPane<MediaElement> mainPanel, ImageGroupPane centralPane) {
  this.centralPane = centralPane;
  importBtn.setPreferredSize(new Dimension(150, 40));
  importBtn.setFont(FontTools.getFont12Bold());
  importBtn.addActionListener(e -> {
    List<ImageElement> selected = AcquireManager.toImageElement(mainPanel.getSelectedValuesList());
    if (!selected.isEmpty()) {
      AcquireImportDialog dialog = new AcquireImportDialog(this, selected);
      JMVUtils.showCenterScreen(dialog, WinUtil.getParentWindow(mainPanel));
    }
  });
  add(importBtn);
  add(progressBar);
  progressBar.setVisible(false);
}

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

int response = JOptionPane.showOptionDialog(WinUtil.getParentDialog(this), message, getTitle(),
  JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null);
if (response != 0) {

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