ItEr29S08CUCreacionProxectoPlanificacionItEr28S09: Connecting zoom buttons with TimeTracker.
This commit is contained in:
parent
156bb86882
commit
4b77e4a17e
3 changed files with 32 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue