|
From: <bma...@us...> - 2017-06-07 09:09:42
|
Revision: 9632
http://sourceforge.net/p/fudaa/svn/9632
Author: bmarchan
Date: 2017-06-07 09:09:39 +0000 (Wed, 07 Jun 2017)
Log Message:
-----------
Add BArbreCalque.expandAllTree() method.
Modified Paths:
--------------
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java 2017-06-07 09:08:48 UTC (rev 9631)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java 2017-06-07 09:09:39 UTC (rev 9632)
@@ -491,7 +491,31 @@
public void setSelectionCalque(final BCalque _cq) {
getArbreModel().setSelectionCalque(_cq);
}
+
+ /**
+ * Ouvre ou ferme l'arbre en totalit\xE9.
+ * @param _b True : Ouvre l'arbre
+ */
+ public void expandAllTree(boolean _b) {
+// enableEvents_=false;
+ TreePath[] _paths=this.getSelectionPaths();
+ this.clearSelection();
+ if (_b) {
+ for (int i=0; i < this.getRowCount(); i++) {
+ TreePath path=this.getPathForRow(i);
+ this.expandRow(i);
+ }
+ }
+ else {
+ for (int i=this.getRowCount() - 1; i >= 0; i--) {
+ this.collapseRow(i);
+ }
+ }
+ this.setSelectionPaths(_paths);
+// enableEvents_=true;
+ }
+
@Override
public void updateUI() {
super.updateUI();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|