OSDN Git Service

Revise API reference templates to make them compatible
authorsmain@google.com <smain@google.com>
Sat, 6 Feb 2016 01:34:22 +0000 (17:34 -0800)
committersmain@google.com <smain@google.com>
Tue, 9 Feb 2016 23:02:51 +0000 (15:02 -0800)
with both DAC and DevSite. Includes a variety of cleanup and redesign.
Now prints method parameters and return values even if not documented in source.
Now prints return value data type.
Now prints method name as heading without arguments, then the full signature below.
New heading styles with more spacing and removed background color.

Change-Id: I7a991df5e8d0d7ac8ff81c20b4b4692e67eb88aa

tools/droiddoc/templates-sdk-dev/assets/css/default.css
tools/droiddoc/templates-sdk-dev/assets/js/docs.js
tools/droiddoc/templates-sdk-dev/body_tag.cs [new file with mode: 0644]
tools/droiddoc/templates-sdk-dev/class.cs
tools/droiddoc/templates-sdk-dev/classes.cs
tools/droiddoc/templates-sdk-dev/footer.cs
tools/droiddoc/templates-sdk-dev/package.cs
tools/droiddoc/templates-sdk-dev/packages.cs
tools/droiddoc/templates-sdk-dev/page_info.cs [new file with mode: 0644]
tools/droiddoc/templates-sdk-dev/trailer.cs

index 7693c43..dd13224 100644 (file)
@@ -224,6 +224,14 @@ h5, h6 {
   margin: 0;
   padding: 4px 0 8px;
 }
+th>h3 {
+  font-size:inherit;
+  line-height:inherit;
+  font-weight:inherit;
+  margin:0;
+  padding:0;
+  color:inherit;
+}
 hr { /* applied to the bottom of h2 elements */
   height: 1px;
   margin: 7px 0 12px;
@@ -291,11 +299,6 @@ pre, code {
   -webkit-font-smoothing: subpixel-antialiased;
   -moz-osx-font-smoothing: auto;
 }
-code {
-  background-color: #f7f7f7;
-  padding: 3px 5px;
-}
-
 legend {
   display: none;
 }
@@ -1680,6 +1683,46 @@ pre {
   border: solid 1px #ddd;
   background: #f7f7f7;
 }
+
+p.package-name {
+  margin:1em 0;
+}
+
+h1.api-title {
+  padding-bottom:0;
+}
+
+h2.api-section {
+  margin: 60px 0 0;
+}
+
+h2.api-section+hr {
+  margin-bottom: 30px;
+}
+
+h3.api-name {
+  margin: 80px 0 12px;
+  padding: 0;
+}
+
+/* remove top padding when this h3 (visibly) follows an h2.
+   This accounts for the variation in structure,
+   including the collapsed mobile headings */
+h2+hr+div>div>a+div>h3.api-name,
+h2+hr+a+div>h3.api-name,
+h2+hr+a+h3.api-name {
+  margin-top: 0;
+}
+
+pre.api-signature,
+code.api-signature {
+  color:inherit;
+  padding:0;
+  margin:1em 0;
+  border:0;
+  background:transparent;
+}
+
 .str { color: #800; } /* Code string */
 .kwd { color: #008; }
 .typ { color: #606; }
@@ -2612,7 +2655,7 @@ div#naMessage div {
   z-index:99;
   width:450px;
   position:fixed;
-  margin:50px 0;
+  margin:80px 0;
   padding:4em 4em 3em;
   background:#FFF;
   border:1px solid #999;
@@ -2877,19 +2920,6 @@ Page-Specific Styles
   padding:0 0 0 4px;
 }
 
-#jd-header {
-  padding: 0 0 12px;
-  margin: 20px 0 12px;
-  font-size:12px;
-  padding-bottom:12px;
-  border-bottom:solid 1px #ccc;
-}
-
-#jd-header h1 {
-  margin:0;
-  padding:0 0 6px 0;
-}
-
 /* not sure if this is needed in the ref docs, disabling for now
 .jd-descr h2 {
   margin:16px 0;
@@ -2910,12 +2940,11 @@ links to summary tables) */
 #api-info-block {
   font-size:12px;
   margin:20px 0 0;
-  padding:0 10px 6px;
   font-weight:normal;
   float:right;
   text-align:right;
   color:#999;
-  max-width:80%;
+  max-width:300px;
   font-size: 12px;
   line-height:14px;
 }
@@ -2930,12 +2959,17 @@ links to summary tables) */
 }
 
 /* inheritance table */
+table.inhtable>tbody>tr>td {
+  padding-left:0;
+}
+table.inhtable>tbody>tr>td div:first-of-type {
+  padding-left:12px;
+}
+
 .jd-inheritance-table {
   border-spacing:0;
-  margin:0;
+  margin:1em 0;
   padding:0;
-  font-size:12px;
-  line-height:14px;
   background-color:transparent;
 }
 .jd-inheritance-table tr td {
@@ -2945,23 +2979,13 @@ links to summary tables) */
   background-color:transparent;
 }
 .jd-inheritance-table .jd-inheritance-space {
-  font-weight:bold;
-  width:1em;
+  width:2em;
 }
 .jd-inheritance-table .jd-inheritance-interface-cell {
   padding-left: 17px;
 }
 
 
-
-.jd-sumtable a {
-  text-decoration:none;
-}
-
-.jd-sumtable a:hover {
-  text-decoration:underline;
-}
-
 /* the link inside a sumtable for "Show All/Hide All" */
 .toggle-all {
   display:block;
@@ -2971,11 +2995,10 @@ links to summary tables) */
 }
 
 /* adjustments for in/direct subclasses tables */
-.jd-sumtable.jd-sumtable-subclasses {
+.jd-sumtable-subclasses {
   margin: 1em 0 0 0;
   max-width:968px;
   background-color:transparent;
-  font-size:13px;
 }
 
 /* extra space between end of method name and open-paren */
@@ -2983,11 +3006,6 @@ links to summary tables) */
   margin-right: 2px;
 }
 
-/* right alignment for the return type in sumtable */
-.jd-sumtable .jd-typecol {
-  text-align:right;
-}
-
 /* adjustments for the expando table-in-table */
 .jd-sumtable-expando {
   margin:.5em 0;
@@ -3008,7 +3026,9 @@ links to summary tables) */
 
 .jd-sumtable-subclasses div#subclasses-direct,
 .jd-sumtable-subclasses div#subclasses-indirect {
-  margin:0 0 0 13px;
+  /* left margin matches width of the toggle image,
+     so this section aligns with the text above */
+  margin:0 0 0 34px;
 }
 
 
@@ -3077,10 +3097,6 @@ body.google h4.jd-details-title {
   padding-top:5px;
   border-top: 1px solid #ccc;
 }
