aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2007-11-14 10:05:26 +0000
committerMarc Englund <marc.englund@itmill.com>2007-11-14 10:05:26 +0000
commit4de8f4d21cf60bb592c4f8ebf0d936fffff8177c (patch)
tree5abbeaa634f5734575e7497f3ce63016e14e8c50 /src
parent957bb1a8b415e6d72e07148d0b1ab1193f43aa41 (diff)
downloadvaadin-framework-4de8f4d21cf60bb592c4f8ebf0d936fffff8177c.tar.gz
vaadin-framework-4de8f4d21cf60bb592c4f8ebf0d936fffff8177c.zip
Throws on setMultiSelect() and setNewItemsAllowed()
svn changeset:2804/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/ui/NativeSelect.java66
1 files changed, 39 insertions, 27 deletions
diff --git a/src/com/itmill/toolkit/ui/NativeSelect.java b/src/com/itmill/toolkit/ui/NativeSelect.java
index 8de651ebd6..353ca9c8d8 100644
--- a/src/com/itmill/toolkit/ui/NativeSelect.java
+++ b/src/com/itmill/toolkit/ui/NativeSelect.java
@@ -1,6 +1,3 @@
-/**
- *
- */
package com.itmill.toolkit.ui;
import java.util.Collection;
@@ -10,32 +7,47 @@ import com.itmill.toolkit.terminal.PaintException;
import com.itmill.toolkit.terminal.PaintTarget;
/**
- * Since TK5 default select is customized component with many advanced features
- * over terminals native select components. Sometimes "native" select may still
- * be the best option. Terminal renders this select with its native select
- * widget.
+ * This is a simple drop-down select without, for instance, support for
+ * multiselect, new items, lazyloading, and other advanced features. Sometimes
+ * "native" select without all the bells-and-whistles of the ComboBox is a
+ * better choice.
*/
public class NativeSelect extends AbstractSelect {
- public NativeSelect() {
- super();
- }
-
- public NativeSelect(String caption, Collection options) {
- super(caption, options);
- }
-
- public NativeSelect(String caption, Container dataSource) {
- super(caption, dataSource);
- }
-
- public NativeSelect(String caption) {
- super(caption);
- }
-
- public void paintContent(PaintTarget target) throws PaintException {
- target.addAttribute("type", "native");
- super.paintContent(target);
- }
+ public NativeSelect() {
+ super();
+ }
+
+ public NativeSelect(String caption, Collection options) {
+ super(caption, options);
+ }
+
+ public NativeSelect(String caption, Container dataSource) {
+ super(caption, dataSource);
+ }
+
+ public NativeSelect(String caption) {
+ super(caption);
+ }
+
+ public void paintContent(PaintTarget target) throws PaintException {
+ target.addAttribute("type", "native");
+ super.paintContent(target);
+ }
+
+ public void setMultiSelect(boolean multiSelect)
+ throws UnsupportedOperationException {
+ if (multiSelect == true) {
+ throw new UnsupportedOperationException("Multiselect not supported");
+ }
+ }
+
+ public void setNewItemsAllowed(boolean allowNewOptions)
+ throws UnsupportedOperationException {
+ if (allowNewOptions == true) {
+ throw new UnsupportedOperationException(
+ "newItemsAllowed not supported");
+ }
+ }
}