All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.doc.markdown.html.YumlPlugin Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.doc.markdown.html;

import java.util.List;
import java.util.Map;

import panda.doc.markdown.Plugin;

public class YumlPlugin extends Plugin {

	public YumlPlugin() {
		super("yuml");
	}

	@Override
	public void emit(final StringBuilder out, final List lines, final Map params) {
		StringBuilder sb2 = new StringBuilder();
		for (String line : lines) {
			line = line.trim();
			if (line.length() > 0) {
				if (sb2.length() > 0) {
					sb2.append(", ");
				}
				sb2.append(line);
			}
		}
		
		String type = params.get("type");
		if (type == null) {
			type = "class";
		}
		String style = params.get("style");
		if (style == null) {
			style = "scruffy";
		}
		String dir = params.get("dir");
		if (dir != null) {
			style = style + ";dir:" + dir + ";";
		}
		String scale = params.get("scale");
		if (scale != null) {
			style = style + ";scale:" + scale + ";";
		}

		out.append("");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy