Java 类javax.swing.text.html.FormView 实例源码

项目:spring-rich-client    文件:HtmlFormBuilder.java   
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);
        }
    }
}
项目:spring-richclient    文件:HtmlFormBuilder.java   
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);
        }
    }
}
项目:spring-rich-client    文件:HtmlFormBuilder.java   
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;
        }
    };
}
项目:spring-richclient    文件:HtmlFormBuilder.java   
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;
        }
    };
}