📄 jtree.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/event/TreeModelListener.html">TreeModelListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#createTreeModelListener()">createTreeModelListener</A></B>()</CODE><BR> Creates and returns an instance of <code>TreeModelHandler</code>.</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#expandPath(javax.swing.tree.TreePath)">expandPath</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Ensures that the node identified by the specified path is expanded 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#expandRow(int)">expandRow</A></B>(int row)</CODE><BR> Ensures that the node in the specified row is expanded 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#fireTreeCollapsed(javax.swing.tree.TreePath)">fireTreeCollapsed</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Notify all listeners that have registered interest for notification on this event type.</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#fireTreeExpanded(javax.swing.tree.TreePath)">fireTreeExpanded</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Notify all listeners that have registered interest for notification on this event type.</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#fireTreeWillCollapse(javax.swing.tree.TreePath)">fireTreeWillCollapse</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Notify all listeners that have registered interest for notification on this event type.</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#fireTreeWillExpand(javax.swing.tree.TreePath)">fireTreeWillExpand</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Notify all listeners that have registered interest for notification on this event type.</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#fireValueChanged(javax.swing.event.TreeSelectionEvent)">fireValueChanged</A></B>(<A HREF="../../javax/swing/event/TreeSelectionEvent.html">TreeSelectionEvent</A> e)</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this JTree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getAnchorSelectionPath()">getAnchorSelectionPath</A></B>()</CODE><BR> Returns the path identified as the anchor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreeCellEditor.html">TreeCellEditor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getCellEditor()">getCellEditor</A></B>()</CODE><BR> Returns the editor used to edit entries in the tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreeCellRenderer.html">TreeCellRenderer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getCellRenderer()">getCellRenderer</A></B>()</CODE><BR> Returns the current <code>TreeCellRenderer</code> that is rendering each cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getClosestPathForLocation(int, int)">getClosestPathForLocation</A></B>(int x, int y)</CODE><BR> Returns the path to the node that is closest to x,y.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getClosestRowForLocation(int, int)">getClosestRowForLocation</A></B>(int x, int y)</CODE><BR> Returns the row to the node that is closest to x,y.</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#getDefaultTreeModel()">getDefaultTreeModel</A></B>()</CODE><BR> Creates and returns a sample <code>TreeModel</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/util/Enumeration.html">Enumeration</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getDescendantToggledPaths(javax.swing.tree.TreePath)">getDescendantToggledPaths</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> parent)</CODE><BR> Returns an <code>Enumeration</code> of <code>TreePaths</code> that have been expanded that are descendants of <code>parent</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getEditingPath()">getEditingPath</A></B>()</CODE><BR> Returns the path to the element that is currently being edited.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/util/Enumeration.html">Enumeration</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getExpandedDescendants(javax.swing.tree.TreePath)">getExpandedDescendants</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> parent)</CODE><BR> Returns an <code>Enumeration</code> of the descendants of the path <code>parent</code> that are currently expanded.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getExpandsSelectedPaths()">getExpandsSelectedPaths</A></B>()</CODE><BR> Returns the <code>expandsSelectedPaths</code> property.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getInvokesStopCellEditing()">getInvokesStopCellEditing</A></B>()</CODE><BR> Returns the indicator that tells what happens when editing is interrupted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getLastSelectedPathComponent()">getLastSelectedPathComponent</A></B>()</CODE><BR> Returns the last path component in the first node of the current selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getLeadSelectionPath()">getLeadSelectionPath</A></B>()</CODE><BR> Returns the path identified as the lead.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getLeadSelectionRow()">getLeadSelectionRow</A></B>()</CODE><BR> Returns the row index corresponding to the lead path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getMaxSelectionRow()">getMaxSelectionRow</A></B>()</CODE><BR> Returns the last selected row.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getMinSelectionRow()">getMinSelectionRow</A></B>()</CODE><BR> Gets the first selected row.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreeModel.html">TreeModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getModel()">getModel</A></B>()</CODE><BR> Returns the <code>TreeModel</code> that is providing the data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getPathBetweenRows(int, int)">getPathBetweenRows</A></B>(int index0, int index1)</CODE><BR> Returns <code>JTreePath</code> instances representing the path between index0 and index1 (including index1).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getPathBounds(javax.swing.tree.TreePath)">getPathBounds</A></B>(<A HREF="../../javax/swing/tree/TreePath.html">TreePath</A> path)</CODE><BR> Returns the <code>Rectangle</code> that the specified node will be drawn into.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/tree/TreePath.html">TreePath</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTree.html#getPathForLocation(int, int)">getPathForLocation</A></B>(int x, int y)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -