⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 documentview.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
 JPopupMenu menu = docView.getCustomPopupMenu(); System.out.println(menu); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getNormalView()"><!-- --></A><H3>
getNormalView</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/view/NormalView.html" title="application.workbooks.workbook.documents.document.view 中的类">NormalView</A> <B>getNormalView</B>()</PRE>
<DL>
<DD>返回普通视图。调用此方法时视图将切换至普通视图。
<P>
<DD><DL>

<DT><B>返回:</B><DD>普通视图 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); DocumentView docView = doc.getDocumentView(); NormalView normalView = docView.getNormalView(); System.out.println("得到当前文档视图的类型是:"+normalView.getViewType()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getOutlineView()"><!-- --></A><H3>
getOutlineView</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/view/OutlineView.html" title="application.workbooks.workbook.documents.document.view 中的类">OutlineView</A> <B>getOutlineView</B>()</PRE>
<DL>
<DD>返回大纲视图。调用此方法时视图将切换至大纲视图。
<P>
<DD><DL>

<DT><B>返回:</B><DD>大纲视图 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); DocumentView docView = doc.getDocumentView(); OutlineView outlineView = docView.getOutlineView(); System.out.println("得到当前文档视图的类型是:"+outlineView.getViewType()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getPageView()"><!-- --></A><H3>
getPageView</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/view/PageView.html" title="application.workbooks.workbook.documents.document.view 中的类">PageView</A> <B>getPageView</B>()</PRE>
<DL>
<DD>返回页面视图。调用此方法时视图将切换至页面视图。
<P>
<DD><DL>

<DT><B>返回:</B><DD>页面视图 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); DocumentView docView = doc.getDocumentView(); PageView pageView = docView.getPageView(); System.out.println("得到当前文档视图的类型是:"+pageView.getViewType()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getViewType()"><!-- --></A><H3>
getViewType</H3>
<PRE>
public int <B>getViewType</B>()</PRE>
<DL>
<DD>得到视图的类型。
<P>
<DD><DL>

<DT><B>返回:</B><DD>视图类型,其常量和相应的值如下: <pre>       ViewConstants.NORMAL_VIEW  (普通视图);       ViewConstants.PAGE_VIEW    (页面视图);       ViewConstants.OUTLINE_VIEW (大纲视图) </pre> <p> <b>例子:</b> <pre> //请输入一些文字。 Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); DocumentView docView = doc.getDocumentView(); System.out.println("得到当前文档视图的类型是:"+docView.getViewType()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/DocumentView.html#switchView(int)"><CODE>switchView(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="isCustomPopupMenuEnable()"><!-- --></A><H3>
isCustomPopupMenuEnable</H3>
<PRE>
public boolean <B>isCustomPopupMenuEnable</B>()</PRE>
<DL>
<DD>返回是否需要显示用户的自定义右键菜单
<P>
<DD><DL>

<DT><B>返回:</B><DD>false表示显示WP的右键菜单,true表示显示自定义右键菜单 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveDocument(); DocumentView docView = doc.getDocumentView(); System.out.println(docView.isCustomPopupMenuEnable()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="setCustomPopupMenu(javax.swing.JPopupMenu)"><!-- --></A><H3>
setCustomPopupMenu</H3>
<PRE>
public void <B>setCustomPopupMenu</B>(javax.swing.JPopupMenu&nbsp;customPopupMenu)</PRE>
<DL>
<DD>设置用户的自定义右键菜单,注意:如isCustomPopupMenuEnable()方法返回false, 自定义菜单不能弹出,必须先调用setCustomPopupMenuEnable(true)方能弹出。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>customPopupMenu</CODE> - 标准Swing弹出菜单 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveDocument(); DocumentView docView = doc.getDocumentView(); JPopupMenu menu = new JPopupMenu(); menu.add(&quot;First&quot;); menu.add(&quot;Second&quot;); menu.addSeparator(); menu.add(&quot;One&quot;); menu.add(&quot;Two&quot;); docView.setCustomPopupMenuEnable(true); docView.setCustomPopupMenu(menu); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="setCustomPopupMenuEnable(boolean)"><!-- --></A><H3>
setCustomPopupMenuEnable</H3>
<PRE>
public void <B>setCustomPopupMenuEnable</B>(boolean&nbsp;enabled)</PRE>
<DL>
<DD>设置是否需要显示用户的自定义右键菜单
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>enabled</CODE> - false表示显示WP的右键菜单,true表示显示自定义右键菜单 <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveDocument(); DocumentView docView = doc.getDocumentView(); docView.setCustomPopupMenuEnable(true); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="switchView(int)"><!-- --></A><H3>
switchView</H3>
<PRE>
public void <B>switchView</B>(int&nbsp;type)</PRE>
<DL>
<DD>设置当前文档的视图类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 文档的视图类型。可分为普通视图,页面视图,大纲视图。 其常量如下: <pre> ViewConstants.NORMAL_VIEW      (普通视图)  ViewConstants.OUTLINE_VIEW     (大纲视图) ViewConstants.PAGE_VIEW        (页面视图) </pre> <p> <b>例子:</b>  <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); DocumentView docView = doc.getDocumentView(); docView.switchView(ViewConstants.OUTLINE_VIEW); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当文档视图类型的常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/ViewConstants.html" title="application.constants 中的接口"><CODE>ViewConstants</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;上一个类&nbsp;
&nbsp;<A HREF="../../../../../application/workbooks/workbook/documents/document/EndNoteOptions.html" title="application.workbooks.workbook.documents.document 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?application/workbooks/workbook/documents/document/DocumentView.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="DocumentView.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>所有类</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
版权所有 2001-2006 无锡永中科技有限公司
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -