aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java')
-rw-r--r--server/src/main/java/com/vaadin/ui/CheckBox.java48
-rw-r--r--server/src/main/java/com/vaadin/ui/HasStyleNames.java20
-rw-r--r--server/src/main/java/com/vaadin/ui/MenuBar.java4
3 files changed, 40 insertions, 32 deletions
diff --git a/server/src/main/java/com/vaadin/ui/CheckBox.java b/server/src/main/java/com/vaadin/ui/CheckBox.java
index c0e259f330..0a54db5ccf 100644
--- a/server/src/main/java/com/vaadin/ui/CheckBox.java
+++ b/server/src/main/java/com/vaadin/ui/CheckBox.java
@@ -79,7 +79,7 @@ public class CheckBox extends AbstractField<Boolean>
private final CheckBox checkBox;
- private CheckBoxInputElement(CheckBox checkBox){
+ private CheckBoxInputElement(CheckBox checkBox) {
this.checkBox = checkBox;
}
@@ -88,9 +88,11 @@ public class CheckBox extends AbstractField<Boolean>
public String getStyleName() {
// replaced String with StringBuilder
StringBuilder s = new StringBuilder();
- if (ComponentStateUtil.hasStyles(checkBox.getState(false).inputStyles)) {
- for (final Iterator<String> it = checkBox.getState(false).inputStyles
- .iterator(); it.hasNext();) {
+ if (ComponentStateUtil
+ .hasStyles(checkBox.getState(false).inputStyles)) {
+ for (final Iterator<String> it = checkBox
+ .getState(false).inputStyles.iterator(); it
+ .hasNext();) {
s.append(it.next());
if (it.hasNext()) {
s.append(" ");
@@ -124,7 +126,8 @@ public class CheckBox extends AbstractField<Boolean>
if (style == null || style.isEmpty()) {
return;
}
- if (checkBox.getState().inputStyles != null && checkBox.getState().inputStyles.contains(style)) {
+ if (checkBox.getState().inputStyles != null
+ && checkBox.getState().inputStyles.contains(style)) {
return;
}
if (style.contains(" ")) {
@@ -149,7 +152,8 @@ public class CheckBox extends AbstractField<Boolean>
if (ComponentStateUtil.hasStyles(checkBox.getState().inputStyles)) {
StringTokenizer tokenizer = new StringTokenizer(style, " ");
while (tokenizer.hasMoreTokens()) {
- checkBox.getState().inputStyles.remove(tokenizer.nextToken());
+ checkBox.getState().inputStyles
+ .remove(tokenizer.nextToken());
}
}
}
@@ -162,7 +166,7 @@ public class CheckBox extends AbstractField<Boolean>
private final CheckBox checkBox;
- private CheckBoxLabelElement(CheckBox checkBox){
+ private CheckBoxLabelElement(CheckBox checkBox) {
this.checkBox = checkBox;
}
@@ -171,9 +175,11 @@ public class CheckBox extends AbstractField<Boolean>
public String getStyleName() {
// replaced String with StringBuilder
StringBuilder s = new StringBuilder();
- if (ComponentStateUtil.hasStyles(checkBox.getState(false).labelStyles)) {
- for (final Iterator<String> it = checkBox.getState(false).labelStyles
- .iterator(); it.hasNext();) {
+ if (ComponentStateUtil
+ .hasStyles(checkBox.getState(false).labelStyles)) {
+ for (final Iterator<String> it = checkBox
+ .getState(false).labelStyles.iterator(); it
+ .hasNext();) {
s.append(it.next());
if (it.hasNext()) {
s.append(" ");
@@ -207,7 +213,8 @@ public class CheckBox extends AbstractField<Boolean>
if (style == null || style.isEmpty()) {
return;
}
- if (checkBox.getState().labelStyles != null && checkBox.getState().labelStyles.contains(style)) {
+ if (checkBox.getState().labelStyles != null
+ && checkBox.getState().labelStyles.contains(style)) {
return;
}
if (style.contains(" ")) {
@@ -232,7 +239,8 @@ public class CheckBox extends AbstractField<Boolean>
if (ComponentStateUtil.hasStyles(checkBox.getState().labelStyles)) {
StringTokenizer tokenizer = new StringTokenizer(style, " ");
while (tokenizer.hasMoreTokens()) {
- checkBox.getState().labelStyles.remove(tokenizer.nextToken());
+ checkBox.getState().labelStyles
+ .remove(tokenizer.nextToken());
}
}
}
@@ -386,28 +394,28 @@ public class CheckBox extends AbstractField<Boolean>
}
/**
- * Returns the {@link CheckBoxInputElement} element to manipulate
- * the style name of the {@code input} element of the {@link CheckBox}.
+ * Returns the {@link CheckBoxInputElement} element to manipulate the style
+ * name of the {@code input} element of the {@link CheckBox}.
*
- * @since
+ * @since 8.7
* @return the current {@link CheckBoxInputElement}, not {@code null}.
*/
public CheckBoxInputElement getInputElement() {
- if(checkBoxInputElement == null) {
+ if (checkBoxInputElement == null) {
checkBoxInputElement = new CheckBoxInputElement(this);
}
return checkBoxInputElement;
}
/**
- * Returns the {@link CheckBoxLabelElement} element to manipulate
- * the style name of the {@code label} element of the {@link CheckBox}.
+ * Returns the {@link CheckBoxLabelElement} element to manipulate the style
+ * name of the {@code label} element of the {@link CheckBox}.
*
- * @since
+ * @since 8.7
* @return the current {@link CheckBoxLabelElement}, not {@code null}.
*/
public CheckBoxLabelElement getLabelElement() {
- if(checkBoxLabelElement == null) {
+ if (checkBoxLabelElement == null) {
checkBoxLabelElement = new CheckBoxLabelElement(this);
}
return checkBoxLabelElement;
diff --git a/server/src/main/java/com/vaadin/ui/HasStyleNames.java b/server/src/main/java/com/vaadin/ui/HasStyleNames.java
index 953711b1e6..2485c57597 100644
--- a/server/src/main/java/com/vaadin/ui/HasStyleNames.java
+++ b/server/src/main/java/com/vaadin/ui/HasStyleNames.java
@@ -21,11 +21,11 @@ import java.io.Serializable;
* Implemented by components which support style names.
*
* <p>
- * Each style name will occur only once as specified and it is not
- * prefixed with the style name of the component.
+ * Each style name will occur only once as specified and it is not prefixed with
+ * the style name of the component.
* </p>
*
- * @since
+ * @since 8.7
*/
public interface HasStyleNames extends Serializable {
@@ -40,7 +40,7 @@ public interface HasStyleNames extends Serializable {
* added.
* </p>
*
- * @since
+ * @since 8.7
* @return the style name or a space-separated list of user-defined style
* names of the component
* @see #setStyleName(String)
@@ -62,7 +62,7 @@ public interface HasStyleNames extends Serializable {
* removing those defined in other layers.
* </p>
*
- * @since
+ * @since 8.7
* @param style
* the new style or styles of the component as a space-separated
* list
@@ -83,7 +83,7 @@ public interface HasStyleNames extends Serializable {
* Functionally this is equivalent to using {@link #addStyleName(String)} or
* {@link #removeStyleName(String)}
*
- * @since
+ * @since 8.7
* @param style
* the style name to be added or removed
* @param add
@@ -106,7 +106,7 @@ public interface HasStyleNames extends Serializable {
* be rendered as a HTML class name, which can be used in a CSS definition.
*
*
- * @since
+ * @since 8.7
* @param style
* the new style to be added to the component
* @see #getStyleName()
@@ -119,7 +119,7 @@ public interface HasStyleNames extends Serializable {
* Adds one or more style names to this component by using one or multiple
* parameters.
*
- * @since
+ * @since 8.7
* @param styles
* the style name or style names to be added to the component
* @see #addStyleName(String)
@@ -143,7 +143,7 @@ public interface HasStyleNames extends Serializable {
* style names defined in Vaadin or GWT can not be removed.
* </p>
*
- * @since
+ * @since 8.7
* @param style
* the style name or style names to be removed
* @see #getStyleName()
@@ -163,7 +163,7 @@ public interface HasStyleNames extends Serializable {
* style names defined in Vaadin or GWT can not be removed.
* </p>
*
- * @since
+ * @since 8.7
* @param styles
* the style name or style names to be removed
* @see #removeStyleName(String)
diff --git a/server/src/main/java/com/vaadin/ui/MenuBar.java b/server/src/main/java/com/vaadin/ui/MenuBar.java
index ce43802cc5..137e6ea522 100644
--- a/server/src/main/java/com/vaadin/ui/MenuBar.java
+++ b/server/src/main/java/com/vaadin/ui/MenuBar.java
@@ -455,7 +455,7 @@ public class MenuBar extends AbstractComponent
* {@link com.vaadin.client.ui.menubar.MenuBarConnector#updateFromUIDL(UIDL, ApplicationConnection)}
* after mouseDownEvent
*
- * @since
+ * @since 8.7
*/
public int getDelayMs() {
return getState(false).delayMs;
@@ -466,7 +466,7 @@ public class MenuBar extends AbstractComponent
* {@link com.vaadin.client.ui.menubar.MenuBarConnector#updateFromUIDL(UIDL, ApplicationConnection)}
* after mouseDownEvent
*
- * @since
+ * @since 8.7
*/
public void setDelayMs(int delayMs) {
getState().delayMs = delayMs;