📄 9docgen.html
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Together Tutorial -- Part 9</title>
<script language="JavaScript"><!--
function doExerciseWindow(questionURL, col, row, topPercent)
{
var wf = "";
wf = wf + "width=" + col;
wf = wf + ",height=" + row;
wf = wf + ",resizable=yes";
wf = wf + ",scrollbars=yes";
wf = wf + ",menubar=no";
wf = wf + ",toolbar=no";
wf = wf + ",directories=no";
wf = wf + ",location=no";
wf = wf + ",status=no";
var n = window.open("",
"questionWindow",
wf);
//"toolbar=no,width=500,height=500");
//windowFeatures);
// "toolbar=no,width=" + col + ",height=" + row);
// n.move(0,0);
var framesetString = '<FRAMESET ROWS="';
framesetString = framesetString + topPercent;
framesetString = framesetString + '%,*" frameborder=0 framespacing=2 border=0>';
n.document.write(framesetString);
n.document.write('<frame src="' + questionURL +'" name="question">');
n.document.write('<frame src="blankpage.html" name="answer">');
n.document.write('</frameset>');
n.document.write('<noframes> <body> </body> </noframes>');
n.move(0,0);
}
// -->
</script>
<link href="tutor.css" rel="styleSheet" type="text/css">
</head>
<body bgcolor="white" link="#003399" alink="#999999" vlink="#000066">
<div align="left">
<p class="head2">
<span style="font-size: 9pt">
<a href="mailto:%20e.w@263.net">翻译: 李颖(e.w@263.net)</a></span></p>
</div>
<div align="center">
<p class="head2"><a name="top"></a>Together 教程<br>9: 文档生成</p>
</div>
<p><b>自描述文档代码</b>似乎是一种自相矛盾的说法. 但是使用 Together, 自描述文档工程已经成为现实. Together
可以生成文档 -- 所有类型的文档, 从 HTML 到 RTF 到 PDF. 文档完全是超链接的, 以便显示工程中的对象关系.
对于需要定制特定格式文档的用户, Together 提供了功能强大的文档设计器.</p>
<p>在这一课中你将学习如何生成文档. 我们的讨论很简短, 部分原因是因为生成文档是非常简单的.</p>
<p><b>目录:</b></p>
<ul>
<li><a class="onPage" href="#html">生成 HTML 文档</a><li><a class="onPage" href="#rtf">
生成 RTF 格式文档</a><li><a class="onPage" href="#anchor">技巧</a></ul>
<p></p>
<p><img height="2" width="900" src="images/generic/rainbow2.gif" alt="Divider line"></p>
<p class="head3"><a name="html"></a>生成 HTML 文档</p>
<p>Together 使用代码中的 Javadoc 注释来跟踪模型和模型元素的属性. 这些 Javadoc 注释也用来创建文档. </p>
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>操作步骤:</b> 为整个 <b>airline</b>
工程生成 HTML 文档.</td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#CCCCCC">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<p>生成 HTML 文档是很简单的. <nobr>从主菜单中选择 <b>Project | Documentation | Generate HTML</b></nobr>
. </p>
<p>在对话框中, 将范围设置为 <b>All</b> 并确认所有的选项都设置被选中.</p>
<p>使用对话框底部的 Options 按钮, 你可以指定很多设置:</p>
<ol>
<li>包含或不包含标题标记信息(作者, 版本等等.)
<li>特定的 HTML 选项(窗口标题, 风格等等.)
<li>文档中显示类的可见度级别</ol>
<p></p>
<p></p>
</td>
<td valign="top" bgcolor="white">
<p><img src="images/airline/pro9_htmldocgendialog.png" width="506" height="348" border="0" alt="Generate HTML dialog" hspace="5"></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<p>下图是生成的文档. 浏览器将文档显示为三个框架. 顶部框架是模型图. 左下框架是一个包含 explorer 页和 overview 页的
applet. 右下是书写的文档.</p>
<p><img src="images/airline/pro9_htmldocbrowser.png" width="678" height="600" border="0" alt="Documentation in browser" hspace="10" vspace="10"></p>
<p>Together 生成的 HTML 文档是完全超链接的. 顶部框架是图像映射的. 点击一个方法, 类
或关联都会在右下框架中显示出它们的描述文档. 移动 Overview 页中的矩形将对应的移动模型图图像; 点击 Project
页中的元素将在右边显示它的文档.</p>
<p></p>
<hr>
<p class="head3"><a name="rtf"></a>生成 RTF 格式文档</p>
<p>Together 可以生成几种格式的文档: text, HTML, PDF, 和 RTF.</p>
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>操作步骤:</b> 为整个 <b>airline</b>
工程生成 RTF 文档.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Together 有一个 RTF 文档的模板, 可以通过主菜单访问:</p>
<dl>
<dd><b>Project </b><nobr><b>| Documentation | Generate using Template</b>. </nobr>
</dl>
<p>对话框类似下图.</p>
<p><img src="images/airline/pro9_rtfdocdialog.png" width="739" height="307" border="0" alt="Generate doc dialog" hspace="5"></p>
<p>下面是 Together 为我们生成的 RTF 文档(共27页)中的最开始部分. 文档目录超链接到对应的小节.</p>
<p><img src="images/airline/pro9_rtfword.png" width="766" height="330" border="1" alt="RTF doc file" hspace="10" vspace="10"></p>
<p></p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#CCCCCC">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<p>Together ControlCenter l允许你创建自己的文档模板. 请看主菜单中的 <b>Project </b><nobr><b>| Documentation | Design Template</b>. </nobr></p>
<p>右图是文档设计器中新建立的模板. </p>
<p>使用文档设计器, 你可以指定页眉, 页脚以及文档内部的组织. </p>
<p></p>
</td>
<td valign="top" bgcolor="white">
<p><img src="images/airline/pro9_docdesign.png" width="464" height="350" border="0" alt="Documentation designer" hspace="5"></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>操作步骤:</b> 如果你有 Together ControlCenter,
为整个 <b>airline</b> 工程生成 PDF 文档.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>从主菜单中选择<nobr> </nobr><b><nobr>File |</nobr></b><nobr><b> Print Documentation</b></nobr>,
将会弹出一个对话框以便创建 PDF 文件. 对话框中包含一个很方便的预览按钮.</p>
<p></p>
<hr>
<p class="head3"><a name="anchor"></a>技巧</p>
<ul>
<li>Together 使用属性察看器中的很多项目来生成文档.<li>当你需要选择文件或文件夹时, Together 将显示"选择文件夹"
图标(<img src="images/icons/openfoldericon.png" width="14" height="16" border="0" hspace="1" align="top">).
点击它可以访问文件系统.<li>超链接并不只限于 HTML 文档. 它也时 RTF 文档的组成部分.<li>
单独被打印的模型图也是文档的一种. 你可以修改模型图设置以便察看分页位置. 在设置窗口中点击模型图, 然后选中 <b><nobr>Show page borders</nobr></b>.
如果在模型图右键菜单中选择 <b><nobr>Layout | All for Printing</nobr></b>, Together
将自动排列模型图元素, 同时尽量避免元素被分割到不同的打印页中</ul>
<p>.</p>
<div align="center">
<hr>
<img height="19" width="297" src="images/generic/nvbuttons.gif" vspace="10" alt="Navigation bar" usemap="#nvbuttonsb601029d" border="0"><map name="nvbuttonsb601029d"><area href="#top" coords="101,2,146,17" shape="rect"><area href="8sequencediagrams.html" coords="0,2,96,16" shape="rect"><area href="10qualityassurance.html" coords="152,1,208,17" shape="rect"><area href="index.html" coords="216,1,295,17" shape="rect"></map>
<hr>
</div>
<div align="left">
<p class="footnote">Copyright © 2002 TogetherSoft Corporation. All rights reserved.</p>
</div>
<p class="footnote"><font color="#666666">Last Revised: </font><csobj w="88" h="12" t="DateTime" format="MedDate" region="0">Fri, Mar 8, 2002</csobj>
<p class="footnote">
<span style="font-size: 9pt">
<a href="mailto:%20e.w@263.net">翻译: 李颖(e.w@263.net)</a></span></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -