summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2015-09-24 11:53:58 +0300
committerDenis Anisimov <denis@vaadin.com>2015-10-16 09:58:35 +0300
commitbf030a07b0614c9782dd02669900529175069c15 (patch)
tree7609ceaac9d81f8994e7fa32f6d263a1e654f7b6 /server/src/com/vaadin/ui
parent5b4906440b4113674b5c7cd88be68c0581bc564e (diff)
downloadvaadin-framework-bf030a07b0614c9782dd02669900529175069c15.tar.gz
vaadin-framework-bf030a07b0614c9782dd02669900529175069c15.zip
Provide own states for a number of components (#18987).
Change-Id: I9fe4a332bb8170a6482610d1b83bad73e049a3a1
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java6
-rw-r--r--server/src/com/vaadin/ui/Audio.java6
-rw-r--r--server/src/com/vaadin/ui/ComboBox.java6
-rw-r--r--server/src/com/vaadin/ui/FormLayout.java6
-rw-r--r--server/src/com/vaadin/ui/OptionGroup.java6
-rw-r--r--server/src/com/vaadin/ui/RichTextArea.java6
-rw-r--r--server/src/com/vaadin/ui/Table.java10
-rw-r--r--server/src/com/vaadin/ui/Tree.java5
-rw-r--r--server/src/com/vaadin/ui/TreeTable.java6
-rw-r--r--server/src/com/vaadin/ui/TwinColSelect.java6
-rw-r--r--server/src/com/vaadin/ui/Upload.java6
11 files changed, 67 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 69eed32afb..9babf7e876 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -54,6 +54,7 @@ import com.vaadin.server.Resource;
import com.vaadin.server.VaadinSession;
import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
+import com.vaadin.shared.ui.select.AbstractSelectState;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignException;
@@ -2329,4 +2330,9 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
return element;
}
+
+ @Override
+ protected AbstractSelectState getState() {
+ return (AbstractSelectState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/Audio.java b/server/src/com/vaadin/ui/Audio.java
index 845bbd13b5..8b9fad2196 100644
--- a/server/src/com/vaadin/ui/Audio.java
+++ b/server/src/com/vaadin/ui/Audio.java
@@ -17,6 +17,7 @@
package com.vaadin.ui;
import com.vaadin.server.Resource;
+import com.vaadin.shared.ui.audio.AudioState;
/**
* The Audio component translates into an HTML5 &lt;audio&gt; element and as
@@ -64,4 +65,9 @@ public class Audio extends AbstractMedia {
setSource(source);
setShowControls(true);
}
+
+ @Override
+ protected AudioState getState() {
+ return (AudioState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java
index 1cf23468bb..b632cb0d8d 100644
--- a/server/src/com/vaadin/ui/ComboBox.java
+++ b/server/src/com/vaadin/ui/ComboBox.java
@@ -35,6 +35,7 @@ import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
import com.vaadin.shared.ui.combobox.ComboBoxConstants;
+import com.vaadin.shared.ui.combobox.ComboBoxState;
import com.vaadin.shared.ui.combobox.FilteringMode;
/**
@@ -383,6 +384,11 @@ public class ComboBox extends AbstractSelect implements
return textInputAllowed;
}
+ @Override
+ protected ComboBoxState getState() {
+ return (ComboBoxState) super.getState();
+ }
+
/**
* Returns the filtered options for the current page using a container
* filter.
diff --git a/server/src/com/vaadin/ui/FormLayout.java b/server/src/com/vaadin/ui/FormLayout.java
index 1c8b196b31..f6f711d658 100644
--- a/server/src/com/vaadin/ui/FormLayout.java
+++ b/server/src/com/vaadin/ui/FormLayout.java
@@ -17,6 +17,7 @@
package com.vaadin.ui;
import com.vaadin.shared.ui.MarginInfo;
+import com.vaadin.shared.ui.orderedlayout.FormLayoutState;
/**
* FormLayout is used by {@link Form} to layout fields. It may also be used
@@ -71,4 +72,9 @@ public class FormLayout extends AbstractOrderedLayout {
public float getExpandRatio(Component component) {
return super.getExpandRatio(component);
}
+
+ @Override
+ protected FormLayoutState getState() {
+ return (FormLayoutState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java
index 37517bd1f2..81e81c9a3a 100644
--- a/server/src/com/vaadin/ui/OptionGroup.java
+++ b/server/src/com/vaadin/ui/OptionGroup.java
@@ -32,6 +32,7 @@ import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.shared.ui.optiongroup.OptionGroupConstants;
+import com.vaadin.shared.ui.optiongroup.OptionGroupState;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignFormatter;
@@ -288,4 +289,9 @@ public class OptionGroup extends AbstractSelect implements
return elem;
}
+
+ @Override
+ protected OptionGroupState getState() {
+ return (OptionGroupState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/RichTextArea.java b/server/src/com/vaadin/ui/RichTextArea.java
index eff669c4c6..2f0ba215b9 100644
--- a/server/src/com/vaadin/ui/RichTextArea.java
+++ b/server/src/com/vaadin/ui/RichTextArea.java
@@ -23,6 +23,7 @@ import org.jsoup.nodes.Element;
import com.vaadin.data.Property;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
+import com.vaadin.shared.ui.textarea.RichTextAreaState;
import com.vaadin.ui.declarative.DesignContext;
/**
@@ -308,4 +309,9 @@ public class RichTextArea extends AbstractField<String> implements
super.writeDesign(design, designContext);
design.html(getValue());
}
+
+ @Override
+ protected RichTextAreaState getState() {
+ return (RichTextAreaState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index a6b40ff06b..69874d9947 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -68,6 +68,7 @@ import com.vaadin.shared.ui.MultiSelectMode;
import com.vaadin.shared.ui.table.TableConstants;
import com.vaadin.shared.ui.table.TableConstants.Section;
import com.vaadin.shared.ui.table.TableServerRpc;
+import com.vaadin.shared.ui.table.TableState;
import com.vaadin.shared.util.SharedUtil;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
@@ -1033,8 +1034,8 @@ public class Table extends AbstractSelect implements Action.Container,
* </p>
*
* <p>
- * If Table has height set ({@link #setHeight(float, Unit)} ) the client side
- * may update the page length automatically the correct value.
+ * If Table has height set ({@link #setHeight(float, Unit)} ) the client
+ * side may update the page length automatically the correct value.
* </p>
*
* @param pageLength
@@ -6455,6 +6456,11 @@ public class Table extends AbstractSelect implements Action.Container,
}
}
+ @Override
+ protected TableState getState() {
+ return (TableState) super.getState();
+ }
+
private final Logger getLogger() {
if (logger == null) {
logger = Logger.getLogger(Table.class.getName());
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java
index de8e74bb03..c46f7ca6ee 100644
--- a/server/src/com/vaadin/ui/Tree.java
+++ b/server/src/com/vaadin/ui/Tree.java
@@ -61,6 +61,7 @@ import com.vaadin.shared.ui.MultiSelectMode;
import com.vaadin.shared.ui.dd.VerticalDropLocation;
import com.vaadin.shared.ui.tree.TreeConstants;
import com.vaadin.shared.ui.tree.TreeServerRpc;
+import com.vaadin.shared.ui.tree.TreeState;
import com.vaadin.ui.declarative.DesignAttributeHandler;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignException;
@@ -1973,4 +1974,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
return htmlContentAllowed;
}
+ @Override
+ protected TreeState getState() {
+ return (TreeState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java
index 254d8774a9..bf38148aa9 100644
--- a/server/src/com/vaadin/ui/TreeTable.java
+++ b/server/src/com/vaadin/ui/TreeTable.java
@@ -41,6 +41,7 @@ import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.Resource;
import com.vaadin.shared.ui.treetable.TreeTableConstants;
+import com.vaadin.shared.ui.treetable.TreeTableState;
import com.vaadin.ui.Tree.CollapseEvent;
import com.vaadin.ui.Tree.CollapseListener;
import com.vaadin.ui.Tree.ExpandEvent;
@@ -972,4 +973,9 @@ public class TreeTable extends Table implements Hierarchical {
isCollapsed(itemId), true, boolean.class);
return tr;
}
+
+ @Override
+ protected TreeTableState getState() {
+ return (TreeTableState) super.getState();
+ }
}
diff --git a/server/src/com/vaadin/ui/TwinColSelect.java b/server/src/com/vaadin/ui/TwinColSelect.java
index 37e3b7ccb9..8086220c94 100644
--- a/server/src/com/vaadin/ui/TwinColSelect.java
+++ b/server/src/com/vaadin/ui/TwinColSelect.java
@@ -22,6 +22,7 @@ import com.vaadin.data.Container;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants;
+import com.vaadin.shared.ui.twincolselect.TwinColSelectState;
/**
* Multiselect component with two lists: left side for available items and right
@@ -205,4 +206,9 @@ public class TwinColSelect extends AbstractSelect {
return leftColumnCaption;
}
+ @Override
+ protected TwinColSelectState getState() {
+ return (TwinColSelectState) super.getState();
+ }
+
}
diff --git a/server/src/com/vaadin/ui/Upload.java b/server/src/com/vaadin/ui/Upload.java
index 2da7db53b5..a61bcf1bd9 100644
--- a/server/src/com/vaadin/ui/Upload.java
+++ b/server/src/com/vaadin/ui/Upload.java
@@ -31,6 +31,7 @@ import com.vaadin.server.StreamVariable.StreamingProgressEvent;
import com.vaadin.shared.EventId;
import com.vaadin.shared.ui.upload.UploadClientRpc;
import com.vaadin.shared.ui.upload.UploadServerRpc;
+import com.vaadin.shared.ui.upload.UploadState;
import com.vaadin.util.ReflectTools;
/**
@@ -1192,4 +1193,9 @@ public class Upload extends AbstractComponent implements Component.Focusable,
}
return super.getListeners(eventType);
}
+
+ @Override
+ protected UploadState getState() {
+ return (UploadState) super.getState();
+ }
}