javax.swing.text.html.StyleSheet.getStyleNames()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(189)

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

StyleSheet.getStyleNames介绍

暂无

代码示例

代码示例来源:origin: de.huxhorn.sulky/de.huxhorn.sulky.logging

private static void appendStyles(StyleSheet styleSheet, StringBuilder msg)
{
  Enumeration<?> styleNames = styleSheet.getStyleNames();
  while(styleNames.hasMoreElements())
  {
    Object styleName = styleNames.nextElement();
    Style style = styleSheet.getStyle(String.valueOf(styleName));
    msg.append("StyleName: ").append(styleName).append("\nStyle: ").append(style).append("\n\n");
  }
  StyleSheet[] styleSheets = styleSheet.getStyleSheets();
  if(styleSheets != null && styleSheets.length > 0)
  {
    for(int i = 0; i < styleSheets.length; i++)
    {
      msg.append("Child #").append(i).append(':');
      StyleSheet ss = styleSheets[i];
      appendStyles(ss, msg);
    }
  }
}

代码示例来源:origin: huxi/sulky

private static void appendStyles(StyleSheet styleSheet, StringBuilder msg)
{
  Enumeration<?> styleNames = styleSheet.getStyleNames();
  while(styleNames.hasMoreElements())
  {
    Object styleName = styleNames.nextElement();
    Style style = styleSheet.getStyle(String.valueOf(styleName));
    msg.append("StyleName: ").append(styleName).append("\nStyle: ").append(style).append("\n\n");
  }
  StyleSheet[] styleSheets = styleSheet.getStyleSheets();
  if(styleSheets != null && styleSheets.length > 0)
  {
    for(int i = 0; i < styleSheets.length; i++)
    {
      msg.append("Child #").append(i).append(':');
      StyleSheet ss = styleSheets[i];
      appendStyles(ss, msg);
    }
  }
}

代码示例来源:origin: RPTools/maptool

try {
  super.setText("");
  Enumeration<?> snames = style.getStyleNames();
  List<String> styleNames = new ArrayList<String>();

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

private static void updateStyles(final StyleSheet _styles) {
 if (_styles != null) {
  final int font = 12 * BuPreferences.BU.getFontScaling() / 100;
  final Enumeration rules = _styles.getStyleNames();
  while (rules.hasMoreElements()) {
   final String name = (String) rules.nextElement();
   final Style rule = _styles.getStyle(name);
   if (StyleConstants.ALIGN_JUSTIFIED == StyleConstants.getAlignment(rule)) {
    StyleConstants.setAlignment(rule, StyleConstants.ALIGN_LEFT);
   }
   if (StyleConstants.getFontSize(rule) <= font) {
    // FuLog.debug("WBP: font size="+StyleConstants.getFontSize(rule));
    StyleConstants.setFontSize(rule, font);
   }
  }
 }
}

代码示例来源:origin: org.eclipse.scout.rt/org.eclipse.scout.commons

for (Enumeration<?> en = styleSheet.getStyleNames(); en.hasMoreElements();) {
 String nm = (String) en.nextElement();
 Style style = styleSheet.getStyle(nm);

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

private static final void updateStyles(StyleSheet _styles)
{
 if(_styles!=null)
 {
  int FONT=12*BuPreferences.BU.getFontScaling()/100;
  Enumeration rules=_styles.getStyleNames();
  while(rules.hasMoreElements())
  {
 String name=(String)rules.nextElement();
 Style  rule=_styles.getStyle(name);
 
 if(StyleConstants.ALIGN_JUSTIFIED
   ==StyleConstants.getAlignment(rule))
  StyleConstants.setAlignment
   (rule,StyleConstants.ALIGN_LEFT);
 if(StyleConstants.getFontSize(rule)<=FONT)
   {
    //FuLog.debug("WBP: font size="+StyleConstants.getFontSize(rule));
  StyleConstants.setFontSize(rule,FONT);
   }
  }
 }
}

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

System.out.println("-----------STYLESHEET-----------");
System.out.println("Stylesheet Rules");
Enumeration rules = styleSheet.getStyleNames();
while (rules.hasMoreElements()) {
 String ruleName = (String) (rules.nextElement());

代码示例来源:origin: org.eclipse.scout.rt/org.eclipse.scout.commons

for (Enumeration<?> en = styleSheet.getStyleNames(); en.hasMoreElements();) {
 String nm = (String) en.nextElement();
 style = styleSheet.getStyle(nm);

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

ss.removeStyleSheet(as[i]);
Enumeration rules=ss.getStyleNames();
while (rules.hasMoreElements())

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

final Enumeration rules = ss.getStyleNames();
while (rules.hasMoreElements()) {
 final String name = (String) rules.nextElement();

相关文章