001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.servlet.taglib.ui;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    
019    import java.util.HashMap;
020    import java.util.List;
021    import java.util.Map;
022    
023    /**
024     * @author Sergio Gonz??lez
025     */
026    public class Menu extends BaseUIItem {
027    
028            public String getCssClass() {
029                    return _cssClass;
030            }
031    
032            public Map<String, Object> getData() {
033                    if (_data == null) {
034                            _data = new HashMap<>();
035                    }
036    
037                    return _data;
038            }
039    
040            public String getDirection() {
041                    return _direction;
042            }
043    
044            public String getIcon() {
045                    return _icon;
046            }
047    
048            public String getLabel() {
049                    return _label;
050            }
051    
052            public String getMarkupView() {
053                    return _markupView;
054            }
055    
056            public List<MenuItem> getMenuItems() {
057                    return _menuItems;
058            }
059    
060            public String getMessage() {
061                    return _message;
062            }
063    
064            public String getTriggerCssClass() {
065                    return _triggerCssClass;
066            }
067    
068            public boolean isExtended() {
069                    return _extended;
070            }
071    
072            public boolean isScroll() {
073                    return _scroll;
074            }
075    
076            public boolean isShowArrow() {
077                    return _showArrow;
078            }
079    
080            public boolean isShowExpanded() {
081                    return _showExpanded;
082            }
083    
084            public boolean isShowWhenSingleIcon() {
085                    return _showWhenSingleIcon;
086            }
087    
088            public void setCssClass(String cssClass) {
089                    _cssClass = cssClass;
090            }
091    
092            public void setData(Map<String, Object> data) {
093                    _data = data;
094            }
095    
096            public void setDirection(String direction) {
097                    _direction = direction;
098            }
099    
100            public void setExtended(boolean extended) {
101                    _extended = extended;
102            }
103    
104            public void setIcon(String icon) {
105                    _icon = icon;
106            }
107    
108            public void setLabel(String label) {
109                    _label = label;
110            }
111    
112            public void setMarkupView(String markupView) {
113                    _markupView = markupView;
114            }
115    
116            public void setMenuItems(List<MenuItem> menuItems) {
117                    _menuItems = menuItems;
118            }
119    
120            public void setMessage(String message) {
121                    _message = message;
122            }
123    
124            public void setScroll(boolean scroll) {
125                    _scroll = scroll;
126            }
127    
128            public void setShowArrow(boolean showArrow) {
129                    _showArrow = showArrow;
130            }
131    
132            public void setShowExpanded(boolean showExpanded) {
133                    _showExpanded = showExpanded;
134            }
135    
136            public void setShowWhenSingleIcon(boolean showWhenSingleIcon) {
137                    _showWhenSingleIcon = showWhenSingleIcon;
138            }
139    
140            public void setTriggerCssClass(String triggerCssClass) {
141                    _triggerCssClass = triggerCssClass;
142            }
143    
144            private String _cssClass = StringPool.BLANK;
145            private Map<String, Object> _data;
146            private String _direction = "left";
147            private boolean _extended = true;
148            private String _icon = StringPool.BLANK;
149            private String _label = StringPool.BLANK;
150            private String _markupView = StringPool.BLANK;
151            private List<MenuItem> _menuItems;
152            private String _message = StringPool.BLANK;
153            private boolean _scroll = true;
154            private boolean _showArrow = true;
155            private boolean _showExpanded;
156            private boolean _showWhenSingleIcon;
157            private String _triggerCssClass = StringPool.BLANK;
158    
159    }