javax.swing.JComponent.getLocale()方法的使用及代码示例

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

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

JComponent.getLocale介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-reporting

/**
  * Gets the locale of this component.
  *
  * @return this component's locale; if this component does not have a locale, the locale of its parent is returned
  * @throws java.awt.IllegalComponentStateException
  *           if the <code>Component</code> does not have its own locale and has not yet been added to a containment
  *           hierarchy such that the locale can be determined from the containing parent
  * @see #setLocale
  * @since JDK1.1
  */
 public Locale getLocale() {
  try {
   return super.getLocale();
  } catch ( IllegalComponentStateException ice ) {
   return Locale.getDefault();
  }
 }
}

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

/**
 * Gets the localized string from resource bundle. Subclass can override it to provide its own string. Available
 * keys are defined in swing.properties that begin with "Searchable.".
 *
 * @param key the resource string key
 * @return the localized string.
 */
protected String getResourceString(String key) {
  return Resource.getResourceBundle(_component != null ? _component.getLocale() : Locale.getDefault()).getString(key);
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

public Locale getLocale () throws IllegalComponentStateException {
  JComponent view = widget.getScene ().getView ();
  return view != null ? view.getLocale () : Locale.getDefault ();
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

public Locale getLocale () throws IllegalComponentStateException {
  JComponent view = widget.getScene ().getView ();
  return view != null ? view.getLocale () : Locale.getDefault ();
}

代码示例来源:origin: net.java.dev.laf-widget/laf-widget

/**
 * Returns the resource bundle for the specified component.
 * 
 * @param jcomp
 *            Component.
 * @return Resource bundle for the specified component.
 */
public static ResourceBundle getResourceBundle(JComponent jcomp) {
  if (toIgnoreGlobalLocale(jcomp)) {
    return LafWidgetRepository.getLabelBundle(jcomp.getLocale());
  } else {
    return LafWidgetRepository.getLabelBundle();
  }
}

代码示例来源:origin: com.github.insubstantial/substance

/**
 * Returns the resource bundle for the specified component.
 * 
 * @param jcomp
 *            Component.
 * @return Resource bundle for the specified component.
 */
public static ResourceBundle getResourceBundle(JComponent jcomp) {
  if (LafWidgetUtilities.toIgnoreGlobalLocale(jcomp)) {
    return SubstanceLookAndFeel.getLabelBundle(jcomp.getLocale());
  } else {
    return SubstanceLookAndFeel.getLabelBundle();
  }
}

代码示例来源:origin: org.java.net.substance/substance

/**
 * Returns the resource bundle for the specified component.
 * 
 * @param jcomp
 *            Component.
 * @return Resource bundle for the specified component.
 */
public static ResourceBundle getResourceBundle(JComponent jcomp) {
  if (LafWidgetUtilities.toIgnoreGlobalLocale(jcomp)) {
    return SubstanceLookAndFeel.getLabelBundle(jcomp.getLocale());
  } else {
    return SubstanceLookAndFeel.getLabelBundle();
  }
}

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

findBar.setLocale(target.getLocale());
target.putClientProperty(AbstractSearchable.MATCH_HIGHLIGHTER, Boolean.TRUE);
getSharedFindBar().setSearchable(searchable);

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

findBar.setLocale(target.getLocale());
target.putClientProperty(AbstractSearchable.MATCH_HIGHLIGHTER, Boolean.TRUE);
getSharedFindBar().setSearchable(searchable);

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

findBar.setLocale(target.getLocale());
target.putClientProperty(AbstractSearchable.MATCH_HIGHLIGHTER, Boolean.TRUE);
getSharedFindBar().setSearchable(searchable);

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

findBar.setLocale(target.getLocale());
target.putClientProperty(AbstractSearchable.MATCH_HIGHLIGHTER, Boolean.TRUE);
getSharedFindBar().setSearchable(searchable);

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

findBar.setLocale(target.getLocale());
target.putClientProperty(AbstractSearchable.MATCH_HIGHLIGHTER, Boolean.TRUE);
getSharedFindBar().setSearchable(searchable);

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

findDialog.setLocale(target.getLocale());

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

findDialog.setLocale(target.getLocale());

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

findDialog.setLocale(target.getLocale());

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

findDialog.setLocale(target.getLocale());

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

findDialog.setLocale(target.getLocale());

相关文章

JComponent类方法