📄 3navigation.html
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Together 简介 -- 3</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);
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>');
}
// -->
</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>
3: 在 Together 中浏览</P>
</div>
<p>Together 是一个强大的架构设计工具, 它时刻保持整个工程的一致性. Explorer 面板永远与实际工程同步.
编辑器中的代码也永远与类图模型同步.</p>
<p>在这一课中, 你将看到 Explorer 面板, Designer 面板和 Editor 面板之间的联系. 你将看到 Designer
面板与 Editor 面板的紧密协作.</p>
<p>我们的讨论将基于 <b>CashSales</b> 示例工程. </p>
<p><b>目录</b>:</p>
<ul>
<li><a class="onPage" href="#openingfiles">通过 Explorer 打开模型图</a><li><a class="onPage" href="#opensource">
通过 Explorer</a> <a class="onPage" href="#opensource">打开源代码文件</a><li><a class="onPage" href="#integrate">
从 Explorer 到 Designer 和 Editor</a><li><a class="onPage" href="#overview">
在 Designer 中改变模型图可见区域</a></ul>
<p><img height="2" width="900" src="images/generic/rainbow2.gif" alt="Divider line"></p>
<p class="head3"><a name="openingfiles"></a>通过 Explorer 打开模型图</p>
<p>每个工程都有一个顶级的缺省模型图. 除非修改过工程属性, 否则第一次打开工程时, 缺省模型图将在 Designer 面板中打开.</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>CashSales</b>
Java 工程中打开 <b>Total of Sale</b> 时序图.</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">只有当工程在 Together
打开时才可以打开其中的模型图.
<p>可以通过主菜单中的 <b>File | Open</b> 项打开模型图.
但更简单的方法是在 Explorer 面板的 Model 页(<img height="14" width="14" src="images/icons/modelicon.gif" hspace="3" alt="Model icon" align="top">)
或 Diagram 页(<img src="images/icons/explorerdiagramicon.gif" width="14" height="14" border="0" align="top" hspace="3">)
中使用以下两种方法之一:</p>
<ul>
<li>在 Explorer 面板中双击模型图的名称或图标. 模型图将在 Designer
面板中打开, 替代当前聚焦的模型图(如果存在的话).<br>
<br>
<i>--或--</i><i><br>
</i><i><br>
</i>
<li>在 Explorer 面板中对模型图点击鼠标右键, 并选择 <nobr><b>Open in New Tab</b></nobr>.
将在 Designer 面板中创建一个新的页打开模型图, 而不会关闭当前聚焦的模型图.</ul>
<p> <b>Total of Sale</b> 时序图在 Diagram 页中处于 <b>Sequence Diagrams</b>
下, 在 Model 页中处于 <b>problem_domain</b> 下.</p>
</td>
<td valign="top" bgcolor="white"><img height="361" width="269" src="images/cashsales/tour3_openinnewtab.gif" alt="Model tab speedmenu"></td>
</tr>
</table>
</td>
</tr>
</table>
<p>存在几种不同的模型图, 不同的模型图对应不同的图标. <img height="12" width="12" src="images/icons/defaultdiagram.gif" hspace="5" alt="default diagram icon" align="top">是缺省模型图的图标. Together
的 UML 模型图图标如下:</p>
<p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor=#cccccc">
<tr>
<td bgcolor="#cccccc">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td bgcolor="white"><nobr><img height="13" width="15" src="images/icons/class3icon.gif" hspace="5" alt="class diagram icon">类图/</nobr>对象<nobr>图</nobr></td>
<td bgcolor="white"><nobr><img height="14" width="16" src="images/icons/seqdiagicon.gif" hspace="5" alt="sequence diagram icon">时序图</nobr></td>
<td bgcolor="white"><nobr><img height="15" width="15" src="images/icons/statecharticon.gif" hspace="5" alt="statechart icon">状态图</nobr></td>
<td bgcolor="white"><nobr><img height="15" width="15" src="images/icons/componentdicon.gif" hspace="5" alt="component diagram icon">组件图</nobr></td>
</tr>
<tr>
<td bgcolor="white"><nobr><img height="15" width="13" src="images/icons/usecaseicon.gif" hspace="5" alt="use case diagram icon">用例图</nobr></td>
<td bgcolor="white"><nobr><img height="15" width="16" src="images/icons/collabicon.gif" hspace="5" alt="collaboration diagram icon">协作图</nobr></td>
<td bgcolor="white"><nobr><img height="15" width="16" src="images/icons/activityicon.gif" hspace="2" vspace="2" alt="activity diagram icon">活动图</nobr></td>
<td bgcolor="white"><nobr><img height="13" width="13" src="images/icons/deployicon.gif" hspace="5" alt="deployment diagram icon">部署图</nobr></td>
</tr>
</table>
</td>
</tr>
</table>
<p>Explorer 面板的 Model 页使用这些图标显示模型图文件. Designer 中打开模型图的页也使用这些图标.</p>
<p>Together 模型图类型有一些特殊之处. 有些用于企业模型或 J2EE 模型.</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>Sale Activity</b>
的活动图. 然后关闭它.</td>
</tr>
</table>
</td>
</tr>
</table>
<p></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">要关闭一个模型图而不关闭整个工程,
需要在 Designer 面板中对应的页点击鼠标右键. 将出现类似右图的菜单.
<p>你也可以模型图的空白区域点击鼠标右键, 并在模型图菜单中选择 <b>Close</b>
来关闭模型图. 或者简单地使用键盘快捷键 <b>Ctrl+F4</b>. </td>
<td valign="top" bgcolor="white"><img height="66" width="171" src="images/cashsales/tour3_closediagram.gif" hspace="10"></td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<hr>
<p class="head3"><a name="opensource"></a>通过 Explorer 打开源代码文件</P>
<p>你可以通过 Explorer 面板的四个页打开文件: Directory 页(<img height="14" width="14" src="images/icons/directoryicon.gif" hspace="2" alt="Directory icon" align="top">), Favorites
页(<img height="11" width="12" src="images/icons/favorites.gif" hspace="2" alt="Favorites icon" align="top">), Model
页(<img height="14" width="14" src="images/icons/modelicon.gif" hspace="2" alt="Model icon" align="top">),
和 Diagram 页(<img height="14" width="14" src="images/icons/explorerdiagramicon.gif" hspace="2" alt="Diagram icon">).</p>
<p>在 Directory 页中, 你可以打开工程文件(<img height="14" width="12" src="images/icons/togprojicon.gif" hspace="2" align="top">)
和文本文件(<img height="14" width="12" src="images/icons/textfileicon.gif" hspace="2" alt="Text file icon" align="top">).
双击一个文本文件将在 Editor 面板中打开它. 相反地, 你可以在工程中创建文件(源代码或模型图), 它也将在 Explorer 面板中显示.</p>
<p>Model 页和 Favorites 页使用以下三中特定的图标:</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="white">
<tr>
<td bgcolor="#cccccc">
<table border="0" cellpadding="5" cellspacing="2">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -