summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-03-14 09:02:28 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-03-14 09:02:28 +0000
commit2d64fe60852b466507200b9216ac7b09651db328 (patch)
tree571b3a58800f682eb9de518522981e8d8d4185b4 /src/com
parente414f77a62e267eff31b9e47bb6da49d152f6c29 (diff)
downloadvaadin-framework-2d64fe60852b466507200b9216ac7b09651db328.tar.gz
vaadin-framework-2d64fe60852b466507200b9216ac7b09651db328.zip
fixed width with combobox, deprecated setColumns
svn changeset:4047/svn branch:trunk
Diffstat (limited to 'src/com')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java7
-rw-r--r--src/com/itmill/toolkit/ui/Select.java15
2 files changed, 10 insertions, 12 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
index 7e07c50d94..4d30cb11e5 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
@@ -612,13 +612,6 @@ public class IFilterSelect extends Composite implements Paintable,
DOM.setStyleAttribute(spacer, "overflow", "hidden");
DOM.appendChild(panel.getElement(), spacer);
- // Set columns (width) is given
- if (uidl.hasAttribute("cols")) {
- DOM.setStyleAttribute(getElement(), "width", uidl
- .getIntAttribute("cols")
- + "em");
- }
-
}
public void onSuggestionSelected(FilterSelectSuggestion suggestion) {
diff --git a/src/com/itmill/toolkit/ui/Select.java b/src/com/itmill/toolkit/ui/Select.java
index 791b2d463c..41b203f4b5 100644
--- a/src/com/itmill/toolkit/ui/Select.java
+++ b/src/com/itmill/toolkit/ui/Select.java
@@ -126,11 +126,6 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
}
}
- // Adds the number of columns
- if (columns != 0) {
- target.addAttribute("cols", columns);
- }
-
// Constructs selected keys array
String[] selectedKeys;
if (isMultiSelect()) {
@@ -425,10 +420,15 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
}
/**
+ * Note, one should use more generic setWidth(String) method instead of
+ * this. This now days actually converts columns to width with em css unit.
+ *
* Sets the number of columns in the editor. If the number of columns is set
* 0, the actual number of displayed columns is determined implicitly by the
* adapter.
*
+ * @deprecated
+ *
* @param columns
* the number of columns to set.
*/
@@ -438,10 +438,15 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
}
if (this.columns != columns) {
this.columns = columns;
+ setWidth(columns, Select.UNITS_EM);
requestRepaint();
}
}
+ /**
+ * @deprecated see setter function
+ * @return
+ */
public int getColumns() {
return columns;
}