javax.swing.JDialog.isDefaultLookAndFeelDecorated()方法的使用及代码示例

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

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

JDialog.isDefaultLookAndFeelDecorated介绍

暂无

代码示例

代码示例来源:origin: datacleaner/DataCleaner

public static JDialog createModalDialog(final Component component, final Window parentWindow, final String title,
    final boolean resizable) {
  final JDialog dialog;
  if (parentWindow instanceof Frame) {
    dialog = new JDialog((Frame) parentWindow, title, true);
  } else if (parentWindow instanceof Dialog) {
    dialog = new JDialog((Dialog) parentWindow, title, true);
  } else {
    throw new UnsupportedOperationException(
        "Cannot create dialog for a component without a frame or dialog parent");
  }
  final Container contentPane = dialog.getContentPane();
  contentPane.setLayout(new BorderLayout());
  contentPane.add(component, BorderLayout.CENTER);
  dialog.setResizable(resizable);
  if (JDialog.isDefaultLookAndFeelDecorated()) {
    final boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
    if (supportsWindowDecorations) {
      dialog.setUndecorated(true);
    }
  }
  dialog.pack();
  dialog.setLocationRelativeTo(parentWindow);
  return dialog;
}

代码示例来源:origin: jpcsp/jpcsp

if (JDialog.isDefaultLookAndFeelDecorated()) {
  if (UIManager.getLookAndFeel().getSupportsWindowDecorations()) {
    dialog.setUndecorated(true);

代码示例来源:origin: EvoSuite/evosuite

protected JDialog createDialog(Component parent) throws HeadlessException {
  FileChooserUI ui = getUI();
  String title = ui.getDialogTitle(this);
  putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY,
      title);
  JDialog dialog;
  Window window = getWindowForComponent(parent);
  if (window instanceof Frame) {
    dialog = new JDialog((Frame)window, title, true);
  } else {
    dialog = new JDialog((Dialog)window, title, true);
  }
  dialog.setComponentOrientation(this.getComponentOrientation());
  Container contentPane = dialog.getContentPane();
  contentPane.setLayout(new BorderLayout());
  contentPane.add(this, BorderLayout.CENTER);
  if (JDialog.isDefaultLookAndFeelDecorated()) {
    boolean supportsWindowDecorations =
        UIManager.getLookAndFeel().getSupportsWindowDecorations();
    if (supportsWindowDecorations) {
      dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);
    }
  }
  dialog.getRootPane().setDefaultButton(ui.getDefaultButton(this));
  dialog.pack();
  dialog.setLocationRelativeTo(parent);
  return dialog;
}

代码示例来源:origin: com.simiacryptus/mindseye-labs

contentPane.add(label, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated()) {
 boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
 if (supportsWindowDecorations) {

代码示例来源:origin: com.simiacryptus/mindseye

contentPane.add(label, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated()) {
 boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
 if (supportsWindowDecorations) {

代码示例来源:origin: com.simiacryptus/mindseye-test

contentPane.add(label, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated()) {
 boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
 if (supportsWindowDecorations) {

代码示例来源:origin: com.googlecode.vfsjfilechooser2/vfsjfilechooser2

contentPane.add(this, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated())

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

contentPane.add(chooser.getComponent(), BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated()) {
  boolean supportsWindowDecorations =
      UIManager.getLookAndFeel().getSupportsWindowDecorations();

代码示例来源:origin: com.jidesoft/jide-oss

contentPane.add(this, BorderLayout.CENTER);
dialog.setResizable(false);
if (JDialog.isDefaultLookAndFeelDecorated()) {
  boolean supportsWindowDecorations =
      UIManager.getLookAndFeel().getSupportsWindowDecorations();

代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core

contentPane.setLayout(new BorderLayout());
contentPane.add(this, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated()) {
 final boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
 if (supportsWindowDecorations) {

代码示例来源:origin: com.fifesoft.rtext/fife.common

rootPane.setDefaultButton(acceptButton);
if (JDialog.isDefaultLookAndFeelDecorated()) {
  boolean supportsWindowDecorations =
    UIManager.getLookAndFeel().getSupportsWindowDecorations();

代码示例来源:origin: net.java.linoleum/application

contentPane.add(this, BorderLayout.CENTER);
if (JDialog.isDefaultLookAndFeelDecorated() && UIManager.getLookAndFeel().getSupportsWindowDecorations()) {
  dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui

if (JDialog.isDefaultLookAndFeelDecorated()) {
 final boolean supportsWindowDecorations = UIManager.getLookAndFeel().getSupportsWindowDecorations();
 if (supportsWindowDecorations) {

相关文章

JDialog类方法