1 /* |
1 /* |
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
949 Content li = HtmlTree.LI(contents.moduleSubNavLabel); |
949 Content li = HtmlTree.LI(contents.moduleSubNavLabel); |
950 li.addContent(Contents.SPACE); |
950 li.addContent(Contents.SPACE); |
951 Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); |
951 Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li); |
952 Content liNav = new HtmlTree(HtmlTag.LI); |
952 Content liNav = new HtmlTree(HtmlTag.LI); |
953 liNav.addContent(!utils.getFullBody(mdle).isEmpty() && !configuration.nocomment |
953 liNav.addContent(!utils.getFullBody(mdle).isEmpty() && !configuration.nocomment |
954 ? Links.createLink(SectionName.MODULE_DESCRIPTION, contents.navModuleDescription) |
954 ? links.createLink(SectionName.MODULE_DESCRIPTION, contents.navModuleDescription) |
955 : contents.navModuleDescription); |
955 : contents.navModuleDescription); |
956 addNavGap(liNav); |
956 addNavGap(liNav); |
957 liNav.addContent((display(requires) || display(indirectModules)) |
957 liNav.addContent((display(requires) || display(indirectModules)) |
958 ? Links.createLink(SectionName.MODULES, contents.navModules) |
958 ? links.createLink(SectionName.MODULES, contents.navModules) |
959 : contents.navModules); |
959 : contents.navModules); |
960 addNavGap(liNav); |
960 addNavGap(liNav); |
961 liNav.addContent((display(packages) |
961 liNav.addContent((display(packages) |
962 || display(indirectPackages) || display(indirectOpenPackages)) |
962 || display(indirectPackages) || display(indirectOpenPackages)) |
963 ? Links.createLink(SectionName.PACKAGES, contents.navPackages) |
963 ? links.createLink(SectionName.PACKAGES, contents.navPackages) |
964 : contents.navPackages); |
964 : contents.navPackages); |
965 addNavGap(liNav); |
965 addNavGap(liNav); |
966 liNav.addContent((displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees)) |
966 liNav.addContent((displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees)) |
967 ? Links.createLink(SectionName.SERVICES, contents.navServices) |
967 ? links.createLink(SectionName.SERVICES, contents.navServices) |
968 : contents.navServices); |
968 : contents.navServices); |
969 ulNav.addContent(liNav); |
969 ulNav.addContent(liNav); |
970 return ulNav; |
970 return ulNav; |
971 } |
971 } |
972 |
972 |
1054 public Content getNavLinkPrevious() { |
1054 public Content getNavLinkPrevious() { |
1055 Content li; |
1055 Content li; |
1056 if (prevModule == null) { |
1056 if (prevModule == null) { |
1057 li = HtmlTree.LI(contents.prevModuleLabel); |
1057 li = HtmlTree.LI(contents.prevModuleLabel); |
1058 } else { |
1058 } else { |
1059 li = HtmlTree.LI(Links.createLink(pathToRoot.resolve(DocPaths.moduleSummary( |
1059 li = HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.moduleSummary( |
1060 prevModule)), contents.prevModuleLabel, "", "")); |
1060 prevModule)), contents.prevModuleLabel, "", "")); |
1061 } |
1061 } |
1062 return li; |
1062 return li; |
1063 } |
1063 } |
1064 |
1064 |
1071 public Content getNavLinkNext() { |
1071 public Content getNavLinkNext() { |
1072 Content li; |
1072 Content li; |
1073 if (nextModule == null) { |
1073 if (nextModule == null) { |
1074 li = HtmlTree.LI(contents.nextModuleLabel); |
1074 li = HtmlTree.LI(contents.nextModuleLabel); |
1075 } else { |
1075 } else { |
1076 li = HtmlTree.LI(Links.createLink(pathToRoot.resolve(DocPaths.moduleSummary( |
1076 li = HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.moduleSummary( |
1077 nextModule)), contents.nextModuleLabel, "", "")); |
1077 nextModule)), contents.nextModuleLabel, "", "")); |
1078 } |
1078 } |
1079 return li; |
1079 return li; |
1080 } |
1080 } |
1081 } |
1081 } |