ItEr29S08CUCreacionProxectoPlanificacionItEr28S09: Connecting zoom buttons with TimeTracker.

This commit is contained in:
Óscar González Fernández 2009-10-05 18:09:13 +02:00
parent 156bb86882
commit 4b77e4a17e
3 changed files with 32 additions and 2 deletions

View file

@ -89,4 +89,16 @@ public class GanttPanel extends XulElement implements AfterCompose {
public void comingFromAnotherTab() {
timeTrackerComponent.recreate();
}
public void zoomIncrease() {
getTimeTracker().zoomIncrease();
}
public void zoomDecrease() {
getTimeTracker().zoomDecrease();
}
private TimeTracker getTimeTracker() {
return timeTrackerComponent.getTimeTracker();
}
}

View file

@ -111,6 +111,20 @@ public class Planner extends HtmlMacroComponent {
}
}
public void zoomIncrease() {
if (ganttPanel == null) {
return;
}
ganttPanel.zoomIncrease();
}
public void zoomDecrease() {
if (ganttPanel == null) {
return;
}
ganttPanel.zoomDecrease();
}
public <T> void setConfiguration(PlannerConfiguration<T> configuration) {
if (configuration == null)
return;

View file

@ -1,4 +1,8 @@
<zk xmlns:n="http://www.zkoss.org/2005/zk/native">
<zscript><![CDATA[
planner = self;
]]>
</zscript>
<borderlayout sclass="plannerlayout" width="auto">
<north height="30px" border="0">
<hbox align="center">
@ -6,8 +10,8 @@
<button label="Back" />
<button label="Company view" />
<separator/>
<button label="+" />
<button label="-" />
<button label="+" onClick="planner.zoomIncrease();"/>
<button label="-" onClick="planner.zoomDecrease();"/>
From: <datebox /> to: <datebox />
<separator/>
Filter: