javax.swing.JFrame.setModalExclusionType()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(419)

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

JFrame.setModalExclusionType介绍

暂无

代码示例

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
  public void actionPerformed(ActionEvent e) {
    if (isEnabled()) {
      if (findFrame == null) {
        findFrame = new JFrame(Forms.getLocalizedString("Find"));
        findFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        findFrame.getContentPane().setLayout(new BorderLayout());
        findFrame.getContentPane().add(new GridSearchView(ModelGrid.this), BorderLayout.CENTER);
        findFrame.setIconImage(IconCache.getIcon("16x16/binocular.png").getImage());
        findFrame.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
        findFrame.setAlwaysOnTop(true);
        findFrame.setLocationByPlatform(true);
        findFrame.pack();
      }
      findFrame.setVisible(true);
    }
  }
}

代码示例来源:origin: padreati/rapaio

@Override
  public void draw(Figure figure, int width, int height) {
    @SuppressWarnings("deprecation")
    FigurePanel figurePanel = new FigurePanel(figure);
    JFrame frame = new JFrame("rapaio graphic window");
    frame.setContentPane(figurePanel);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    frame.setLayout(new BorderLayout());
    frame.setExtendedState(Frame.MAXIMIZED_BOTH);
    frame.setAutoRequestFocus(true);
    frame.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);

    frame.setSize(width, height);
    do {
      try {
        Thread.sleep(10);
      } catch (InterruptedException ignored) {
      }
    } while (frame.isVisible());
  }
}

代码示例来源:origin: io.ultreia.gc/gc-api

protected GcApplicationUISupport(Context applicationContext, M model, String title) {
  this.applicationContext = applicationContext;
  this.model = model;
  this.progressPanel = new ProgressPanelUI();
  C config = applicationContext.getConfig();
  this.title = String.format("%s - v%s (build %s : %s) (%%s)", title, config.getBuildVersion(), config.getBuildDate(), config.getBuildNumber());
  frame = new JFrame();
  applyTitle("Utilisateur non connecté");
  frame.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
  frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
  frame.setLayout(new BorderLayout());
  frame.addWindowListener(new WindowAdapter() {
    @Override
    public void windowClosed(WindowEvent e) {
      applicationContext.close();
    }
  });
  contentPanel = createContentPanel(model);
  contentPanel.installActions(applicationContext, model);
  frame.add(contentPanel, BorderLayout.CENTER);
  frame.setMinimumSize(new Dimension(1280, 600));
  frame.setModalExclusionType(Dialog.ModalExclusionType.NO_EXCLUDE);
  frame.setVisible(true);
  frame.add(progressPanel, BorderLayout.SOUTH);
}

代码示例来源:origin: us.ihmc/IHMCAvatarInterfaces

frame.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
frame.setLocationRelativeTo(null);
SwingUtilities.invokeLater(new Runnable()

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

frame.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
frame.setLocationRelativeTo(null);
SwingUtilities.invokeLater(new Runnable()

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

frame.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
frame.setLocationRelativeTo(null);
SwingUtilities.invokeLater(new Runnable()

代码示例来源:origin: net.sf.sf3jswing/kernel-core

frame.setPreferredSize(preferredSize);
frame.setUndecorated(false);
frame.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
frame.pack();
frame.setLocationRelativeTo(parent);

代码示例来源:origin: triplea-game/triplea

ErrorMessage() {
 windowReference.setAlwaysOnTop(true);
 windowReference.setModalExclusionType(Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
 windowReference.addWindowListener(new WindowAdapter() {
  @Override

相关文章

JFrame类方法