aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-18 18:58:53 +0200
committerArtur Signell <artur@vaadin.com>2014-12-18 18:58:53 +0200
commit280020c405cb1810fe52554d493d0f6a80eb0c1e (patch)
tree8da302c50b0c65cba7ef9a6433f71b8b4ffc819a /server
parent80194b35cc1fe40e05da2260531cbf744bc739c1 (diff)
parente3d0fbbab68f9ef8642a975741d9f576993b1f38 (diff)
downloadvaadin-framework-280020c405cb1810fe52554d493d0f6a80eb0c1e.tar.gz
vaadin-framework-280020c405cb1810fe52554d493d0f6a80eb0c1e.zip
Merge remote-tracking branch 'origin/grid' into 7.4
Conflicts: server/src/com/vaadin/data/util/AbstractInMemoryContainer.java Change-Id: Ic7ed64fa870c435f6cad3e6e436a3b8d6457de41
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/data/util/AbstractInMemoryContainer.java7
-rw-r--r--server/src/com/vaadin/ui/AbstractColorPicker.java8
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java29
-rw-r--r--server/src/com/vaadin/ui/Button.java7
4 files changed, 43 insertions, 8 deletions
diff --git a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
index 0c9937ecb8..be42ee26e0 100644
--- a/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
+++ b/server/src/com/vaadin/data/util/AbstractInMemoryContainer.java
@@ -981,7 +981,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
*
* @since 7.4
*
- * @param postion
+ * @param position
* position of the added item in the view
* @param itemId
* id of the added item
@@ -1016,8 +1016,9 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE
*
* @since 7.4
*
- * @param postion
- * position of the removed item in the view prior to removal
+ * @param position
+ * position of the removed item in the view prior to removal (if
+ * was visible)
* @param itemId
* id of the removed item, of type {@link Object} to satisfy
* {@link Container#removeItem(Object)} API
diff --git a/server/src/com/vaadin/ui/AbstractColorPicker.java b/server/src/com/vaadin/ui/AbstractColorPicker.java
index acf3b2c042..608a42d33b 100644
--- a/server/src/com/vaadin/ui/AbstractColorPicker.java
+++ b/server/src/com/vaadin/ui/AbstractColorPicker.java
@@ -455,9 +455,11 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
* @param htmlContentAllowed
* <code>true</code> if caption is rendered as HTML,
* <code>false</code> otherwise
+ * @deprecated as of , use {@link #setCaptionAsHtml(boolean)} instead
*/
+ @Deprecated
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
- getState().htmlContentAllowed = htmlContentAllowed;
+ setCaptionAsHtml(htmlContentAllowed);
}
/**
@@ -465,8 +467,10 @@ public abstract class AbstractColorPicker extends AbstractComponent implements
*
* @return <code>true</code> if the caption text is to be rendered as HTML,
* <code>false</code> otherwise
+ * @deprecated as of , use {@link #isCaptionAsHtml()} instead
*/
+ @Deprecated
public boolean isHtmlContentAllowed() {
- return getState(false).htmlContentAllowed;
+ return isCaptionAsHtml();
}
}
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 735fb15fd8..9ff6dff21e 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -265,6 +265,35 @@ public abstract class AbstractComponent extends AbstractClientConnector
getState().caption = caption;
}
+ /**
+ * Sets whether the caption is rendered as HTML.
+ * <p>
+ * If set to true, the captions are rendered in the browser as HTML and the
+ * developer is responsible for ensuring no harmful HTML is used. If set to
+ * false, the caption is rendered in the browser as plain text.
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @param captionAsHtml
+ * true if the captions are rendered as HTML, false if rendered
+ * as plain text
+ */
+ public void setCaptionAsHtml(boolean captionAsHtml) {
+ getState().captionAsHtml = captionAsHtml;
+ }
+
+ /**
+ * Checks whether captions are rendered as HTML
+ * <p>
+ * The default is false, i.e. to render that caption as plain text.
+ *
+ * @return true if the captions are rendered as HTML, false if rendered as
+ * plain text
+ */
+ public boolean isCaptionAsHtml() {
+ return getState(false).captionAsHtml;
+ }
+
/*
* Don't add a JavaDoc comment here, we use the default documentation from
* implemented interface.
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java
index c102157bf1..677f29ba13 100644
--- a/server/src/com/vaadin/ui/Button.java
+++ b/server/src/com/vaadin/ui/Button.java
@@ -642,7 +642,7 @@ public class Button extends AbstractComponent implements
/**
* Set whether the caption text is rendered as HTML or not. You might need
- * to retheme button to allow higher content than the original text style.
+ * to re-theme button to allow higher content than the original text style.
*
* If set to true, the captions are passed to the browser as html and the
* developer is responsible for ensuring no harmful html is used. If set to
@@ -653,7 +653,7 @@ public class Button extends AbstractComponent implements
* <code>false</code> otherwise
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
- getState().htmlContentAllowed = htmlContentAllowed;
+ getState().captionAsHtml = htmlContentAllowed;
}
/**
@@ -663,7 +663,7 @@ public class Button extends AbstractComponent implements
* <code>false</code> otherwise
*/
public boolean isHtmlContentAllowed() {
- return getState(false).htmlContentAllowed;
+ return getState(false).captionAsHtml;
}
/*
@@ -711,6 +711,7 @@ public class Button extends AbstractComponent implements
result.add("icon-alternate-text");
result.add("click-shortcut");
result.add("html-content-allowed");
+ result.add("caption-as-html");
return result;
}