Fix bug avoid creating hbox assigment function combobox on changing zoom

The combobox for selecting type of assigment function (advance
allocation) is created every time the user changes the zoom
leve

FEA: ItEr62OTS04FuncionCurvaS
This commit is contained in:
Diego Pino Garcia 2010-11-04 13:11:25 +01:00
parent 9d9be0cbe4
commit 7bef6d83d0

View file

@ -1195,25 +1195,33 @@ class Row {
}
}
private Hbox hboxAssigmentFunctionsCombobox = null;
Component getFunction() {
if (isGroupingRow()) {
return new Label();
} else if (isLimiting) {
return new Label(_("Limiting assignment"));
} else {
Hbox hbox = new Hbox();
Combobox assignmentFunctionsCombo = getAssignmentFunctionsCombo();
appendListener(assignmentFunctionsCombo);
hbox.appendChild(assignmentFunctionsCombo);
hbox
.appendChild(getAssignmentFunctionsConfigureButton(assignmentFunctionsCombo));
return hbox;
if (hboxAssigmentFunctionsCombobox == null) {
initializeAssigmentFunctionsCombobox();
}
return hboxAssigmentFunctionsCombobox;
}
}
private void initializeAssigmentFunctionsCombobox() {
hboxAssigmentFunctionsCombobox = new Hbox();
Combobox assignmentFunctionsCombo = getAssignmentFunctionsCombo();
appendListener(assignmentFunctionsCombo);
assignmentFunctionsCombo.setValue("None");
hboxAssigmentFunctionsCombobox.appendChild(assignmentFunctionsCombo);
hboxAssigmentFunctionsCombobox
.appendChild(getAssignmentFunctionsConfigureButton(assignmentFunctionsCombo));
}
private void appendListener(final Combobox assignmentFunctionsCombo) {
assignmentFunctionsCombo.addEventListener(Events.ON_CHANGE,
new EventListener() {