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

📄 jtree.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the <code>expandedState</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#VISIBLE_ROW_COUNT_PROPERTY">VISIBLE_ROW_COUNT_PROPERTY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bound property name for <code>visibleRowCount</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#visibleRowCount">visibleRowCount</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of rows to make visible at one time.</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_javax.swing.JComponent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class javax.swing.<A HREF="../../javax/swing/JComponent.html">JComponent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/swing/JComponent.html#accessibleContext">accessibleContext</A>, <A HREF="../../javax/swing/JComponent.html#listenerList">listenerList</A>, <A HREF="../../javax/swing/JComponent.html#TOOL_TIP_TEXT_KEY">TOOL_TIP_TEXT_KEY</A>, <A HREF="../../javax/swing/JComponent.html#ui">ui</A>, <A HREF="../../javax/swing/JComponent.html#UNDEFINED_CONDITION">UNDEFINED_CONDITION</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT">WHEN_ANCESTOR_OF_FOCUSED_COMPONENT</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_FOCUSED">WHEN_FOCUSED</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_IN_FOCUSED_WINDOW">WHEN_IN_FOCUSED_WINDOW</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.<A HREF="../../java/awt/Component.html">Component</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/Component.html#BOTTOM_ALIGNMENT">BOTTOM_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#CENTER_ALIGNMENT">CENTER_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#LEFT_ALIGNMENT">LEFT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#RIGHT_ALIGNMENT">RIGHT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#TOP_ALIGNMENT">TOP_ALIGNMENT</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.image.ImageObserver"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface java.awt.image.<A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/image/ImageObserver.html#ABORT">ABORT</A>, <A HREF="../../java/awt/image/ImageObserver.html#ALLBITS">ALLBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#ERROR">ERROR</A>, <A HREF="../../java/awt/image/ImageObserver.html#FRAMEBITS">FRAMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#HEIGHT">HEIGHT</A>, <A HREF="../../java/awt/image/ImageObserver.html#PROPERTIES">PROPERTIES</A>, <A HREF="../../java/awt/image/ImageObserver.html#SOMEBITS">SOMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#WIDTH">WIDTH</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree()">JTree</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> with a sample model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(java.util.Hashtable)">JTree</A></B>(<A HREF="../../java/util/Hashtable.html">Hashtable</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> created from a <code>Hashtable</code> which does not display with root.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(java.lang.Object[])">JTree</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> with each element of the specified array as the child of a new root node which is not displayed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(javax.swing.tree.TreeModel)">JTree</A></B>(<A HREF="../../javax/swing/tree/TreeModel.html">TreeModel</A>&nbsp;newModel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an instance of <code>JTree</code> which displays the root node  -- the tree is created using the specified data model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(javax.swing.tree.TreeNode)">JTree</A></B>(<A HREF="../../javax/swing/tree/TreeNode.html">TreeNode</A>&nbsp;root)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> with the specified TreeNode as its root, which displays the root node.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(javax.swing.tree.TreeNode, boolean)">JTree</A></B>(<A HREF="../../javax/swing/tree/TreeNode.html">TreeNode</A>&nbsp;root,      boolean&nbsp;asksAllowsChildren)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> with the specified <code>TreeNode</code> as its root, which  displays the root node and which decides whether a node is a  leaf node in the specified manner.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTree.html#JTree(java.util.Vector)">JTree</A></B>(<A HREF="../../java/util/Vector.html">Vector</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>JTree</code> with each element of the specified <code>Vector</code> as the child of a new root node which is not displayed.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionInterval(int, int)">addSelectionInterval</A></B>(int&nbsp;index0,                     int&nbsp;index1)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the paths between index0 and index1, inclusive, to the  selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionPath(javax.swing.tree.TreePath)">addSelectionPath</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A>&nbsp;path)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the node identified by the specified <code>TreePath</code> to the current selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionPaths(javax.swing.tree.TreePath[])">addSelectionPaths</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A>[]&nbsp;paths)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds each path in the array of paths to the current selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionRow(int)">addSelectionRow</A></B>(int&nbsp;row)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the path at the specified row to the current selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionRows(int[])">addSelectionRows</A></B>(int[]&nbsp;rows)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the paths at each of the specified rows to the current selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addTreeExpansionListener(javax.swing.event.TreeExpansionListener)">addTreeExpansionListener</A></B>(<A HREF="../../javax/swing/event/TreeExpansionListener.html">TreeExpansionListener</A>&nbsp;tel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for <code>TreeExpansion</code> events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addTreeSelectionListener(javax.swing.event.TreeSelectionListener)">addTreeSelectionListener</A></B>(<A HREF="../../javax/swing/event/TreeSelectionListener.html">TreeSelectionListener</A>&nbsp;tsl)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for <code>TreeSelection</code> events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addTreeWillExpandListener(javax.swing.event.TreeWillExpandListener)">addTreeWillExpandListener</A></B>(<A HREF="../../javax/swing/event/TreeWillExpandListener.html">TreeWillExpandListener</A>&nbsp;tel)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for <code>TreeWillExpand</code> events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#cancelEditing()">cancelEditing</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancels the current editing session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#clearSelection()">clearSelection</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#clearToggledPaths()">clearToggledPaths</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the cache of toggled tree paths.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#collapsePath(javax.swing.tree.TreePath)">collapsePath</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A>&nbsp;path)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensures that the node identified by the specified path is  collapsed and viewable.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#collapseRow(int)">collapseRow</A></B>(int&nbsp;row)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensures that the node in the specified row is collapsed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#convertValueToText(java.lang.Object, boolean, boolean, boolean, int, boolean)">convertValueToText</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;value,                   boolean&nbsp;selected,                   boolean&nbsp;expanded,                   boolean&nbsp;leaf,                   int&nbsp;row,                   boolean&nbsp;hasFocus)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the renderers to convert the specified value to text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;<A HREF="../../javax/swing/tree/TreeModel.html">TreeModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#createTreeModel(java.lang.Object)">createTreeModel</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>TreeModel</code> wrapping the specified object.</TD></TR>

⌨️ 快捷键说明

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