langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/script.js
author bpatel
Mon, 19 Nov 2012 16:10:34 -0800
changeset 14549 0599d73bf1da
permissions -rw-r--r--
8002304: Group methods by types in methods summary section Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     1
function show(type)
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     2
{
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     3
    count = 0;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     4
    for (var key in methods) {
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     5
        var row = document.getElementById(key);
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     6
        if ((methods[key] &  type) != 0) {
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     7
            row.style.display = '';
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     8
            row.className = (count++ % 2) ? rowColor : altColor;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
     9
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    10
        else
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    11
            row.style.display = 'none';
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    12
    }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    13
    updateTabs(type);
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    14
}
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    15
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    16
function updateTabs(type)
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    17
{
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    18
    for (var value in tabs) {
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    19
        var sNode = document.getElementById(tabs[value][0]);
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    20
        var spanNode = sNode.firstChild;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    21
        if (value == type) {
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    22
            sNode.className = activeTableTab;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    23
            spanNode.innerHTML = tabs[value][1];
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    24
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    25
        else {
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    26
            sNode.className = tableTab;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    27
            spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    28
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    29
    }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
    30
}