Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.temp.client.foundation.widget.table.cell;

import com.google.gwt.cell.client.*;

public abstract class DisableableRadioCell extends AbstractDisableableBooleanEditableCell {
    /**
     * Construct a new {@link CheckboxCell}.
     */
    public DisableableRadioCell( String name ) {
        this( name, false );
    }

    /**
     * Construct a new {@link CheckboxCell} that optionally controls selection.
     *
     * @param isSelectBox true if the cell controls the selection state
     */
    public DisableableRadioCell( String name, boolean isSelectBox ) {
        this( name, isSelectBox, isSelectBox );
    }

    /**
     * Construct a new {@link CheckboxCell} that optionally controls selection.
     *
     * @param dependsOnSelection true if the cell depends on the selection state
     * @param handlesSelection   true if the cell modifies the selection state
     */
    public DisableableRadioCell( String name, boolean dependsOnSelection, boolean handlesSelection ) {
        super( dependsOnSelection, handlesSelection, new CellHtmlProvider( //
                                                                           radioButton( name, false, true ), //
                                                                           radioButton( name, false, false ), //
                                                                           radioButton( name, true, true ), //
                                                                           radioButton( name, true, false ) ) );
    }

    private static String radioButton( String name, boolean disabled, boolean checked ) {
        String rv = "<input type='radio' tabindex='-1' name='" + name + "'";
        if ( disabled ) {
            rv += " disabled='disabled'";
        }
        if ( checked ) {
            rv += " checked";
        }
        return rv + "/>";
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/table/cell/DisableableRadioCell.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

626 GeorgeS picture GeorgeS Wed 11 Apr, 2012 19:39:41 +0000