Package org.xhtmlrenderer.simple.xhtml.controls

Examples of org.xhtmlrenderer.simple.xhtml.controls.CheckControl


    }

    protected Control createSWTControl(FormControl control,
            BasicRenderer parent, LayoutContext c, CalculatedStyle style,
            UserAgentCallback uac) {
        final CheckControl cc = (CheckControl) control;

        final Button button = new Button(parent, (cc.isRadio() ? SWT.RADIO
                : SWT.CHECK));
        button.setText("");
        button.setSelection(cc.isSuccessful());

        button.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                if (!button.getSelection() && cc.isRadio()) {
                    button.setSelection(true);
                } else {
                    cc.setSuccessful(button.getSelection());
                }
            }
        });

        cc.addFormControlListener(new FormControlAdapter() {
            public void successful(FormControl control) {
                button.setSelection(control.isSuccessful());
            }
        });
View Full Code Here


                control = new HiddenControl(form, e);
            } else if (type.equals("button") || type.equals("submit")
                    || type.equals("reset")) {
                control = new ButtonControl(form, e);
            } else if (type.equals("checkbox") || type.equals("radio")) {
                control = new CheckControl(form, e);
            } else {
                return null;
            }
        } else if (name.equals("textarea")) {
            control = new TextControl(form, e);
View Full Code Here

TOP

Related Classes of org.xhtmlrenderer.simple.xhtml.controls.CheckControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.