-body.google table.jd-sumtable th {
-  background-color: #FFF;
-  color:#000;
-}
 
 h4.jd-tagtitle {
   padding:0;
@@ -3124,7 +3140,7 @@ div.api-level {
   color:#999;
   float:right;
   padding:0 8px 0;
-  margin-top:-30px;
+  margin-top:-35px;
 }
 
 table.jd-tagtable td,
index e7b62d6..44a3110 100644 (file)
@@ -875,8 +875,7 @@ function changeApiLevel() {
   writeCookie(API_LEVEL_COOKIE, selectedLevel, null);
 
   if (selectedLevel < minLevel) {
-    var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
-    $("#naMessage").show().html("<div><p><strong>This " + thing +
+    $("#naMessage").show().html("<div><p><strong>This API" +
               " requires API level " + minLevel + " or higher.</strong></p>" +
               "<p>This document is hidden because your selected API level for the documentation is " +
               selectedLevel + ". You can change the documentation API level with the selector " +
@@ -1104,13 +1103,13 @@ function toggleInherited(linkObj, expand) {
   if ((expand == null && a.hasClass("closed")) || expand) {
     list.style.display = "none";
     summary.style.display = "block";
-    trigger.src = toRoot + "assets/images/triangle-opened.png";
+    trigger.src = toRoot + "assets/images/styles/disclosure_up.png";
     a.removeClass("closed");
     a.addClass("opened");
   } else if ((expand == null && a.hasClass("opened")) || (expand == false)) {
     list.style.display = "block";
     summary.style.display = "none";
-    trigger.src = toRoot + "assets/images/triangle-closed.png";
+    trigger.src = toRoot + "assets/images/styles/disclosure_down.png";
     a.removeClass("opened");
     a.addClass("closed");
   }
@@ -4379,9 +4378,9 @@ $.fn.scrollIntoView = function(target) {
         selected = navEl.find('> li.guides > a').addClass('selected');
       } else if (body.hasClass('reference')) {
         selected = navEl.find('> li.reference > a').addClass('selected');
-      } else if (body.hasClass('samples')) { 
+      } else if (body.hasClass('samples')) {
         selected = navEl.find('> li.samples > a').addClass('selected');
-      } else if (body.hasClass('downloads')) { 
+      } else if (body.hasClass('downloads')) {
         selected = navEl.find('> li.downloads > a').addClass('selected');
       }
     } else if (body.hasClass('design')) {
@@ -4986,7 +4985,7 @@ window.metadata.search = (function() {
       var noBoundaries = (NO_BOUNDARY_LANGUAGES.indexOf(window.getLangPref()) !== -1);
       var exprBoundary = (!isAsciiOnly && noBoundaries) ? '' : '(?:^|\\s)';
       var queryRegex = new RegExp(exprBoundary + query.toLowerCase(), 'g');
-        
+
       var all = METADATA.all;
       for (var i = 0; i < all.length; i++) {
         // current search comparison, with counters for tag and title,
diff --git a/tools/droiddoc/templates-sdk-dev/body_tag.cs b/tools/droiddoc/templates-sdk-dev/body_tag.cs
new file mode 100644 (file)
index 0000000..5761b71
--- /dev/null
@@ -0,0 +1,15 @@
+<body class="gc-documentation <?cs
+  if:(reference.gms || reference.gcm)
+    ?>google<?cs
+  /if ?><?cs
+  if:(guide||develop||training||reference||tools||sdk)
+    ?>develop<?cs
+    if:reference
+      ?> reference api apilevel-<?cs var:class.since ?><?cs var:package.since ?><?cs
+    /if ?><?cs
+  elif:design
+    ?>design<?cs
+  elif:distribute
+    ?>distribute<?cs
+  /if ?>">
+<div id="doc-api-level" class="<?cs var:class.since ?><?cs var:package.since ?>" style="display:none"></div>
index d8d7236..285ffec 100644 (file)
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A CLASS OR INTERFACE PAGE FROM .java FILES ?>
 <?cs include:"macros.cs" ?>
 <?cs include:"macros_override.cs" ?>
-<html<?cs if:devsite ?> devsite<?cs /if ?>>
-<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
-  <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
-    if:reference ?> reference<?cs
-    /if ?><?cs
-  elif:design ?>design<?cs
-  elif:distribute ?>distribute<?cs
-  /if ?>" itemscope itemtype="http://schema.org/Article">
-  <div id="doc-api-level" class="<?cs var:class.since ?>" style="display:none"></div>
-  <a name="top"></a>
-<?cs include:"header.cs" ?>
-
-<div id="api-info-block">
-
-<?cs # are there inherited members ?>
-<?cs each:cl=class.inherited ?>
-  <?cs if:subcount(cl.methods) ?>
-   <?cs set:inhmethods = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.constants) ?>
-   <?cs set:inhconstants = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.fields) ?>
-   <?cs set:inhfields = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.attrs) ?>
-   <?cs set:inhattrs = #1 ?>
-  <?cs /if ?>
-<?cs /each ?>
-
-<div class="sum-details-links">
-<?cs if:inhattrs || inhconstants || inhfields || inhmethods || (!class.subclasses.hidden &&
-     (subcount(class.subclasses.direct) || subcount(class.subclasses.indirect))) ?>
-Summary:
-<?cs if:subcount(class.inners) ?>
-  <a href="#nestedclasses">Nested Classes</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.attrs) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lattrs">XML Attrs</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhattrs ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhattrs">Inherited XML Attrs</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.enumConstants) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#enumconstants">Enums</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.constants) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#constants">Constants</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhconstants ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhconstants">Inherited Constants</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.fields) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lfields">Fields</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhfields ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhfields">Inherited Fields</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.public) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubctors">Ctors</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.protected) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#proctors">Protected Ctors</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.public) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubmethods">Methods</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.protected) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#promethods">Protected Methods</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhmethods ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhmethods">Inherited Methods</a>
-<?cs /if ?>
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-<?cs /if ?>
-</div><!-- end sum-details-links -->
-<div class="api-level">
-  <?cs call:since_tags(class) ?><?cs
-  if:class.deprecatedsince
-    ?><br>Deprecated since <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels"
-        >API level <?cs var:class.deprecatedsince ?></a><?cs
-  /if ?>
-  <?cs call:federated_refs(class) ?>
-</div>
-</div><!-- end api-info-block -->
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
-    <?cs var:class.scope ?>
-    <?cs var:class.static ?> 
-    <?cs var:class.final ?> 
-    <?cs var:class.abstract ?>
-    <?cs var:class.kind ?>
-<h1 itemprop="name"><?cs var:class.name ?></h1>
-
-<?cs set:colspan = subcount(class.inheritance) ?>
-<?cs each:supr = class.inheritance ?>
-  <?cs if:colspan == 2 ?>
-    extends <?cs call:type_link(supr.short_class) ?><br/>
-  <?cs /if ?>
-  <?cs if:last(supr) && subcount(supr.interfaces) ?>
-      implements 
-      <?cs each:t=supr.interfaces ?>
-        <?cs call:type_link(t) ?> 
-      <?cs /each ?>
-  <?cs /if ?>
-  <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-<?cs call:show_annotations_list(class) ?>
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:class.since ?>">
-<table class="jd-inheritance-table">
-<?cs set:colspan = subcount(class.inheritance) ?>
-<?cs each:supr = class.inheritance ?>
-    <tr>
-        <?cs loop:i = 1, (subcount(class.inheritance)-colspan), 1 ?>
-            <td class="jd-inheritance-space">&nbsp;<?cs if:(subcount(class.inheritance)-colspan) == i ?>&nbsp;&nbsp;&#x21b3;<?cs /if ?></td>
-        <?cs /loop ?>  
-        <td colspan="<?cs var:colspan ?>" class="jd-inheritance-class-cell"><?cs
-            if:colspan == 1
-                ?><?cs call:class_name(class.qualifiedType) ?><?cs 
-            else 
-                ?><?cs call:type_link(supr.class) ?><?cs
-            /if ?></td>
-    </tr>
-    <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-</table>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-
-<?cs if:subcount(class.subclasses.direct) && !class.subclasses.hidden ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
-<?cs call:expandable_class_list("subclasses-direct", class.subclasses.direct, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<?cs if:subcount(class.subclasses.indirect) && !class.subclasses.hidden ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-indirect", "closed") ?>Known Indirect Subclasses
-<?cs call:expandable_class_list("subclasses-indirect", class.subclasses.indirect, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<div class="jd-descr">
-<?cs call:deprecated_warning(class) ?>
-<?cs if:subcount(class.descr) ?>
-<h2>Class Overview</h2>
-<p itemprop="articleBody"><?cs call:tag_list(class.descr) ?></p>
-<?cs /if ?>
-
-<?cs call:see_also_tags(class.seeAlso) ?>
-
-</div><!-- jd-descr -->
-
-
-<?cs # summary macros ?>
-
-<?cs def:write_method_summary(methods, included) ?>
+<?cs
+####################
+# MACRO FUNCTION USED ONLY IN THIS TEMPLATE TO GENERATE API REFERENCE
+# FIRST, THE FUNCTIONS FOR THE SUMMARY AT THE TOP OF THE PAGE
+####################
+?>
+<?cs
+# Prints a comma separated list of parameters with optional line breaks
+?><?cs
+def:parameter_list(params, linebreaks) ?><?cs
+  each:param = params ?><?cs
+      call:simple_type_link(param.type)?> <?cs
+      var:param.name ?><?cs
+      if: name(param)!=subcount(params)-1
+        ?>, <?cs if:linebreaks
+?>
+                <?cs /if ?><?cs
+      /if ?><?cs
+  /each ?><?cs
+/def ?>
+
+<?cs
+# Prints the table cells for the summary of methods.
+?><?cs def:write_method_summary(methods, included) ?>
 <?cs set:count = #1 ?>
 <?cs each:method = methods ?>
-        <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:method.since ?>" >
-        <td class="jd-typecol"><nobr>
-            <?cs var:method.abstract ?>
-            <?cs var:method.final ?>
-            <?cs var:method.static ?>
-            <?cs call:type_link(method.generic) ?>
-            <?cs call:type_link(method.returnType) ?></nobr>
-        </td>
-        <td class="jd-linkcol" width="100%"><nobr>
-        <span class="sympad"><?cs call:cond_link(method.name, toroot, method.href, included) ?></span>(<?cs call:parameter_list(method.params) ?>)</nobr>
-        <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
-        <div class="jd-descrdiv">
-          <?cs call:short_descr(method) ?>
-          <?cs call:show_annotations_list(method) ?>
-        </div>
+  <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+  <tr class="api apilevel-<?cs var:method.since ?>" >
+  <?cs # leave out this cell if there is no return type = if constructors ?>
+  <?cs if:subcount(method.returnType) ?>
+    <td><code>
+        <?cs var:method.abstract ?>
+        <?cs var:method.final ?>
+        <?cs var:method.static ?>
+        <?cs call:type_link(method.generic) ?>
+        <?cs call:type_link(method.returnType) ?></code>
+    </td>
   <?cs /if ?>
-  </td></tr>
-<?cs set:count = count + #1 ?>
+    <td width="100%">
+      <code>
+      <?cs call:cond_link(method.name, toroot, method.href, included) ?>(<?cs call:parameter_list(method.params, 0) ?>)
+      </code>
+      <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
+        <p><?cs call:short_descr(method) ?>
+        <?cs call:show_annotations_list(method) ?></p>
+      <?cs /if ?>
+    </td>
+  </tr>
+  <?cs set:count = count + #1 ?>
 <?cs /each ?>
 <?cs /def ?>
 
-<?cs def:write_field_summary(fields, included) ?>
+<?cs
+# Print the table cells for the summary of fields.
+?><?cs def:write_field_summary(fields, included) ?>
 <?cs set:count = #1 ?>
-    <?cs each:field=fields ?>
-      <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
-          <td class="jd-typecol"><nobr>
-          <?cs var:field.scope ?>
-          <?cs var:field.static ?>
-          <?cs var:field.final ?>
-          <?cs call:type_link(field.type) ?></nobr></td>
-          <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
-          <td class="jd-descrcol" width="100%">
-            <?cs call:short_descr(field) ?>
-            <?cs call:show_annotations_list(field) ?>
-          </td>
-      </tr>
-      <?cs set:count = count + #1 ?>
-    <?cs /each ?>
+<?cs each:field=fields ?>
+  <tr class="api apilevel-<?cs var:field.since ?>" >
+    <td><code>
+    <?cs var:field.scope ?>
+    <?cs var:field.static ?>
+    <?cs var:field.final ?>
+    <?cs call:type_link(field.type) ?></code></td>
+    <td width="100%">
+      <code><?cs call:cond_link(field.name, toroot, field.href, included) ?></code>
+      <p><?cs call:short_descr(field) ?>
+      <?cs call:show_annotations_list(field) ?></p>
+    </td>
+  </tr>
+  <?cs set:count = count + #1 ?>
+<?cs /each ?>
 <?cs /def ?>
 
-<?cs def:write_constant_summary(fields, included) ?>
+<?cs
+# Print the table cells for the summary of constants
+?><?cs def:write_constant_summary(fields, included) ?>
 <?cs set:count = #1 ?>
     <?cs each:field=fields ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
-        <td class="jd-typecol"><?cs call:type_link(field.type) ?></td>
-        <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
-        <td class="jd-descrcol" width="100%">
-          <?cs call:short_descr(field) ?>
-          <?cs call:show_annotations_list(field) ?>
+    <tr class="api apilevel-<?cs var:field.since ?>" >
+        <td><code><?cs call:type_link(field.type) ?></code></td>
+        <td width="100%">
+          <code><?cs call:cond_link(field.name, toroot, field.href, included) ?></code>
+          <p><?cs call:short_descr(field) ?>
+          <?cs call:show_annotations_list(field) ?></p>
         </td>
     </tr>
     <?cs set:count = count + #1 ?>
     <?cs /each ?>
 <?cs /def ?>
 
-<?cs def:write_attr_summary(attrs, included) ?>
+<?cs
+# Print the table cells for the summary of attributes
+?><?cs def:write_attr_summary(attrs, included) ?>
 <?cs set:count = #1 ?>
-    <tr>
-        <td><nobr><em>Attribute Name</em></nobr></td>
-        <td><nobr><em>Related Method</em></nobr></td>
-        <td><nobr><em>Description</em></nobr></td>
-    </tr>
     <?cs each:attr=attrs ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:attr.since ?>" >
-        <td class="jd-linkcol"><?cs if:included ?><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs /if ?><?cs var:attr.name ?><?cs if:included ?></a><?cs /if ?></td>
-        <td class="jd-linkcol"><?cs each:m=attr.methods ?>
-            <?cs call:cond_link(m.name, toroot, m.href, included) ?>
-            <?cs /each ?>
-        </td>
-        <td class="jd-descrcol" width="100%">
+    <tr class="api apilevel-<?cs var:attr.since ?>" >
+        <td><?cs if:included ?><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs /if
+          ?><code><?cs var:attr.name ?></code><?cs if:included ?></a><?cs /if ?></td>
+        <td width="100%">
           <?cs call:short_descr(attr) ?>&nbsp;
           <?cs call:show_annotations_list(attr) ?>
         </td>
@@ -261,30 +108,220 @@ Summary:
     <?cs /each ?>
 <?cs /def ?>
 
-<?cs def:write_inners_summary(classes) ?>
+<?cs
+# Print the table cells for the inner classes
+?><?cs def:write_inners_summary(classes) ?>
 <?cs set:count = #1 ?>
   <?cs each:cl=class.inners ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
-      <td class="jd-typecol"><nobr>
+    <tr class="api apilevel-<?cs var:cl.since ?>" >
+      <td class="jd-typecol"><code>
         <?cs var:cl.scope ?>
-        <?cs var:cl.static ?> 
-        <?cs var:cl.final ?> 
+        <?cs var:cl.static ?>
+        <?cs var:cl.final ?>
         <?cs var:cl.abstract ?>
-        <?cs var:cl.kind ?></nobr></td>
-      <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
+        <?cs var:cl.kind ?></code></td>
       <td class="jd-descrcol" width="100%">
-        <?cs call:short_descr(cl) ?>&nbsp;
-        <?cs call:show_annotations_list(cl) ?>
+        <code><?cs call:type_link(cl.type) ?></code>
+        <p><?cs call:short_descr(cl) ?>&nbsp;
+        <?cs call:show_annotations_list(cl) ?></p>
       </td>
     </tr>
     <?cs set:count = count + #1 ?>
     <?cs /each ?>
 <?cs /def ?>
+<?cs
+###################
+# END OF FUNCTIONS FOR API SUMMARY
+# START OF FUNCTIONS FOR THE API DETAILS
+###################
+?>
+<?cs
+# Print the table cells for the summary of constants
+?>
+<?cs def:write_field_details(fields) ?>
+<?cs each:field=fields ?>
+<?cs # this next line must be exactly like this to be parsed by eclipse ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:field.anchor ?>"></A>
+<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+<div class="api apilevel-<?cs var:field.since ?>">
+    <h3 class="api-name"><?cs var:field.name ?></h3>
+    <div class="api-level">
+      <?cs call:since_tags(field) ?>
+      <?cs call:federated_refs(field) ?>
+    </div>
+<pre class="api-signature no-pretty-print">
+<?cs if:subcount(field.scope) ?><?cs var:field.scope
+?> <?cs /if ?><?cs if:subcount(field.static) ?><?cs var:field.static
+?> <?cs /if ?><?cs if:subcount(field.final) ?><?cs var:field.final
+?> <?cs /if ?><?cs if:subcount(field.type) ?><?cs call:type_link(field.type)
+?> <?cs /if ?><?cs var:field.name ?></pre>
+    <?cs call:show_annotations_list(field) ?>
+    <?cs call:description(field) ?>
+    <?cs if:subcount(field.constantValue) ?>
+      <p>Constant Value:
+      <?cs if:field.constantValue.isString ?>
+          <?cs var:field.constantValue.str ?>
+      <?cs else ?>
+          <?cs var:field.constantValue.dec ?>
+          (<?cs var:field.constantValue.hex ?>)
+      <?cs /if ?>
+    <?cs /if ?>
+</div>
+<?cs /each ?>
+<?cs /def ?>
 
-<?cs # end macros ?>
+<?cs def:write_method_details(methods) ?>
+<?cs each:method=methods ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:method.anchor ?>"></A>
+<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
+<div class="api apilevel-<?cs var:method.since ?>">
+    <h3 class="api-name"><?cs var:method.name ?></h3>
+    <div class="api-level">
+      <div><?cs call:since_tags(method) ?></div>
+      <?cs call:federated_refs(method) ?>
+    </div>
+<pre class="api-signature no-pretty-print">
+<?cs if:subcount(method.scope) ?><?cs var:method.scope
+?> <?cs /if ?><?cs if:subcount(method.static) ?><?cs var:method.static
+?> <?cs /if ?><?cs if:subcount(method.final) ?><?cs var:method.final
+?> <?cs /if ?><?cs if:subcount(method.abstract) ?><?cs var:method.abstract
+?> <?cs /if ?><?cs if:subcount(method.returnType) ?><?cs call:type_link(method.returnType)
+?> <?cs /if ?><?cs var:method.name ?> (<?cs call:parameter_list(method.params, 1) ?>)</pre>
+    <?cs call:show_annotations_list(method) ?>
+    <?cs call:description(method) ?>
+</div>
+<?cs /each ?>
+<?cs /def ?>
+
+<?cs def:write_attr_details(attrs) ?>
+<?cs each:attr=attrs ?>
+<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
+<A NAME="<?cs var:attr.anchor ?>"></A>
+<h3 class="api-name"><?cs var:attr.name ?></h3>
+<?cs call:show_annotations_list(attr) ?>
+<?cs call:description(attr) ?>
+<?cs if:subcount(attr.methods) ?>
+  <p><b>Related methods:</b></p>
+  <ul class="nolist">
+  <?cs each:m=attr.methods ?>
+    <li><a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a></li>
+  <?cs /each ?>
+  </ul>
+<?cs /if ?>
+<?cs /each ?>
+<?cs /def ?>
+<?cs
+#########################
+# END OF MACROS
+# START OF PAGE PRINTING
+#########################
+?>
+<?cs include:"doctype.cs" ?>
+<html<?cs if:devsite ?> devsite<?cs /if ?>>
+<?cs include:"head_tag.cs" ?>
+<?cs include:"body_tag.cs" ?>
+<?cs include:"header.cs" ?>
+<?cs include:"page_info.cs" ?>
+<?cs # This DIV spans the entire document to provide scope for some scripts ?>
+<div class="api apilevel-<?cs var:class.since ?>" id="jd-content">
+<?cs # this next line must be exactly like this to be parsed by eclipse ?>
+<!-- ======== START OF CLASS DATA ======== -->
+<?cs
+#
+# Page header with class name and signature
+#
+?>
+<h1 class="api-title"><?cs var:class.name ?></h1>
+<p>
+<code class="api-signature">
+  <?cs var:class.scope ?>
+  <?cs var:class.static ?>
+  <?cs var:class.final ?>
+  <?cs var:class.abstract ?>
+  <?cs var:class.kind ?>
+  <?cs var:class.name ?>
+</code>
+<br>
+<?cs set:colspan = subcount(class.inheritance) ?>
+<?cs each:supr = class.inheritance ?>
+<code class="api-signature">
+  <?cs if:colspan == 2 ?>
+    extends <?cs call:type_link(supr.short_class) ?>
+  <?cs /if ?>
+  <?cs if:last(supr) && subcount(supr.interfaces) ?>
+      implements
+      <?cs each:t=supr.interfaces ?>
+        <?cs call:type_link(t) ?><?cs
+          if: name(t)!=subcount(supr.interfaces)-1
+            ?>, <?cs /if ?>
+      <?cs /each ?>
+  <?cs /if ?>
+  <?cs set:colspan = colspan-1 ?>
+</code>
+<?cs /each ?>
+</p><?cs
+#
+# Class inheritance tree
+#
+?><table class="jd-inheritance-table">
+<?cs set:colspan = subcount(class.inheritance) ?>
+<?cs each:supr = class.inheritance ?>
+  <tr>
+    <?cs loop:i = 1, (subcount(class.inheritance)-colspan), 1 ?>
+      <td class="jd-inheritance-space">&nbsp;<?cs
+        if:(subcount(class.inheritance)-colspan) == i
+          ?>&nbsp;&nbsp;&#x21b3;<?cs
+        /if ?></td>
+    <?cs /loop ?>
+    <td colspan="<?cs var:colspan ?>" class="jd-inheritance-class-cell"><?cs
+      if:colspan == 1
+          ?><?cs call:class_name(class.qualifiedType) ?><?cs
+      else
+          ?><?cs call:type_link(supr.class) ?><?cs
+      /if ?>
+    </td>
+  </tr>
+  <?cs set:colspan = colspan-1 ?>
+<?cs /each ?>
+</table><?cs
+#
+# Collapsible list of subclasses
+#
+?><?cs
+if:subcount(class.subclasses.direct) && !class.subclasses.hidden ?>
+  <table class="jd-sumtable jd-sumtable-subclasses">
+  <tr><td style="border:none;margin:0;padding:0;">
+    <?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
+    <?cs call:expandable_class_list("subclasses-direct", class.subclasses.direct, "list") ?>
+  </td></tr>
+  </table>
+  <?cs /if ?>
+  <?cs if:subcount(class.subclasses.indirect) && !class.subclasses.hidden ?>
+  <table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="2" style="border:none;margin:0;padding:0;">
+  <?cs call:expando_trigger("subclasses-indirect", "closed") ?>Known Indirect Subclasses
+  <?cs call:expandable_class_list("subclasses-indirect", class.subclasses.indirect, "list") ?>
+  </td></tr></table><?cs
+/if ?>
+<?cs call:show_annotations_list(class) ?>
+<br><hr><?cs
+#
+# The long-form class description.
+#
+?><?cs call:deprecated_warning(class) ?>
+
+<?cs if:subcount(class.descr) ?>
+  <p><?cs call:tag_list(class.descr) ?></p>
+<?cs /if ?>
 
-<div class="jd-descr">
-<?cs # make sure there's a summary view to display ?>
+<?cs call:see_also_tags(class.seeAlso) ?>
+<?cs
+#################
+# CLASS SUMMARY
+#################
+?>
+<?cs # make sure there is a summary view to display ?>
 <?cs if:subcount(class.inners)
      || subcount(class.attrs)
      || inhattrs
@@ -298,19 +335,21 @@ Summary:
      || subcount(class.methods.public)
      || subcount(class.methods.protected)
      || inhmethods ?>
-<h2>Summary</h2>
+<h2 class="api-section">Summary</h2>
 
 <?cs if:subcount(class.inners) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ======== NESTED CLASS SUMMARY ======== -->
-<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
+<table id="nestedclasses" class="responsive">
+<tr><th colspan="2"><h3>Nested classes</h3></th></tr>
 <?cs call:write_inners_summary(class.inners) ?>
 <?cs /if ?>
 
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <?cs if:subcount(class.attrs) ?>
 <!-- =========== FIELD SUMMARY =========== -->
-<table id="lattrs" class="jd-sumtable"><tr><th colspan="12">XML Attributes</th></tr>
+<table id="lattrs" class="responsive">
+<tr><th colspan="2"><h3>XML attributes</h3></th></tr>
 <?cs call:write_attr_summary(class.attrs, 1) ?>
 <?cs /if ?>
 
@@ -318,15 +357,17 @@ Summary:
 <?cs if:inhattrs ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== FIELD SUMMARY =========== -->
-<table id="inhattrs" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited XML Attributes</div></th></tr>
+<table id="inhattrs" class="responsive inhtable">
+<tr><th><h3>Inherited XML attributes</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.attrs) ?>
 <tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-attrs-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+<td colspan="2">
+<?cs call:expando_trigger("inherited-attrs-"+cl.qualified, "closed") ?>From
+<?cs var:cl.kind ?>
+<code>
+  <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+</code>
 <div id="inherited-attrs-<?cs var:cl.qualified ?>">
   <div id="inherited-attrs-<?cs var:cl.qualified ?>-list"
         class="jd-inheritedlinks">
@@ -345,25 +386,27 @@ Summary:
 <?cs if:subcount(class.enumConstants) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="enumconstants" class="jd-sumtable"><tr><th colspan="12">Enum Values</th></tr>
+<table id="enumconstants" class="responsive constants">
+  <tr><th colspan="2"><h3>Enum values</h3></th></tr>
 <?cs set:count = #1 ?>
-    <?cs each:field=class.enumConstants ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
-        <td class="jd-descrcol"><?cs call:type_link(field.type) ?>&nbsp;</td>
-        <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?>&nbsp;</td>
-        <td class="jd-descrcol" width="100%">
-          <?cs call:short_descr(field) ?>&nbsp;
-          <?cs call:show_annotations_list(field) ?>
-        </td>
-    </tr>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
+  <?cs each:field=class.enumConstants ?>
+  <tr class="api apilevel-<?cs var:field.since ?>" >
+    <td><code><?cs call:type_link(field.type) ?></code>&nbsp;</td>
+    <td width="100%">
+      <code><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?></code>
+      <p><?cs call:short_descr(field) ?>&nbsp;
+      <?cs call:show_annotations_list(field) ?></p>
+    </td>
+  </tr>
+  <?cs set:count = count + #1 ?>
+  <?cs /each ?>
 <?cs /if ?>
 
 <?cs if:subcount(class.constants) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
+<table id="constants" class="responsive constants">
+<tr><th colspan="2"><h3>Constants</h3></th></tr>
 <?cs call:write_constant_summary(class.constants, 1) ?>
 </table>
 <?cs /if ?>
@@ -372,25 +415,27 @@ Summary:
 <?cs if:inhconstants ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="inhconstants" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Constants</div></th></tr>
+<table id="inhconstants" class="responsive constants inhtable">
+<tr><th><h3>Inherited constants</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.constants) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-constants-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-constants-<?cs var:cl.qualified ?>">
-  <div id="inherited-constants-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-constants-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_constant_summary(cl.constants, cl.included) ?></table>
+  <tr class="api apilevel-<?cs var:cl.since ?>" >
+  <td>
+  <?cs call:expando_trigger("inherited-constants-"+cl.qualified, "closed") ?>From
+  <?cs var:cl.kind ?>
+  <code>
+    <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+  </code>
+  <div id="inherited-constants-<?cs var:cl.qualified ?>">
+    <div id="inherited-constants-<?cs var:cl.qualified ?>-list"
+          class="jd-inheritedlinks">
+    </div>
+    <div id="inherited-constants-<?cs var:cl.qualified ?>-summary" style="display: none;">
+      <table class="jd-sumtable-expando responsive">
+      <?cs call:write_constant_summary(cl.constants, cl.included) ?></table>
+    </div>
   </div>
-</div>
-</td></tr>
+  </td></tr>
 <?cs /if ?>
 <?cs /each ?>
 </table>
@@ -399,7 +444,8 @@ Summary:
 <?cs if:subcount(class.fields) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
+<table id="lfields" class="responsive properties">
+<tr><th colspan="2"><h3>Fields</h3></th></tr>
 <?cs call:write_field_summary(class.fields, 1) ?>
 </table>
 <?cs /if ?>
@@ -408,25 +454,27 @@ Summary:
 <?cs if:inhfields ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- =========== FIELD SUMMARY =========== -->
-<table id="inhfields" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Fields</div></th></tr>
+<table id="inhfields" class="properties inhtable">
+<tr><th><h3>Inherited fields</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.fields) ?>
-<tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12">
-<?cs call:expando_trigger("inherited-fields-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-fields-<?cs var:cl.qualified ?>">
-  <div id="inherited-fields-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-fields-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_field_summary(cl.fields, cl.included) ?></table>
+  <tr class="api apilevel-<?cs var:cl.since ?>" >
+  <td>
+  <?cs call:expando_trigger("inherited-fields-"+cl.qualified, "closed") ?>From
+  <?cs var:cl.kind ?>
+  <code>
+    <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
+  </code>
+  <div id="inherited-fields-<?cs var:cl.qualified ?>">
+    <div id="inherited-fields-<?cs var:cl.qualified ?>-list"
+          class="jd-inheritedlinks">
+    </div>
+    <div id="inherited-fields-<?cs var:cl.qualified ?>-summary" style="display: none;">
+      <table class="jd-sumtable-expando responsive">
+      <?cs call:write_field_summary(cl.fields, cl.included) ?></table>
+    </div>
   </div>
-</div>
-</td></tr>
+  </td></tr>
 <?cs /if ?>
 <?cs /each ?>
 </table>
@@ -435,7 +483,8 @@ Summary:
 <?cs if:subcount(class.ctors.public) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
+<table id="pubctors" class="responsive constructors">
+<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
 <?cs call:write_method_summary(class.ctors.public, 1) ?>
 </table>
 <?cs /if ?>
@@ -443,7 +492,8 @@ Summary:
 <?cs if:subcount(class.ctors.protected) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="proctors" class="jd-sumtable"><tr><th colspan="12">Protected Constructors</th></tr>
+<table id="proctors" class="responsive constructors">
+<tr><th colspan="2"><h3>Protected constructors</h3></th></tr>
 <?cs call:write_method_summary(class.ctors.protected, 1) ?>
 </table>
 <?cs /if ?>
@@ -451,7 +501,8 @@ Summary:
 <?cs if:subcount(class.methods.public) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
+<table id="pubmethods" class="responsive methods">
+<tr><th colspan="2"><h3>Public methods</h3></th></tr>
 <?cs call:write_method_summary(class.methods.public, 1) ?>
 </table>
 <?cs /if ?>
@@ -459,7 +510,8 @@ Summary:
 <?cs if:subcount(class.methods.protected) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========== METHOD SUMMARY =========== -->
-<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
+<table id="promethods" class="reponsive methods">
+<tr><th colspan="2"><h3>Protected methods</h3></th></tr>
 <?cs call:write_method_summary(class.methods.protected, 1) ?>
 </table>
 <?cs /if ?>
@@ -468,28 +520,31 @@ Summary:
 <?cs if:inhmethods ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Methods</div></th></tr>
+<table id="inhmethods" class="methods inhtable">
+<tr><th><h3>Inherited methods</h3></th></tr>
 <?cs each:cl=class.inherited ?>
 <?cs if:subcount(cl.methods) ?>
 <tr class="api apilevel-<?cs var:cl.since ?>" >
-<td colspan="12"><?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>
-From <?cs var:cl.kind ?>
-<?cs if:cl.included ?>
-  <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
-<?cs elif:cl.federated ?>
-  <a href="<?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
-<?cs else ?>
-  <?cs var:cl.qualified ?>
-<?cs /if ?>
+<td colspan="2">
+<?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>From
+<?cs var:cl.kind ?>
+<code>
+  <?cs if:cl.included ?>
+    <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
+  <?cs elif:cl.federated ?>
+    <a href="<?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
+  <?cs else ?>
+    <?cs var:cl.qualified ?>
+  <?cs /if ?>
+</code>
 <div id="inherited-methods-<?cs var:cl.qualified ?>">
   <div id="inherited-methods-<?cs var:cl.qualified ?>-list"
         class="jd-inheritedlinks">
   </div>
   <div id="inherited-methods-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_method_summary(cl.methods, cl.included) ?></table>
+    <table class="jd-sumtable-expando responsive">
+      <?cs call:write_method_summary(cl.methods, cl.included) ?>
+    </table>
   </div>
 </div>
 </td></tr>
@@ -498,110 +553,16 @@ From <?cs var:cl.kind ?>
 </table>
 <?cs /if ?>
 <?cs /if ?>
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-<?cs def:write_field_details(fields) ?>
-<?cs each:field=fields ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:field.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:field.since ?>"> 
-    <h4 class="jd-details-title">
-      <span class="normal">
-        <?cs var:field.scope ?> 
-        <?cs var:field.static ?> 
-        <?cs var:field.final ?> 
-        <?cs call:type_link(field.type) ?>
-      </span>
-        <?cs var:field.name ?>
-    </h4>
-      <div class="api-level">
-        <?cs call:since_tags(field) ?>
-        <?cs call:federated_refs(field) ?>
-      </div>
-    <div class="jd-details-descr">
-      <?cs call:show_annotations_list(field) ?>
-      <?cs call:description(field) ?>
-    <?cs if:subcount(field.constantValue) ?>
-        <div class="jd-tagdata">
-        <span class="jd-tagtitle">Constant Value: </span>
-        <span>
-            <?cs if:field.constantValue.isString ?>
-                <?cs var:field.constantValue.str ?>
-            <?cs else ?>
-                <?cs var:field.constantValue.dec ?>
-                (<?cs var:field.constantValue.hex ?>)
-            <?cs /if ?>
-        </span>
-        </div>
-    <?cs /if ?>
-    </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_method_details(methods) ?>
-<?cs each:method=methods ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:method.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:method.since ?>"> 
-    <h4 class="jd-details-title">
-      <span class="normal">
-        <?cs var:method.scope ?> 
-        <?cs var:method.static ?> 
-        <?cs var:method.final ?> 
-        <?cs var:method.abstract ?> 
-        <?cs call:type_link(method.returnType) ?>
-      </span>
-      <span class="sympad"><?cs var:method.name ?></span>
-      <span class="normal">(<?cs call:parameter_list(method.params) ?>)</span>
-    </h4>
-      <div class="api-level">
-        <div><?cs call:since_tags(method) ?></div>
-        <?cs call:federated_refs(method) ?>
-      </div>
-    <div class="jd-details-descr">
-      <?cs call:show_annotations_list(method) ?>
-      <?cs call:description(method) ?>
-    </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_attr_details(attrs) ?>
-<?cs each:attr=attrs ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:attr.anchor ?>"></A>
-<div class="jd-details"> 
-    <h4 class="jd-details-title"><?cs var:attr.name ?>
-    </h4>
-    <div class="jd-details-descr">
-        <?cs call:show_annotations_list(attr) ?>
-        <?cs call:description(attr) ?>
-
-        <div class="jd-tagdata">
-            <h5 class="jd-tagtitle">Related Methods</h5>
-            <ul class="nolist">
-            <?cs each:m=attr.methods ?>
-                <li><a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a></li>
-            <?cs /each ?>
-            </ul>
-        </div>
-    </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-
+<?cs
+################
+# CLASS DETAILS
+################
+?>
 <!-- XML Attributes -->
 <?cs if:subcount(class.attrs) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= FIELD DETAIL ======== -->
-<h2>XML Attributes</h2>
+<h2 class="api-section">XML attributes</h2>
 <?cs call:write_attr_details(class.attrs) ?>
 <?cs /if ?>
 
@@ -609,7 +570,7 @@ From <?cs var:cl.kind ?>
 <?cs if:subcount(class.enumConstants) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Enum Values</h2>
+<h2 class="api-section">Enum values</h2>
 <?cs call:write_field_details(class.enumConstants) ?>
 <?cs /if ?>
 
@@ -617,7 +578,7 @@ From <?cs var:cl.kind ?>
 <?cs if:subcount(class.constants) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Constants</h2>
+<h2 class="api-section">Constants</h2>
 <?cs call:write_field_details(class.constants) ?>
 <?cs /if ?>
 
@@ -625,7 +586,7 @@ From <?cs var:cl.kind ?>
 <?cs if:subcount(class.fields) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
+<h2 class="api-section">Fields</h2>
 <?cs call:write_field_details(class.fields) ?>
 <?cs /if ?>
 
@@ -633,7 +594,7 @@ From <?cs var:cl.kind ?>
 <?cs if:subcount(class.ctors.public) ?>
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
+<h2 class="api-section">Public constructors</h2>
 <?cs call:write_method_details(class.ctors.public) ?>
 <?cs /if ?>
 
@@ -641,7 +602,7 @@ From <?cs var:cl.kind ?>
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
 <!-- Protected ctors -->
 <?cs if:subcount(class.ctors.protected) ?>
-<h2>Protected Constructors</h2>
+<h2 class="api-section">Protected constructors</h2>
 <?cs call:write_method_details(class.ctors.protected) ?>
 <?cs /if ?>
 
@@ -649,25 +610,22 @@ From <?cs var:cl.kind ?>
 <!-- ========= METHOD DETAIL ======== -->
 <!-- Public methdos -->
 <?cs if:subcount(class.methods.public) ?>
-<h2>Public Methods</h2>
+<h2 class="api-section">Public methods</h2>
 <?cs call:write_method_details(class.methods.public) ?>
 <?cs /if ?>
 
 <?cs # this next line must be exactly like this to be parsed by eclipse ?>
 <!-- ========= METHOD DETAIL ======== -->
 <?cs if:subcount(class.methods.protected) ?>
-<h2>Protected Methods</h2>
+<h2 class="api-section">Protected methods</h2>
 <?cs call:write_method_details(class.methods.protected) ?>
 <?cs /if ?>
 
 <?cs # the next two lines must be exactly like this to be parsed by eclipse ?>
 <!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-</div> <!-- jd-content -->
 
+</div><!-- end jd-content -->
 <?cs include:"footer.cs" ?>
-
 <?cs include:"trailer.cs" ?>
-
 </body>
 </html>
index 3bdfbea..48be3ef 100644 (file)
@@ -1,32 +1,27 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A LIST OF ALL PACKAGES AND NAMES IT packages.html ?>
 <?cs include:"macros.cs" ?>
 <?cs include:"macros_override.cs" ?>
+<?cs include:"doctype.cs" ?>
 <html<?cs if:devsite ?> devsite<?cs /if ?>>
 <?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
-  <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
-    if:reference ?> reference<?cs
-    /if ?><?cs
-  elif:design ?>design<?cs
-  elif:distribute ?>distribute<?cs
-  /if ?>" itemscope itemtype="http://schema.org/Article">
-  <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
 <?cs include:"header.cs" ?>
 
-<div id="jd-header">
 <h1><?cs var:page.title ?></h1>
-</div>
+<p>These are the API classes. See all
+<a href="packages.html">API packages</a>.</p>
 
-<div id="jd-content">
-<p>These are the Android API classes. See all <a href="packages.html">API packages</a>.</p>
-<div class="jd-letterlist"><?cs each:letter=docs.classes ?>
-    <a href="#letter_<?cs name:letter ?>"><?cs name:letter ?></a>&nbsp;&nbsp;<?cs /each?>
+<div class="jd-letterlist"><?cs
+  each:letter=docs.classes ?>
+    <a href="#letter_<?cs name:letter ?>"><?cs
+      name:letter ?></a>&nbsp;&nbsp;<?cs
+  /each?>
 </div>
 
 <?cs each:letter=docs.classes ?>
 <?cs set:count = #1 ?>
 <h2 id="letter_<?cs name:letter ?>"><?cs name:letter ?></h2>
-<table class="jd-sumtable">
+<table>
     <?cs set:cur_row = #0 ?>
     <?cs each:cl = letter ?>
         <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
 </table>
 <?cs /each ?>
 
-</div><!-- end jd-content -->
-
 <?cs include:"footer.cs" ?>
-
 <?cs include:"trailer.cs" ?>
-
 </body>
 </html>
index 7818301..af34a1a 100644 (file)
@@ -1,3 +1,4 @@
+<?cs # page footer content ?>
 <div class="wrap">
   <div class="dac-footer<?cs if:fullpage ?> dac-landing<?cs /if ?>">
     <div class="cols dac-footer-main">
index 7a834d8..a5f3057 100644 (file)
@@ -1,48 +1,25 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A PACKAGE SUMMARY PAGE FROM EACH package.html FILES
+     # AND NAMES IT package-summary.html ?>
 <?cs include:"macros.cs" ?>
 <?cs include:"macros_override.cs" ?>
+<?cs include:"doctype.cs" ?>
 <html<?cs if:devsite ?> devsite<?cs /if ?>>
 <?cs include:"head_tag.cs" ?>
-
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
-  <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
-    if:reference ?> reference<?cs
-    /if ?><?cs
-  elif:design ?>design<?cs
-  elif:distribute ?>distribute<?cs
-  /if ?>">
-  <div id="doc-api-level" class="<?cs var:package.since ?>" style="display:none"></div>
-  <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
 <?cs include:"header.cs" ?>
+<?cs include:"page_info.cs" ?>
+<div class="api apilevel-<?cs var:package.since ?>" id="jd-content">
 
-<div id="api-info-block">
-<div class="api-level">
-  <?cs call:since_tags(package) ?>
-  <?cs call:federated_refs(package) ?>
-</div>
-</div>
-
-<div id="jd-header">
-  package
-  <h1><?cs var:package.name ?></h1>
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
+<h1><?cs var:package.name ?></h1>
 
 <?cs if:subcount(package.descr) ?>
-  <div class="jd-descr">
-    <?cs call:tag_list(package.descr) ?>
-  </div>
+  <?cs call:tag_list(package.descr) ?>
 <?cs /if ?>
 
 <?cs def:class_table(label, classes) ?>
   <?cs if:subcount(classes) ?>
     <h2><?cs var:label ?></h2>
-    <div class="jd-sumtable">
     <?cs call:class_link_table(classes) ?>
-    </div>
   <?cs /if ?>
 <?cs /def ?>
 
 <?cs call:class_table("Exceptions", package.exceptions) ?>
 <?cs call:class_table("Errors", package.errors) ?>
 
-</div><!-- end jd-content -->
-
+</div><!-- end apilevel -->
 <?cs include:"footer.cs" ?>
-
 <?cs include:"trailer.cs" ?>
-
 </body>
 </html>
index af565dc..5ffd4ce 100644 (file)
@@ -1,31 +1,19 @@
-<?cs include:"doctype.cs" ?>
+<?cs # THIS CREATES A LIST OF ALL PACKAGES AND NAMES IT packages.html ?>
 <?cs include:"macros.cs" ?>
+<?cs include:"doctype.cs" ?>
 <html<?cs if:devsite ?> devsite<?cs /if ?>>
 <?cs include:"head_tag.cs" ?>
-<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
-  <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
-    if:reference ?> reference<?cs
-    /if ?><?cs
-  elif:design ?>design<?cs
-  elif:distribute ?>distribute<?cs
-  /if ?>">
-  <a name="top"></a>
+<?cs include:"body_tag.cs" ?>
 <?cs include:"header.cs" ?>
 
-<div id="jd-header">
 <h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div class="jd-descr">
-<p><?cs call:tag_list(root.descr) ?></p>
-</div>
+<p>These are the API packages.
+See all <a href="classes.html">API classes</a>.</p>
 
 <?cs set:count = #1 ?>
-<table class="jd-sumtable">
+<table>
 <?cs each:pkg = docs.packages ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:pkg.since ?>" >
+    <tr class="api apilevel-<?cs var:pkg.since ?>" >
         <td class="jd-linkcol"><?cs call:package_link(pkg) ?></td>
         <td class="jd-descrcol" width="100%"><?cs call:tag_list(pkg.shortDescr) ?></td>
     </tr>
 <?cs /each ?>
 </table>
 
-</div><!-- end jd-content -->
-
 <?cs include:"footer.cs" ?>
-
 <?cs include:"trailer.cs" ?>
-
 </body>
 </html>
diff --git a/tools/droiddoc/templates-sdk-dev/page_info.cs b/tools/droiddoc/templates-sdk-dev/page_info.cs
new file mode 100644 (file)
index 0000000..fad1274
--- /dev/null
@@ -0,0 +1,109 @@
+<?cs # optional, more info about the page, such as API level and links ?>
+<?cs
+# A modal dialog when API level is set too low for this page
+?><div id="naMessage"></div>
+<?cs
+#
+# If this is a package summary page...
+#
+?><?cs
+if:subcount(package)
+?>
+<div id="api-info-block">
+<div class="api-level">
+  <?cs call:since_tags(package) ?>
+  <?cs call:federated_refs(package) ?>
+</div>
+</div><?cs
+#
+# Or if this is a class page...
+#
+?><?cs
+elif:subcount(class)
+?>
+<div id="api-info-block">
+<div class="api-level">
+  <?cs call:since_tags(class) ?><?cs
+  if:class.deprecatedsince
+    ?><br>Deprecated since <a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html#ApiLevels"
+        >API level <?cs var:class.deprecatedsince ?></a><?cs
+  /if ?>
+  <?cs call:federated_refs(class) ?>
+</div>
+
+<?cs # Set variables about whether there are inherited members; no output ?>
+<?cs each:cl=class.inherited ?>
+  <?cs if:subcount(cl.methods) ?>
+   <?cs set:inhmethods = #1 ?>
+  <?cs /if ?>
+  <?cs if:subcount(cl.constants) ?>
+   <?cs set:inhconstants = #1 ?>
+  <?cs /if ?>
+  <?cs if:subcount(cl.fields) ?>
+   <?cs set:inhfields = #1 ?>
+  <?cs /if ?>
+  <?cs if:subcount(cl.attrs) ?>
+   <?cs set:inhattrs = #1 ?>
+  <?cs /if ?>
+<?cs /each ?>
+
+<div class="sum-details-links">
+<?cs if:inhattrs || inhconstants || inhfields || inhmethods || (!class.subclasses.hidden &&
+     (subcount(class.subclasses.direct) || subcount(class.subclasses.indirect))) ?>
+Summary:
+<?cs if:subcount(class.inners) ?>
+  <a href="#nestedclasses">Nested Classes</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.attrs) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lattrs">XML Attrs</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhattrs ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhattrs">Inherited XML Attrs</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.enumConstants) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#enumconstants">Enums</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.constants) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#constants">Constants</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhconstants ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhconstants">Inherited Constants</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.fields) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lfields">Fields</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhfields ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhfields">Inherited Fields</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.ctors.public) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubctors">Ctors</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.ctors.protected) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#proctors">Protected Ctors</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.methods.public) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubmethods">Methods</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:subcount(class.methods.protected) ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#promethods">Protected Methods</a>
+  <?cs set:linkcount = #1 ?>
+<?cs /if ?>
+<?cs if:inhmethods ?>
+  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhmethods">Inherited Methods</a>
+<?cs /if ?>
+&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
+<?cs /if ?>
+</div><!-- end sum-details-links -->
+</div><!-- end api-info-block --><?cs
+/if ?><?cs # end of if package or class ?>
\ No newline at end of file
index d66ff4b..2050475 100644 (file)
@@ -1,3 +1,7 @@
+<?cs
+# Other, non-visible things needed at the end of the page,
+# because not every page needs footer content, but does need other stuff
+?>
 </div> <!-- end body-content --> <?cs # normally opened by header.cs ?>
 
 <?cs if:carousel ?>