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

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

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

JDialog.setLocale介绍

暂无

代码示例

代码示例来源:origin: eugener/oxbow

/**
 * Sets locale which will be used as dialog's locale
 * @param newLocale null is allowed and will be interpreted as default locale
 */
public void setLocale( final Locale locale ) {
  dlg.setLocale(locale);
}

代码示例来源:origin: org.bidib.org.oxbow/swingbits

/**
 * Sets locale which will be used as dialog's locale
 * 
 * @param newLocale
 *            null is allowed and will be interpreted as default locale
 */
public void setLocale(final Locale locale) {
  dlg.setLocale(locale);
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc} <p>
 * 
 * Overridden to set the content's Locale and then updated
 * this dialog's internal state. <p>
 * 
 * 
 */
@Override
public void setLocale(Locale l) {
  /*
   * NOTE: this is called from super's constructor as one of the
   * first methods (prior to setting the rootPane!). So back out
   * 
   */  
  if (content != null) {
    content.setLocale(l);
    updateLocaleState(l);
  }
  super.setLocale(l);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc} <p>
 * 
 * Overridden to set the content's Locale and then updated
 * this dialog's internal state. <p>
 * 
 * 
 */
@Override
public void setLocale(Locale l) {
  /*
   * NOTE: this is called from super's constructor as one of the
   * first methods (prior to setting the rootPane!). So back out
   * 
   */  
  if (content != null) {
    content.setLocale(l);
    updateLocaleState(l);
  }
  super.setLocale(l);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc} <p>
 * 
 * Overridden to set the content's Locale and then updated
 * this dialog's internal state. <p>
 * 
 * 
 */
@Override
public void setLocale(Locale l) {
  /*
   * NOTE: this is called from super's constructor as one of the
   * first methods (prior to setting the rootPane!). So back out
   * 
   */  
  if (content != null) {
    content.setLocale(l);
    updateLocaleState(l);
  }
  super.setLocale(l);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc} <p>
 * 
 * Overridden to set the content's Locale and then updated
 * this dialog's internal state. <p>
 * 
 * 
 */
@Override
public void setLocale(Locale l) {
  /*
   * NOTE: this is called from super's constructor as one of the
   * first methods (prior to setting the rootPane!). So back out
   * 
   */  
  if (content != null) {
    content.setLocale(l);
    updateLocaleState(l);
  }
  super.setLocale(l);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc} <p>
 * 
 * Overridden to set the content's Locale and then updated
 * this dialog's internal state. <p>
 * 
 * 
 */
@Override
public void setLocale(Locale l) {
  /*
   * NOTE: this is called from super's constructor as one of the
   * first methods (prior to setting the rootPane!). So back out
   * 
   */  
  if (content != null) {
    content.setLocale(l);
    updateLocaleState(l);
  }
  super.setLocale(l);
}

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-dialog

/**
 * Sets the locale of the components of the dialog.
 * <p>
 * <h2>AWT Thread</h2>
 * Should be called in the AWT event dispatch thread.
 * </p>
 *
 * @param locale
 *            the {@link Locale}.
 */
@OnAwt
public void setLocale(Locale locale) {
  approveAction.setLocale(locale);
  restoreAction.setLocale(locale);
  cancelAction.setLocale(locale);
  dialogPanel.setLocale(locale);
  if (dialog != null) {
    dialog.setLocale(locale);
  }
  if (fieldsPanel != null) {
    fieldsPanel.setLocale(locale);
  }
}

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

public static void showErrorMessage(final String shortMessage, final String detailedMessage,
    final Throwable exception) {
  final Throwable presentedException = ErrorUtils.unwrapForPresentation(exception);
  if (exception == null) {
    showErrorMessage(shortMessage, detailedMessage);
    return;
  }
  final String finalDetailedMessage = detailedMessage == null ? "" : detailedMessage;
  final String finalShortMessage = shortMessage == null ? "" : shortMessage;
  final ErrorInfo info = new ErrorInfo(finalShortMessage, finalDetailedMessage, null, "error", presentedException,
      ErrorLevel.SEVERE, null);
  final JXErrorPane errorPane = new JXErrorPane();
  errorPane.setErrorInfo(info);
  final JDialog dialog = JXErrorPane.createDialog(null, errorPane);
  centerOnScreen(dialog);
  JXErrorPane.setDefaultLocale(Locale.ENGLISH);
  dialog.setLocale(Locale.ENGLISH);
  dialog.setModal(true);
  dialog.setTitle(finalShortMessage);
  dialog.setVisible(true);
  dialog.toFront();
}

相关文章

JDialog类方法