X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTComboBox.java;fp=src%2Fjexer%2FTComboBox.java;h=4abdd6fbc7445b89378dffd3ec7e40923d88bec6;hb=d8dc8aea32a07a0653933700f1abadc7776b013f;hp=fe2fdacf7a794e5620fad37fabeeec49097196c9;hpb=6cdd4553f20b84586df10e5f8319b6462bf3bd41;p=fanfix.git diff --git a/src/jexer/TComboBox.java b/src/jexer/TComboBox.java index fe2fdac..4abdd6f 100644 --- a/src/jexer/TComboBox.java +++ b/src/jexer/TComboBox.java @@ -114,7 +114,7 @@ public class TComboBox extends TWidget { field.setText(list.getSelected()); list.setEnabled(false); list.setVisible(false); - TComboBox.this.setHeight(1); + TComboBox.super.setHeight(1); if (TComboBox.this.limitToListValue == false) { TComboBox.this.activate(field); } @@ -130,7 +130,7 @@ public class TComboBox extends TWidget { list.setEnabled(false); list.setVisible(false); - setHeight(1); + super.setHeight(1); if (limitToListValue) { field.setEnabled(false); } else { @@ -215,6 +215,27 @@ public class TComboBox extends TWidget { // TWidget ---------------------------------------------------------------- // ------------------------------------------------------------------------ + /** + * Override TWidget's width: we can only set width at construction time. + * + * @param width new widget width (ignored) + */ + @Override + public void setWidth(final int width) { + // Do nothing + } + + /** + * Override TWidget's height: we can only set height at construction + * time. + * + * @param height new widget height (ignored) + */ + @Override + public void setHeight(final int height) { + // Do nothing + } + /** * Draw the combobox down arrow. */ @@ -253,7 +274,7 @@ public class TComboBox extends TWidget { public void hideList() { list.setEnabled(false); list.setVisible(false); - setHeight(1); + super.setHeight(1); if (limitToListValue == false) { activate(field); } @@ -265,7 +286,7 @@ public class TComboBox extends TWidget { public void showList() { list.setEnabled(true); list.setVisible(true); - setHeight(list.getHeight() + 1); + super.setHeight(list.getHeight() + 1); activate(list); }