ItEr56S14GraficaInferiorPantallaCargaRecursos: Changed legend at resource load view for an empty timeplot.
This commit is contained in:
parent
6bd314e04c
commit
2849fecd8c
3 changed files with 25 additions and 31 deletions
|
|
@ -91,9 +91,13 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
|
|||
private WeakReferencedListeners<IFilterChangedListener> nameFilterListener =
|
||||
WeakReferencedListeners.create();
|
||||
|
||||
private Component loadChart;
|
||||
|
||||
public ResourcesLoadPanel(List<LoadTimeLine> groups,
|
||||
TimeTracker timeTracker, Component componentOnWhichGiveFeedback) {
|
||||
TimeTracker timeTracker, Component componentOnWhichGiveFeedback,
|
||||
Component loadChart) {
|
||||
this.componentOnWhichGiveFeedback = componentOnWhichGiveFeedback;
|
||||
this.loadChart = loadChart;
|
||||
init(groups, timeTracker);
|
||||
|
||||
}
|
||||
|
|
@ -302,12 +306,15 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
|
|||
if(refreshNameFilter) {
|
||||
setupNameFilter();
|
||||
}
|
||||
|
||||
getFellow("insertionPointChart").appendChild(loadChart);
|
||||
}
|
||||
|
||||
public void clearComponents() {
|
||||
getFellow("insertionPointLeftPanel").getChildren().clear();
|
||||
getFellow("insertionPointRightPanel").getChildren().clear();
|
||||
getFellow("insertionPointTimetracker").getChildren().clear();
|
||||
getFellow("insertionPointChart").getChildren().clear();
|
||||
}
|
||||
|
||||
private TimeTrackerComponent createTimeTrackerHeader() {
|
||||
|
|
|
|||
|
|
@ -87,35 +87,8 @@ resourcesLoadPanel = self;
|
|||
</center>
|
||||
</borderlayout>
|
||||
</center>
|
||||
<south height="170px" collapsible="true" title="Resources load graph legend">
|
||||
<borderlayout>
|
||||
<center sclass="legend-gap">
|
||||
<vbox pack="center" align="center" height="150px" width="100%">
|
||||
<vbox sclass="legend">
|
||||
|
||||
<hbox pack="center" sclass="legend-title">
|
||||
<n:label class="title">${i18n:_('Assignation percentage')}</n:label>
|
||||
</hbox>
|
||||
|
||||
<hbox pack="center" sclass="legend-row">
|
||||
<n:div class="resourceload SOME_LOAD" />
|
||||
<n:label>${i18n:_('0% - 100%')}</n:label>
|
||||
</hbox>
|
||||
|
||||
<hbox pack="center" sclass="legend-row">
|
||||
<n:div class="resourceload FULL_LOAD" />
|
||||
<n:label>${i18n:_('100%')}</n:label>
|
||||
</hbox>
|
||||
|
||||
<hbox pack="center" sclass="legend-row">
|
||||
<n:div class="resourceload OVERLOAD" />
|
||||
<n:label>${i18n:_('+ 100%')}</n:label>
|
||||
</hbox>
|
||||
|
||||
</vbox>
|
||||
</vbox>
|
||||
</center>
|
||||
</borderlayout>
|
||||
<south height="170px" collapsible="true" title="Graphics">
|
||||
<div id="insertionPointChart" />
|
||||
</south>
|
||||
</borderlayout>
|
||||
</zk>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.zkforge.timeplot.Plotinfo;
|
||||
import org.zkforge.timeplot.Timeplot;
|
||||
import org.zkoss.ganttz.data.resourceload.LoadTimeLine;
|
||||
import org.zkoss.ganttz.resourceload.IFilterChangedListener;
|
||||
import org.zkoss.ganttz.resourceload.ISeeScheduledOfListener;
|
||||
|
|
@ -218,7 +220,7 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
} else {
|
||||
resourcesLoadPanel = new ResourcesLoadPanel(resourceLoadModel
|
||||
.getLoadTimeLines(), timeTracker, parent);
|
||||
.getLoadTimeLines(), timeTracker, parent, buildLoadChart());
|
||||
if(filterBy == null) {
|
||||
addWorkersBandbox();
|
||||
addTimeFilter();
|
||||
|
|
@ -375,4 +377,16 @@ public class ResourceLoadController implements Composer {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private org.zkoss.zk.ui.Component buildLoadChart() {
|
||||
Timeplot chartLoadTimeplot = createEmptyTimeplot();
|
||||
return chartLoadTimeplot;
|
||||
}
|
||||
|
||||
private Timeplot createEmptyTimeplot() {
|
||||
Timeplot timeplot = new Timeplot();
|
||||
timeplot.appendChild(new Plotinfo());
|
||||
return timeplot;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue