Here you can find the source of resolveAttributes(AttributeSet style)
public static AttributeSet resolveAttributes(AttributeSet style)
//package com.java2s; /*/* www.ja v a 2 s . c o m*/ * This file is part of the Scriba source distribution. This is free, open-source * software. For full licensing information, please see the LicensingInformation file * at the root level of the distribution. * * Copyright (c) 2006-2007 Kobrix Software, Inc. */ import java.util.Enumeration; import javax.swing.text.AttributeSet; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; public class Main { public static AttributeSet resolveAttributes(AttributeSet style) { SimpleAttributeSet set = new SimpleAttributeSet(); if (style != null) { Enumeration<?> names = style.getAttributeNames(); Object value; Object key; while (names.hasMoreElements()) { key = names.nextElement(); // System.out.println("Util resolveAttributes key=" + key); value = style.getAttribute(key); // System.out.println("Util resolveAttributes value=" + value); if ((!key.equals(StyleConstants.NameAttribute)) && (!key.equals(StyleConstants.ResolveAttribute)) && (!key.equals(AttributeSet.ResolveAttribute)) && (!key.equals(AttributeSet.NameAttribute))) { set.addAttribute(key, value); } else { if (key.equals(StyleConstants.ResolveAttribute) || key.equals(AttributeSet.ResolveAttribute)) { // System.out.println("Util resolveAttributes resolving // key=" + key); set.addAttributes(resolveAttributes((AttributeSet) value)); } } } } return set; } }