This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 8a79dae [NETBEANS-5146] Add ScrollOnExpand property to TreeView 8a79dae is described below commit 8a79dae337616d662b21f63284e03ec9954355ed Author: Laszlo Kishalmi <laszlo.kisha...@gmail.com> AuthorDate: Sun Dec 13 13:01:38 2020 -0800 [NETBEANS-5146] Add ScrollOnExpand property to TreeView --- platform/openide.explorer/apichanges.xml | 14 +++++++++++++ .../openide.explorer/nbproject/project.properties | 2 +- .../src/org/openide/explorer/view/TreeView.java | 24 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/platform/openide.explorer/apichanges.xml b/platform/openide.explorer/apichanges.xml index 2be4e68..0e0ecb1 100644 --- a/platform/openide.explorer/apichanges.xml +++ b/platform/openide.explorer/apichanges.xml @@ -26,6 +26,20 @@ <apidef name="explorer">Explorer API</apidef> </apidefs> <changes> + <change id="ScrollOnExpand"> + <api name="explorer"/> + <summary>Expose scrollOnExpand property on TreeView.</summary> + <version major="6" minor="73"/> + <date day="13" month="12" year="2020"/> + <author login="lkishalmi"/> + <compatibility binary="compatible" source="compatible" deprecation="no" deletion="no" addition="yes"/> + <description> + It is now possible to set/get the <code>scrollOnExpand</code> property + in TreeView. + </description> + <class package="org.openide.explorer.view" name="TreeView"/> + <issue number="NETBEANS-5146"/> + </change> <change id="HideIcons"> <api name="explorer"/> <summary>Hide node icons in OutlineView and TreeView.</summary> diff --git a/platform/openide.explorer/nbproject/project.properties b/platform/openide.explorer/nbproject/project.properties index 54ae7f7..73ebeef 100644 --- a/platform/openide.explorer/nbproject/project.properties +++ b/platform/openide.explorer/nbproject/project.properties @@ -17,7 +17,7 @@ is.autoload=true javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.6 +javac.source=1.8 javadoc.main.page=org/openide/explorer/doc-files/api.html javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/platform/openide.explorer/src/org/openide/explorer/view/TreeView.java b/platform/openide.explorer/src/org/openide/explorer/view/TreeView.java index e921d9e..2901b1b 100644 --- a/platform/openide.explorer/src/org/openide/explorer/view/TreeView.java +++ b/platform/openide.explorer/src/org/openide/explorer/view/TreeView.java @@ -407,6 +407,30 @@ public abstract class TreeView extends JScrollPane { tree.setShowsRootHandles(!visible); } + + /** + * Set the <code>scrollsOnExpand</code> property on the + * underlying tree component. + * @see javax.swing.JTree#setScrollsOnExpand(boolean) + * + * @param newValue the new value of the property + * @since 6.73 + */ + public void setScrollsOnExpand(boolean newValue) { + tree.setScrollsOnExpand(newValue); + } + + /** + * Returns the value of the <code>scrollsOnExpand</code> property of + * the underlying tree component. + * + * @return the value of the <code>scrollsOnExpand</code> property + * @since 6.73 + */ + public boolean getScrollsOnExpand() { + return tree.getScrollsOnExpand(); + } + /** * Test whether the quick search feature is enabled or not. * Default is enabled (true). --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists