private void setHtml(String html) { htmlPane.setText(html); htmlPane.setEditable(false); for (Iterator i = formViewMap.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry)i.next(); Element element = (Element)entry.getKey(); FormView view = (FormView)entry.getValue(); String propertyName = (String)element.getAttributes().getAttribute(HTML.getAttributeKey("id")); if (propertyName != null) { JComponent comp = (JComponent)view.getComponent(); getBindingFactory().bindControl(comp, propertyName); if (comp instanceof JCheckBox) ((JCheckBox)comp).setOpaque(false); } } }
public ViewFactory getViewFactory() { return new HTMLFactory() { public View create(Element elem) { View view = super.create(elem); if (view instanceof FormView) { formViewMap.put(elem, view); } return view; } }; }