return instance;
}
public TemplyUI getUI(String type) {
if (type.equals("swing")) {
return new TemplySwingUI();
} else if (type.equals("console")) {
return new TemplyConsoleUI();
} else {
throw new IllegalArgumentException("Unknown ui \"" + type +"\".");
}