ItEr44S16CUAsignacionRecursosEspecificosAPlanificacionItEr37S10: Parametrizing if charts are shown
This commit is contained in:
parent
3c4e76786f
commit
d4b36e8f90
4 changed files with 19 additions and 1 deletions
|
|
@ -885,6 +885,11 @@ class Row {
|
|||
protected String getTitle() {
|
||||
return _("Streches list");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean getChartsEnabled() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
private IAssignmentFunctionConfiguration[] functions = { none,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public abstract class StrechesFunctionConfiguration implements
|
|||
public void goToConfigure() {
|
||||
StretchesFunctionController stretchesFunctionController = new StretchesFunctionController();
|
||||
stretchesFunctionController.setTitle(getTitle());
|
||||
stretchesFunctionController.setChartsEnabled(getChartsEnabled());
|
||||
HashMap<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("stretchesFunctionController", stretchesFunctionController);
|
||||
Window window = (Window) Executions.createComponents(
|
||||
|
|
@ -57,6 +58,8 @@ public abstract class StrechesFunctionConfiguration implements
|
|||
assignmentFunctionChanged();
|
||||
}
|
||||
|
||||
protected abstract boolean getChartsEnabled();
|
||||
|
||||
protected abstract String getTitle();
|
||||
|
||||
protected abstract ResourceAllocation<?> getAllocation();
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ public class StretchesFunctionController extends GenericForwardComposer {
|
|||
|
||||
private String title;
|
||||
|
||||
private boolean chartsEnabled = true;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
|
@ -345,4 +347,12 @@ public class StretchesFunctionController extends GenericForwardComposer {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
public boolean isChartsEnabled() {
|
||||
return chartsEnabled;
|
||||
}
|
||||
|
||||
public void setChartsEnabled(boolean chartsEnabled) {
|
||||
this.chartsEnabled = chartsEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
</vbox>
|
||||
|
||||
<vbox id="charts">
|
||||
<vbox id="charts" visible="@{stretchesFunctionController.chartsEnabled}">
|
||||
<chart id="dedicationChart" title="${i18n:_('Dedication chart')}"
|
||||
type="time_series" threeD="false"
|
||||
model="@{stretchesFunctionController.getDedicationChartData}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue