summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/ValueChangeMode.java (renamed from shared/src/main/java/com/vaadin/shared/ui/textfield/ValueChangeMode.java)2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaClientRpc.java29
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaServerRpc.java33
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaState.java52
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java1
5 files changed, 116 insertions, 1 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textfield/ValueChangeMode.java b/shared/src/main/java/com/vaadin/shared/ui/ValueChangeMode.java
index 39b1bb668a..00c7f2c548 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textfield/ValueChangeMode.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/ValueChangeMode.java
@@ -14,7 +14,7 @@
* the License.
*/
-package com.vaadin.shared.ui.textfield;
+package com.vaadin.shared.ui;
/**
* Different modes for when and how often field value changes are transmitted
diff --git a/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaClientRpc.java
new file mode 100644
index 0000000000..34c7e750db
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaClientRpc.java
@@ -0,0 +1,29 @@
+/*
+ * 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.richtextarea;
+
+import com.vaadin.shared.communication.ClientRpc;
+
+/**
+ * Server to client RPC interface for RichTextArea.
+ */
+public interface RichTextAreaClientRpc extends ClientRpc {
+
+ /**
+ * Selects everything in the field.
+ */
+ void selectAll();
+}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaServerRpc.java
new file mode 100644
index 0000000000..f8d6d9121d
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaServerRpc.java
@@ -0,0 +1,33 @@
+/*
+ * 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.richtextarea;
+
+import com.vaadin.shared.communication.ServerRpc;
+
+/**
+ * Client to server RPC interface for RichTextArea.
+ *
+ */
+public interface RichTextAreaServerRpc extends ServerRpc {
+
+ /**
+ * Sends the updated text to the server.
+ *
+ * @param text
+ * the text in the field
+ */
+ void setText(String text);
+}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaState.java b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaState.java
new file mode 100644
index 0000000000..75ce561ec3
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaState.java
@@ -0,0 +1,52 @@
+/*
+ * 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.richtextarea;
+
+import com.vaadin.shared.AbstractFieldState;
+import com.vaadin.shared.annotations.DelegateToWidget;
+import com.vaadin.shared.annotations.NoLayout;
+import com.vaadin.shared.ui.ValueChangeMode;
+
+/**
+ * State for RichTextArea.
+ *
+ */
+public class RichTextAreaState extends AbstractFieldState {
+ {
+ primaryStyleName = "v-richtextarea";
+ }
+
+ /**
+ * Maximum character count in text field.
+ */
+ @DelegateToWidget
+ @NoLayout
+ public int maxLength = -1;
+
+ /**
+ * The text in the field.
+ */
+ @DelegateToWidget
+ @NoLayout
+ public String value = "";
+
+ @NoLayout
+ public ValueChangeMode valueChangeMode = ValueChangeMode.LAZY;
+
+ @NoLayout
+ public int valueChangeTimeout = 400;
+
+}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
index 2eac070b5e..2e7b60d463 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
@@ -18,6 +18,7 @@ package com.vaadin.shared.ui.textfield;
import com.vaadin.shared.AbstractFieldState;
import com.vaadin.shared.annotations.DelegateToWidget;
import com.vaadin.shared.annotations.NoLayout;
+import com.vaadin.shared.ui.ValueChangeMode;
/**
* State class for AbstractTextField.