summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorelmot <elmot@vaadin.com>2016-09-14 17:48:50 +0300
committerVaadin Code Review <review@vaadin.com>2016-09-16 13:35:05 +0000
commit05c051717401660a857ee7a314361a1735f376e6 (patch)
tree7e9f94925a0f3360ceb3833ec43a23d7c7b49fa0 /shared
parent36ad322721e3548899cbca9516d91edabd252f2f (diff)
downloadvaadin-framework-05c051717401660a857ee7a314361a1735f376e6.tar.gz
vaadin-framework-05c051717401660a857ee7a314361a1735f376e6.zip
Create a RadioButtonGroup that replaces the single select case of OptionGroup
Change-Id: I56b0f1dfa889e2eaa3db9b0b0aac860f1bb4dea8
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupConstants.java30
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupState.java36
2 files changed, 66 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupConstants.java b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupConstants.java
new file mode 100644
index 0000000000..5278d211de
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupConstants.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2016 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.optiongroup;
+
+import java.io.Serializable;
+
+public class RadioButtonGroupConstants implements Serializable {
+ public static final String JSONKEY_ITEM_DISABLED = "d";
+
+ public static final String JSONKEY_ITEM_ICON = "i";
+
+ public static final String JSONKEY_ITEM_VALUE = "v";
+
+ public static final String JSONKEY_ITEM_KEY = "k";
+
+ public static final String JSONKEY_ITEM_SELECTED = "s";
+}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupState.java b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupState.java
new file mode 100644
index 0000000000..bdd007613c
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/ui/optiongroup/RadioButtonGroupState.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2000-2016 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.optiongroup;
+
+import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.annotations.DelegateToWidget;
+import com.vaadin.shared.ui.AbstractSingleSelectState;
+
+/**
+ * Shared state for the RadioButtonGroup component.
+ *
+ * @author Vaadin Ltd.
+ * @since 8.0
+ */
+public class RadioButtonGroupState extends AbstractSingleSelectState {
+
+ {
+ primaryStyleName = "v-select-optiongroup";
+ }
+
+ @DelegateToWidget
+ public boolean htmlContentAllowed = false;
+}