86 Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, |
86 Content heading = HtmlTree.HEADING(HtmlConstants.PROFILE_HEADING, true, |
87 profilesLabel); |
87 profilesLabel); |
88 Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); |
88 Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading); |
89 HtmlTree ul = new HtmlTree(HtmlTag.UL); |
89 HtmlTree ul = new HtmlTree(HtmlTag.UL); |
90 ul.setTitle(profilesLabel); |
90 ul.setTitle(profilesLabel); |
|
91 String profileName; |
91 for (int i = 1; i < profiles.getProfileCount(); i++) { |
92 for (int i = 1; i < profiles.getProfileCount(); i++) { |
92 ul.addContent(getProfile(i)); |
93 profileName = (Profile.lookup(i)).name; |
|
94 // If the profile has valid packages to be documented, add it to the |
|
95 // left-frame generated for profile index. |
|
96 if (configuration.shouldDocumentProfile(profileName)) |
|
97 ul.addContent(getProfile(profileName)); |
93 } |
98 } |
94 div.addContent(ul); |
99 div.addContent(ul); |
95 body.addContent(div); |
100 body.addContent(div); |
96 } |
101 } |
97 |
102 |
98 /** |
103 /** |
99 * Gets each profile name as a separate link. |
104 * Gets each profile name as a separate link. |
100 * |
105 * |
101 * @param profile the profile being documented |
106 * @param profileName the profile being documented |
102 * @return content for the profile link |
107 * @return content for the profile link |
103 */ |
108 */ |
104 protected Content getProfile(int profile) { |
109 protected Content getProfile(String profileName) { |
105 Content profileLinkContent; |
110 Content profileLinkContent; |
106 Content profileLabel; |
111 Content profileLabel; |
107 String profileName = (Profile.lookup(profile)).name; |
|
108 profileLabel = new StringContent(profileName); |
112 profileLabel = new StringContent(profileName); |
109 profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "", |
113 profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "", |
110 "packageListFrame"); |
114 "packageListFrame"); |
111 Content li = HtmlTree.LI(profileLinkContent); |
115 Content li = HtmlTree.LI(profileLinkContent); |
112 return li; |
116 return li; |