ItEr60S04ValidacionEProbasFuncionaisItEr59S04: [Bug #582] Fixed for expand/collapse all button.

This commit is contained in:
Manuel Rego Casasnovas 2010-08-11 10:32:22 +02:00
parent 1b98ce643f
commit 258d1b4ba0
2 changed files with 17 additions and 4 deletions

View file

@ -86,6 +86,12 @@ public class GanttPanel extends XulElement implements AfterCompose {
timeTrackerComponent.afterCompose();
dependencyList.afterCompose();
if (planner.isExpandAll()) {
FunctionalityExposedForExtensions<?> context = (FunctionalityExposedForExtensions<?>) planner
.getContext();
context.expandAll();
}
if (planner.isFlattenTree()) {
planner.getPredicate().setFilterContainers(true);
planner.setTaskListPredicate(planner.getPredicate());

View file

@ -139,6 +139,8 @@ public class Planner extends HtmlMacroComponent {
private boolean isShowingResources = false;
private boolean isExpandAll = false;
private boolean isFlattenTree = false;
private ZoomLevel initialZoomLevel = null;
@ -574,14 +576,15 @@ public class Planner extends HtmlMacroComponent {
public void expandAll() {
Button expandAllButton = (Button) getFellow("expandAll");
if (disabilityConfiguration.isExpandAllEnabled()) {
if (expandAllButton.getSclass().equals("planner-command")) {
context.expandAll();
expandAllButton.setSclass("planner-command clicked");
} else {
if (isExpandAll) {
context.collapseAll();
expandAllButton.setSclass("planner-command");
} else {
context.expandAll();
expandAllButton.setSclass("planner-command clicked");
}
}
isExpandAll = !isExpandAll;
}
public void expandAllAlways() {
@ -680,6 +683,10 @@ public class Planner extends HtmlMacroComponent {
return isShowingResources;
}
public boolean isExpandAll() {
return isExpandAll;
}
public boolean isFlattenTree() {
return isFlattenTree;
}