📄 jtree.html
字号:
Updates the <code>expandedState</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <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> 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 int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#visibleRowCount">visibleRowCount</A></B></CODE><BR> Number of rows to make visible at one time.</TD></TR></TABLE> <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> <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> <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> <!-- ======== 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> 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> value)</CODE><BR> 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>[] value)</CODE><BR> 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> newModel)</CODE><BR> 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> root)</CODE><BR> 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> root, boolean asksAllowsChildren)</CODE><BR> 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> value)</CODE><BR> 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> <!-- ========== 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionInterval(int, int)">addSelectionInterval</A></B>(int index0, int index1)</CODE><BR> 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> 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> path)</CODE><BR> 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> 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>[] paths)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionRow(int)">addSelectionRow</A></B>(int row)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#addSelectionRows(int[])">addSelectionRows</A></B>(int[] rows)</CODE><BR> 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> 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> tel)</CODE><BR> 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> 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> tsl)</CODE><BR> 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> 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> tel)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#cancelEditing()">cancelEditing</A></B>()</CODE><BR> Cancels the current editing session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#clearSelection()">clearSelection</A></B>()</CODE><BR> Clears the selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#clearToggledPaths()">clearToggledPaths</A></B>()</CODE><BR> 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> 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> path)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#collapseRow(int)">collapseRow</A></B>(int row)</CODE><BR> 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> <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> value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)</CODE><BR> 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 <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> value)</CODE><BR> Returns a <code>TreeModel</code> wrapping the specified object.</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -