aboutsummaryrefslogtreecommitdiffstats
path: root/shared/src
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 /shared/src
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 'shared/src')
-rw-r--r--shared/src/com/vaadin/shared/ui/audio/AudioState.java30
-rw-r--r--shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java9
-rw-r--r--shared/src/com/vaadin/shared/ui/grid/GridState.java5
-rw-r--r--shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java9
-rw-r--r--shared/src/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java28
-rw-r--r--shared/src/com/vaadin/shared/ui/select/AbstractSelectState.java30
-rw-r--r--shared/src/com/vaadin/shared/ui/table/TableState.java9
-rw-r--r--shared/src/com/vaadin/shared/ui/textarea/RichTextAreaState.java31
-rw-r--r--shared/src/com/vaadin/shared/ui/tree/TreeState.java9
-rw-r--r--shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java9
-rw-r--r--shared/src/com/vaadin/shared/ui/upload/UploadState.java30
11 files changed, 189 insertions, 10 deletions
diff --git a/shared/src/com/vaadin/shared/ui/audio/AudioState.java b/shared/src/com/vaadin/shared/ui/audio/AudioState.java
new file mode 100644
index 0000000000..1fedc6ab53
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/audio/AudioState.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.audio;
+
+import com.vaadin.shared.ui.AbstractMediaState;
+
+/**
+ * Shared state for the Audio component.
+ *
+ * @since
+ */
+public class AudioState extends AbstractMediaState {
+
+ {
+ primaryStyleName = "v-audio";
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java
index 4925f98b4d..69b8a47ba6 100644
--- a/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java
+++ b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java
@@ -15,9 +15,14 @@
*/
package com.vaadin.shared.ui.combobox;
-import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.ui.select.AbstractSelectState;
-public class ComboBoxState extends AbstractFieldState {
+/**
+ * Shared state for the ComboBox component.
+ *
+ * @since
+ */
+public class ComboBoxState extends AbstractSelectState {
{
primaryStyleName = "v-filterselect";
}
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridState.java b/shared/src/com/vaadin/shared/ui/grid/GridState.java
index 4ed878f1cb..54ccc78daa 100644
--- a/shared/src/com/vaadin/shared/ui/grid/GridState.java
+++ b/shared/src/com/vaadin/shared/ui/grid/GridState.java
@@ -137,6 +137,10 @@ public class GridState extends TabIndexState {
*/
public static final String JSONKEY_SELECTED = "s";
+ {
+ primaryStyleName = "v-grid";
+ }
+
/**
* Columns in grid.
*/
@@ -197,4 +201,5 @@ public class GridState extends TabIndexState {
/** Whether the columns can be reordered */
@DelegateToWidget
public boolean columnReorderingAllowed;
+
}
diff --git a/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
index 504e3dcdc8..7ad5045f94 100644
--- a/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
+++ b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java
@@ -15,9 +15,14 @@
*/
package com.vaadin.shared.ui.optiongroup;
-import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.ui.select.AbstractSelectState;
-public class OptionGroupState extends AbstractFieldState {
+/**
+ * Shared state for the OptionGroup component.
+ *
+ * @since
+ */
+public class OptionGroupState extends AbstractSelectState {
{
primaryStyleName = "v-select-optiongroup";
}
diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java
new file mode 100644
index 0000000000..0f75ec0501
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/orderedlayout/FormLayoutState.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.orderedlayout;
+
+/**
+ * Shared state for the FormLayout component.
+ *
+ * @since
+ */
+public class FormLayoutState extends AbstractOrderedLayoutState {
+
+ {
+ primaryStyleName = "v-formlayout";
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/select/AbstractSelectState.java b/shared/src/com/vaadin/shared/ui/select/AbstractSelectState.java
new file mode 100644
index 0000000000..9dc21ced1b
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/select/AbstractSelectState.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.select;
+
+import com.vaadin.shared.AbstractFieldState;
+
+/**
+ * Shared state for the AbstractSelect component.
+ *
+ * @since
+ */
+public class AbstractSelectState extends AbstractFieldState {
+
+ {
+ primaryStyleName = "v-select";
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/table/TableState.java b/shared/src/com/vaadin/shared/ui/table/TableState.java
index 4a89a99685..19a775323c 100644
--- a/shared/src/com/vaadin/shared/ui/table/TableState.java
+++ b/shared/src/com/vaadin/shared/ui/table/TableState.java
@@ -15,9 +15,14 @@
*/
package com.vaadin.shared.ui.table;
-import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.ui.select.AbstractSelectState;
-public class TableState extends AbstractFieldState {
+/**
+ * Shared state for the Table component.
+ *
+ * @since
+ */
+public class TableState extends AbstractSelectState {
{
primaryStyleName = "v-table";
}
diff --git a/shared/src/com/vaadin/shared/ui/textarea/RichTextAreaState.java b/shared/src/com/vaadin/shared/ui/textarea/RichTextAreaState.java
new file mode 100644
index 0000000000..b4679d5a9d
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/textarea/RichTextAreaState.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.textarea;
+
+import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
+
+/**
+ *
+ * Shared state for the RichTextArea component.
+ *
+ * @since
+ */
+public class RichTextAreaState extends AbstractTextFieldState {
+
+ {
+ primaryStyleName = "v-richtextarea";
+ }
+}
diff --git a/shared/src/com/vaadin/shared/ui/tree/TreeState.java b/shared/src/com/vaadin/shared/ui/tree/TreeState.java
index 9f237ce037..14e544120d 100644
--- a/shared/src/com/vaadin/shared/ui/tree/TreeState.java
+++ b/shared/src/com/vaadin/shared/ui/tree/TreeState.java
@@ -15,9 +15,14 @@
*/
package com.vaadin.shared.ui.tree;
-import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.ui.select.AbstractSelectState;
-public class TreeState extends AbstractFieldState {
+/**
+ * Shared state for the Table component.
+ *
+ * @since
+ */
+public class TreeState extends AbstractSelectState {
{
primaryStyleName = "v-tree";
}
diff --git a/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
index cccc2fb6ae..6f0a14f17f 100644
--- a/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
+++ b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java
@@ -15,9 +15,14 @@
*/
package com.vaadin.shared.ui.twincolselect;
-import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.ui.select.AbstractSelectState;
-public class TwinColSelectState extends AbstractFieldState {
+/**
+ * Shared state for the TwinColSelect component.
+ *
+ * @since
+ */
+public class TwinColSelectState extends AbstractSelectState {
{
primaryStyleName = "v-select-twincol";
}
diff --git a/shared/src/com/vaadin/shared/ui/upload/UploadState.java b/shared/src/com/vaadin/shared/ui/upload/UploadState.java
new file mode 100644
index 0000000000..79ed88e5b3
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/upload/UploadState.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.upload;
+
+import com.vaadin.shared.AbstractComponentState;
+
+/**
+ * Shared state for the Upload component.
+ *
+ * @since
+ */
+public class UploadState extends AbstractComponentState {
+
+ {
+ primaryStyleName = "v-upload";
+ }
+}