ItEr44S16CUAsignacionRecursosEspecificosAPlanificacionItEr37S10: Parametrizing title of panel

This commit is contained in:
Óscar González Fernández 2010-01-24 23:33:57 +01:00
parent cbf874189e
commit 3c4e76786f
4 changed files with 19 additions and 2 deletions

View file

@ -880,6 +880,11 @@ class Row {
protected Component getParentOnWhichOpenWindow() {
return allHoursInput.getParent();
}
@Override
protected String getTitle() {
return _("Streches list");
}
};
private IAssignmentFunctionConfiguration[] functions = { none,

View file

@ -42,7 +42,7 @@ public abstract class StrechesFunctionConfiguration implements
@Override
public void goToConfigure() {
StretchesFunctionController stretchesFunctionController = new StretchesFunctionController();
stretchesFunctionController.setTitle(getTitle());
HashMap<String, Object> args = new HashMap<String, Object>();
args.put("stretchesFunctionController", stretchesFunctionController);
Window window = (Window) Executions.createComponents(
@ -57,6 +57,8 @@ public abstract class StrechesFunctionConfiguration implements
assignmentFunctionChanged();
}
protected abstract String getTitle();
protected abstract ResourceAllocation<?> getAllocation();
protected abstract void assignmentFunctionChanged();

View file

@ -63,6 +63,8 @@ public class StretchesFunctionController extends GenericForwardComposer {
private StretchesRenderer stretchesRenderer = new StretchesRenderer();
private String title;
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
@ -335,4 +337,12 @@ public class StretchesFunctionController extends GenericForwardComposer {
return xymodel;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}

View file

@ -33,7 +33,7 @@
<hbox>
<vbox>
<panel title="${i18n:_('Stretches list')}">
<panel title="@{stretchesFunctionController.title}">
<panelchildren>