aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/MenuBar.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/MenuBar.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/MenuBar.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/server/src/main/java/com/vaadin/ui/MenuBar.java b/server/src/main/java/com/vaadin/ui/MenuBar.java
index 8f07b371e0..7b2437e772 100644
--- a/server/src/main/java/com/vaadin/ui/MenuBar.java
+++ b/server/src/main/java/com/vaadin/ui/MenuBar.java
@@ -49,7 +49,7 @@ import com.vaadin.ui.declarative.DesignContext;
*/
@SuppressWarnings("serial")
public class MenuBar extends AbstractComponent
-implements LegacyComponent, Focusable {
+ implements LegacyComponent, Focusable {
// Items of the top-level menu
private final List<MenuItem> menuItems;
@@ -147,8 +147,10 @@ implements LegacyComponent, Focusable {
}
ContentMode contentMode = item.getDescriptionContentMode();
- // If the contentMode is equal to ContentMode.PREFORMATTED, we don't add any attribute.
- if (contentMode != null && contentMode != ContentMode.PREFORMATTED) {
+ // If the contentMode is equal to ContentMode.PREFORMATTED, we don't
+ // add any attribute.
+ if (contentMode != null
+ && contentMode != ContentMode.PREFORMATTED) {
target.addAttribute(
MenuBarConstants.ATTRIBUTE_ITEM_DESCRIPTION_CONTENT_MODE,
contentMode.name());
@@ -631,7 +633,7 @@ implements LegacyComponent, Focusable {
*/
public MenuBar.MenuItem addItemBefore(String caption, Resource icon,
MenuBar.Command command, MenuBar.MenuItem itemToAddBefore)
- throws IllegalStateException {
+ throws IllegalStateException {
if (isCheckable()) {
throw new IllegalStateException(
"A checkable item cannot have children");
@@ -1153,11 +1155,13 @@ implements LegacyComponent, Focusable {
attr, boolean.class));
}
if (menuElement.hasAttr("description")) {
- String description = DesignAttributeHandler.readAttribute("description", attr, String.class);
+ String description = DesignAttributeHandler
+ .readAttribute("description", attr, String.class);
if (menuElement.hasAttr("descriptioncontentmode")) {
String contentModeString = DesignAttributeHandler.readAttribute(
"descriptioncontentmode", attr, String.class);
- menu.setDescription(description, ContentMode.valueOf(contentModeString));
+ menu.setDescription(description,
+ ContentMode.valueOf(contentModeString));
} else {
menu.setDescription(description);
}