litesoft
Diff Revisions
150
vs
151
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/SizeableTree.java
|
@@ -105,7 +105,9 @@ |
105 |
105 |
|
|
106 |
106 |
|
/** |
107 |
107 |
|
* Set the Selected Node & return the UserObject actually Selected |
|
108 |
+ |
* |
108 |
109 |
|
* @param pUserObject to select |
|
110 |
+ |
* |
109 |
111 |
|
* @return pUserObject or null if it was not found! |
110 |
112 |
|
*/ |
111 |
113 |
|
public Object setSelected( Object pUserObject ) |
|
@@ -170,16 +172,16 @@ |
170 |
172 |
|
{ |
171 |
173 |
|
if ( pUserObject != null ) |
172 |
174 |
|
{ |
173 |
|
- |
int zCount = mTree.getItemCount(); |
174 |
|
- |
for ( int i = 0 ; i < zCount; i++ ) |
175 |
|
- |
{ |
176 |
|
- |
TreeItem zItem = mTree.getItem( i ); |
177 |
|
- |
if ( pUserObject == zItem.getUserObject() ) |
|
175 |
+ |
int zCount = mTree.getItemCount(); |
|
176 |
+ |
for ( int i = 0; i < zCount; i++ ) |
178 |
177 |
|
{ |
179 |
|
- |
return removeWithSelectMangementAndNotification( zItem ); |
|
178 |
+ |
TreeItem zItem = mTree.getItem( i ); |
|
179 |
+ |
if ( pUserObject == zItem.getUserObject() ) |
|
180 |
+ |
{ |
|
181 |
+ |
return removeWithSelectMangementAndNotification( zItem ); |
|
182 |
+ |
} |
180 |
183 |
|
} |
181 |
184 |
|
} |
182 |
|
- |
} |
183 |
185 |
|
return false; |
184 |
186 |
|
} |
185 |
187 |
|
|
|
@@ -623,7 +625,7 @@ |
623 |
625 |
|
TreeItem zItem = getChild( i ); |
624 |
626 |
|
if ( (zItem != null) && (pUserObject == zItem.getUserObject()) ) |
625 |
627 |
|
{ |
626 |
|
- |
return removeWithSelectMangementAndNotification(zItem); |
|
628 |
+ |
return removeWithSelectMangementAndNotification( zItem ); |
627 |
629 |
|
} |
628 |
630 |
|
} |
629 |
631 |
|
} |
|
@@ -641,10 +643,10 @@ |
641 |
643 |
|
{ |
642 |
644 |
|
for ( int i = 0; i < zCount; i++ ) |
643 |
645 |
|
{ |
644 |
|
- |
MyTreeNode tn = (MyTreeNode)getChild( i ); |
|
646 |
+ |
MyTreeNode tn = (MyTreeNode) getChild( i ); |
645 |
647 |
|
if ( pUserObject == tn.getUserObject() ) |
646 |
648 |
|
{ |
647 |
|
- |
return removeWithSelectMangementAndNotification(tn); |
|
649 |
+ |
return removeWithSelectMangementAndNotification( tn ); |
648 |
650 |
|
} |
649 |
651 |
|
if ( tn.removeDescendant( pUserObject ) ) |
650 |
652 |
|
{ |