📄 3navigation.html
字号:
<tr>
<td bgcolor="white"><nobr><img height="14" width="12" src="images/icons/classdiagramicon.gif" hspace="5"></nobr>类源代码文件</td>
<td bgcolor="white"><nobr><img height="14" width="12" src="images/icons/interfaceicon.gif" hspace="5" alt="Interface symbol" align="top">接口源代码文件</nobr></td>
<td bgcolor="white"><nobr><img height="14" width="12" src="images/icons/packageicon.gif" hspace="5" alt="Package source file">包目录</nobr></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> 在编辑器中打开名为 <b>IMakeCashSale</b>
的接口.</td>
</tr>
</table>
</td>
</tr>
</table>
<p><b>IMakeCashSale.java</b> 在 <b>problem_domain</b> 包中. Explorer
面板将它显示在 Directory 页和 Model 页中.</p>
<p>在 Model 页或 Favorites 页中双击类或接口将在编辑器中打开对应的源代码. 下图显示了如何使用 Explorer 面板的 Model
页在编辑器中跳转到一个方法.</p>
<p><img height="352" width="720" src="images/cashsales/tour3_openmethod.png" hspace="2" vspace="20" alt="Opening source code"></p>
<p>
<hr>
<p class="head3"><a name="integrate"></a>从 Explorer 到 Designer 和 Editor</P>
<p>时序图和类图直接对应于源代码. <b>CashSales</b> 工程演示了这种对应关系.</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> 使用 Designer
面板在编辑器种打开一个文件: 从 <b>Total of Sale</b> 时序图打开 <b>CashSaleDetail.java</b></td>
</tr>
</table>
</td>
</tr>
</table>
<p>我们执行以下步骤, 主窗口将如下图所示:</p>
<ol>
<li>在 Explorer
面板的 Model 页中展开 <b>problem_domain</b> 包.<li>从 Model 页打开 <b>Total of Sale</b>
时序图.<li>如果必要, 调整 Designer 面板中的滚动条滚动到名为 <u><b>aDetail</b></u> 的对象.<li>在 Designer
面板中点击 <u><b>aDetail</b></u> 对象选中它 -- 并察看编辑器.</ol>
<p><img height="444" width="703" src="images/cashsales/tour3_diagexpedit.png" vspace="10" alt="Main window"></p>
<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> 从 <b>Total of Sale</b>
时序图中浏览 <b>CashSale.calcTotal()</b> 方法.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>你可以从时序图中浏览到源代码, 方法是点击一个对象或者点击一个消息. 当你点击一个消息时, 消息的声明部分将在编辑器中高亮度显示.
完整这个操作只需要简单地点击第一个消息即可.</p>
<p></p>
<hr>
<p class="head3"><a name="editortodesigner"></a>从 Editor 到 Designer</p>
<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> 从 Explorer 面板将 <b>POSFrame_AboutBox.java</b>
打开到编辑器中. 然后从编辑器中打开 <b>user_interface</b> 包的模型图.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>这一操作的开始部分很简单, 在 Explorer 面板的 Model 页展开 <b>user_interface</b> 包. 然后双击 <b>POSFrame_AboutBox</b>,
它的源代码将在编辑器中打开.</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor=#bbbbbb>
<tr>
<td bgcolor=#bbbbbb>
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<p>要从 Editor 到 Designer:</p>
<ol>
<li>将光标定位到类名处, 并按鼠标右键.
<li>在菜单中选择 <b>Select in Diagram.</b>
</ol>
<p>Together 将在类图中选择对应的类节点. 如果包含这个类的类图未被打开, Together
将先在 Designer 面板中打开它.</p>
<p>按照上述方法你还可以从 Editor 跳转到类图中的类成员,
区别时将光标定位到方法名或属性名处而不时类名处.</p>
</td>
<td valign="top" bgcolor="white"><img height="325" width="481" src="images/cashsales/tour3_selectindiagram.gif" hspace="10"></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<p></p>
<center>
<div align="left">
<hr>
<p class="head3"><a name="overview"></a>在 Designer 中改变模型图可见区域</p>
</div>
</center>
<center>
<div align="left">
<p>在 Designer 右下角的全图按钮(<img src="images/icons/designerhand.gif" width="16" height="16" border="0" alt="hand icon" hspace="1">)为当前聚焦的整个模型图提供了一种快捷的滚动方式,
模型图可见的部分将显示为阴影.</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> 对
Designer 中最前方的模型图重新定位其可见区域,
使得它的中间部分显示在面板的左上角处. </td>
</tr>
</table>
</td>
</tr>
</table>
<p>你可以通过以下两步重新定位可见区域:</p>
<ol>
<li>点击全图按钮.<li>拖动全图中的阴影部分.</ol>
<p>全图中的阴影部分对应于 Designer 中的可见区域. 可见区域的任何变化都会影响全图中的阴影部分, 反过来也是如此.</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr>
<td bgcolor="#bbbbbb">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<div align="left">
<p>要移动可见区域而不改变其大小, 可以用鼠标拖动它, 如右图所示.</p>
<p>要改变可见区域大小, 点中全图中的阴影部分的右下角并拖动它,
如下图所示.</p>
</div>
<div align="left">
<p><img height="200" width="200" src="images/cashsales/tour3_overviewdrag.png" hspace="5" vspace="5" alt="Overview zoom"></p>
<p>当鼠标在阴影部分移动时光标会变化为:</p>
<ul>
<li><img src="images/icons/arrow_double.gif" width="19" height="19" border="0" hspace="2" alt="icon">
用于移动可见区域<li><img src="images/icons/arrow_single.gif" width="13" height="13" border="0" hspace="2" alt="icon">
用于改变看见区域大小</ul>
</div>
</td>
<td valign="top" bgcolor="white"><img height="322" width="521" src="images/cashsales/tour3_overviewdiagram.png" hspace="5" vspace="5" alt="Overview tab" align="left"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</center>
<p></p>
<center>
<p>
<hr>
<font size="2"><img height="19" width="298" 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="2explorer.html" coords="0,2,96,16" shape="rect"><area href="4customization.html" coords="152,1,208,17" shape="rect"><area href="index.html" coords="216,1,295,17" shape="rect"></map></font>
<div align="left">
<hr>
<p class="footnote">Copyright © 2002 TogetherSoft Corporation. All rights reserved.</p>
<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>
</div>
</center>
<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 + -