Modified populate function so that our button is no longer a toggle

Added some documentation
Added button tip
master
sib12004 2015-12-05 21:31:17 -05:00
parent b0c6bc72b8
commit 6045f7e248
2 changed files with 8 additions and 5 deletions

View File

@ -86,7 +86,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
private boolean isFoldSymbols = true;
//OUR CODE/////////////////////////////////////////////////////////////////////////////////////////////////
/** whether we want to expand the tree */
private boolean isExpandAll = false;
@ -160,6 +160,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
if (set)
{
clearHiddenIDs();
setExpandAll(false);
}
update();
}
@ -392,7 +393,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
hideAncestors.addAll(ids);
}
//OUR ATTEMPT AT CLEARING THE LIST OF HIDDEN IDS
/**clears all hidden ancestors and descendants */
public void clearHiddenIDs() {
hideAncestors.clear();
hideDescendants.clear();

View File

@ -467,7 +467,9 @@ public class TreeView extends View implements ContextProvider, ActionProvider {
toolbar.addSeparator();
// expand all
toolbar.add(bh.create(new ActionExpandAll(), Images.imgExpand, model.isExpandAll()));
//toolbar.add(bh.create(new ActionExpandAll(), Images.imgExpand, model.isExpandAll()));
ActionExpandAll expandAllButton = new ActionExpandAll();
toolbar.add(expandAllButton);
// vertical/horizontal
toolbar.add(bh.create(new ActionOrientation(), Images.imgVert, model.isVertical()));
@ -1052,13 +1054,13 @@ public class TreeView extends View implements ContextProvider, ActionProvider {
*/
private ActionExpandAll() {
super.setImage(Images.imgExpand);
//super.setTip(RESOURCES, "expandall.tip");
super.setTip("Expand all");
}
/**
* @see genj.util.swing.Action2#execute()
*/
public void actionPerformed(ActionEvent event) {
model.setExpandAll(!model.isExpandAll());
model.setExpandAll(true);
scrollToCurrent();
}
}//ActionExpanding