group = (HashMap) style.getGroup(groupName);
group = style.getGroup(groupName);
	private void processStyle(Style style, ArrayList codeList, StyleSheet styleSheet, Device device) {		String styleName = style.getStyleName();		//System.out.println("processing style " + name + ": " + style.toString() );		// create a new style:		codeList.add( STANDALONE_MODIFIER + "Style " + styleName + "Style = new Style (");		// process the margins:		HashMap group = style.removeGroup("margin");		if ( group != null ) {			processFields( 0, false, group, "margin", style, codeList, styleSheet, device );		} else {			codeList.add("\t\t0,0,0,0,\t// default margin");		}		// process the paddings:		group = style.removeGroup("padding");		if ( group != null ) {			processFields( 1, true, group, "padding", style, codeList, styleSheet, device );		} else {			codeList.add("\t\t1,1,1,1,1,1,\t// default padding");		}		// process the layout:		group = style.removeGroup("layout");		if ( group != null ) {			processLayout( group, style, codeList, styleSheet );		} else {			codeList.add("\t\tItem.LAYOUT_DEFAULT,\t// default layout");		}		// process the content-font:		group = style.removeGroup("font");		if ( group != null ) {			processFont( group, "font", style, codeList, styleSheet, false );		} else {			codeList.add("\t\tdefaultFontColor,\t// font-color is not defined");			codeList.add("\t\tdefaultFont,");		}		// process the label-font:		group = style.removeGroup("label");		if ( group != null ) {			processLabel( group, "label", style, codeList, styleSheet, false );		} else {			codeList.add("\t\tdefaultLabelColor,\t// label-color is not defined");			codeList.add("\t\tdefaultLabel,");		}		// process the background:		group = style.removeGroup("background");		if ( group != null ) {			processBackground( style.getSelector(), group, style, codeList, styleSheet, false );		} else {			codeList.add("\t\tnull,\t// no background");		}		// process the background:		group = style.removeGroup("border");		if ( group != null ) {			processBorder( style.getSelector(), group, style, codeList, styleSheet, false );		} else {			codeList.add("\t\tnull\t// no border");		}		// add the URL of the before-image but only when at least one before-element has been defined:		if (styleSheet.containsBeforeStyle()) {			group = style.removeGroup("before");			if (group != null) {				codeList.add("\t\t, \"" + getUrl( (String) group.get("before") ) + "\" // URL of the before element" );											} else {				codeList.add("\t\t, null\t// no before element has been defined");							}		}		// add the URL of the after-image but only when at least one after-element has been defined:		if (styleSheet.containsAfterStyle()) {			group = style.removeGroup("after");			if (group != null) {				codeList.add("\t\t, \"" + getUrl( (String) group.get("after") ) + "\"\t// URL of the after element" );											} else {				codeList.add("\t\t, null\t// no after element has been defined");							}		}		// add the selector of the style, but only when dynamic styles are used:		if (styleSheet.containsDynamicStyles()) {			codeList.add("\t\t, \"" + style.getSelector() + "\"\t// the selector of this style");		}		// close the style definition:		codeList.add("\t);");				// now add all additional non standard-properties:		String[] groupNames = style.getGroupNames();		if (groupNames.length > 0) {			codeList.add("\tstatic {");			for (int i = 0; i < groupNames.length; i++) {				String groupName = groupNames[i];				group = (HashMap) style.getGroup(groupName);				if (group == null) {					System.err.println("unable to get group [" + groupName + "] of style : " + style.toString());				}				Set keys = group.keySet();				for (Iterator iter = keys.iterator(); iter.hasNext();) {					StringBuffer line = new StringBuffer();					line.append("\t\t")						.append( styleName )						.append("Style.addProperty( \"" );					String key = (String) iter.next();					if (key.equals(groupName)) {						line.append( groupName );					} else {						line.append( groupName )							.append("-")							.append(key);					}					String value = (String) group.get( key );					if (key.endsWith("style")) {						value = getStyleReference( value, style, styleSheet );					} else if (key.endsWith("color")) {						value = getColor( value );					} else if (key.equals("url")) {						value = getUrl( value );					}					if (value.startsWith("url")) {						value = getUrl( value );					} else if (value.startsWith("style(")) {						value = getStyleReference( value, style, styleSheet );					}					line.append("\", \"")						.append( value )						.append("\" );");					codeList.add( line.toString() );				}			}			codeList.add("\t}");		} // if there are any non-standard attribute-groups			}