1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.portal;
1819import org.apache.jetspeed.capability.CapabilityMap;
2021/***22 * The PortletSkin defines the color scheme to use for displaying a23 * specified portlet (and associated control)24 *25 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>26 * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>27 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>28 * @version $Id: PortletSkin.java,v 1.7 2004/02/23 04:05:35 jford Exp $29 */30publicinterfacePortletSkinextends java.util.Map
31 {
32publicstaticfinal String TEXT_COLOR = "text-color";
33publicstaticfinal String BACKGROUND_COLOR = "background-color";
34publicstaticfinal String TITLE_TEXT_COLOR = "title-text-color";
35publicstaticfinal String TITLE_BACKGROUND_COLOR = "title-background-color";
36publicstaticfinal String HIGHLIGHT_TEXT_COLOR = "highlight-text-color";
37publicstaticfinal String HIGHLIGHT_BACKGROUND_COLOR = "highlight-background-color";
38publicstaticfinal String CONTROLLER_STYLE_CLASS = "controller-style-class";
39publicstaticfinal String PORTLET_STYLE_CLASS = "portlet-style-class";
40publicstaticfinal String TITLE_STYLE_CLASS = "title-style-class";
41publicstaticfinal String CONTENT_STYLE_CLASS = "content-style-class";
42publicstaticfinal String HIGHLIGHT_TITLE_STYLE_CLASS = "highlight-title-style-class";
43publicstaticfinal String TAB_STYLE_CLASS = "tab-style-class";
44publicstaticfinal String TAB_TITLE_STYLE_CLASS = "tab-title-style-class";
45publicstaticfinal String TAB_CONTENT_STYLE_CLASS = "tab-content-style-class";
46publicstaticfinal String PORTLET_SKIN_CLASS = "portlet-skin-class";
4748/***49 * Returns the name of this color scheme50 * @return the color scheme name51 */52 String getName();
5354/***55 * Returns the color to use for displaying the portlet text56 * @return the text color value in HTML format (#RRGGBB)57 */58 String getTextColor();
5960/***61 * Sets the color to use for displaying the portlet text62 * @param color the text color value in HTML format (#RRGGBB)63 */64void setTextColor(String color);
6566/***67 * Returns the color to use for displaying the portlet background68 * @return the text color value in HTML format (#RRGGBB)69 */70 String getBackgroundColor();
7172/***73 * Sets the color to use for displaying the portlet background74 * @param backgroundColor the background color value in HTML format (#RRGGBB)75 */76void setBackgroundColor(String backgroundColor);
7778/***79 * Returns the color to use for displaying the portlet title text80 * @return the text color value in HTML format (#RRGGBB)81 */82 String getTitleTextColor();
8384/***85 * Sets the color to use for displaying the portlet title text86 * @param titleColor the title color value in HTML format (#RRGGBB)87 */88void setTitleTextColor(String titleColor);
8990/***91 * Returns the color to use for displaying the portlet title background92 * @return the background color value in HTML format (#RRGGBB)93 */94 String getTitleBackgroundColor();
9596/***97 * Sets the color to use for displaying the portlet title background98 * @param titleColor the title color value in HTML format (#RRGGBB)99 */100void setTitleBackgroundColor(String titleColor);
101102/***103 * Returns the color to use for displaying an highlighted text104 * @return the text color value in HTML format (#RRGGBB)105 */106 String getHighlightTextColor();
107108/***109 * Sets the color to use for displaying an highlighted text110 * @param titleColor a color value in HTML format (#RRGGBB)111 */112void setHighlightTextColor(String titleColor);
113114/***115 * Returns the color to use for displaying an highlighted background116 * @return the background color value in HTML format (#RRGGBB)117 */118 String getHighlightBackgroundColor();
119120/***121 * Sets the color to use for displaying an highlighted background122 * @param titleColor the title color value in HTML format (#RRGGBB)123 */124void setHighlightBackgroundColor(String titleColor);
125126/***127 * Returns the CSS class to use for the portlet overall128 * @return the CSS class to use (PortletStyleClass)129 */130 String getPortletStyleClass();
131132/***133 * Sets the CSS class to use for the portlet overall134 * @param portletStyleClass the new class to be used135 */136void setPortletStyleClass(String portletStyleClass);
137138/***139 * Returns the CSS class to use for the portlet title140 * @return the CSS class to use (TitleStyleClass)141 */142 String getTitleStyleClass();
143144/***145 * Sets the CSS class to use for the portlet title146 * @param titleStyleClass the new class to be used147 */148void setTitleStyleClass(String titleStyleClass);
149150/***151 * Returns the CSS class to use for the portlet content152 * @return the CSS class to use (ContentStyleClass)153 */154 String getContentStyleClass();
155156/***157 * Sets the CSS class to use for the portlet content158 * @param contentStyleClass the new class to be used159 */160void setContentStyleClass(String contentStyleClass);
161162/***163 * Returns the CSS class to use overall for the tabbed control164 * @return the CSS class to use (TabStyleClass)165 */166 String getTabStyleClass();
167168/***169 * Sets the CSS class to use for overall for the tabbed control170 * @param tabStyleClass the new class to be used171 */172void setTabStyleClass(String tabStyleClass);
173174/***175 * Returns the CSS class to use on the title of the tabbed control176 * @return the CSS class to use (TabTitleStyleClass)177 */178 String getTabTitleStyleClass();
179180/***181 * Sets the CSS class to use on the title of the tabbed control182 * @param tabTitleStyleClass the new class to be used183 */184void setTabTitleStyleClass(String tabTitleStyleClass);
185186/***187 * Returns the CSS class to use on the control of the tabbed control188 * @return the CSS class to use (TabContentStyleClass)189 */190 String getTabContentStyleClass();
191192/***193 * Sets the CSS class to use on the control of the tabbed control194 * @param tabContentStyleClass the new class to be used195 */196void setTabContentStyleClass(String tabContentStyleClass);
197198/***199 * Returns the CSS class to use on the control of the Highlighted titles on tab or menu item200 * @return the CSS class to use (HighlightTitleStyleClass)201 */202 String getHighlightTitleStyleClass();
203204/***205 * Sets the CSS class to use on the control of the Highlighted titles tab or menu item206 * @param highlightTabStyleClass the new class to be used207 */208void setHighlightTitleStyleClass(String highlightTitleStyleClass);
209210/***211 * Returns the CSS class to use for the Controller overall212 * @return the CSS class to use (ControllerStyleClass)213 */214 String getControllerStyleClass();
215216/***217 * Sets the CSS class to use for the controller overall218 * @param controllerStyleClass the new class to be used219 */220void setControllerStyleClass(String controllerStyleClass);
221222/***223 * Returns a named image from this skin. The skin property224 * must be prefixed with "image-" within the registry.225 * @param String name name of image to retreive.226 * <strong>DO NOT PREFIX WITH "image-"</strong>227 * as getImage will do this for you.228 * @param String dftPath realtive path to a default image if229 * the named one is not in the registry.230 * @return String relative path to the image231 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>232 */233 String getImage(String name, String dftPath);
234235/***236 * This allows the PortalToolKit to make the PortletSkin aware237 * of the current user-agents's capabilities238 * @param CapabilityMap cm Current capaibilities of the user-agent239 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>240 */241void setCapabilityMap(CapabilityMap cm);
242243/***244 * This returns the class to use for the entire portlet, based245 * on the cascading :246 * portlet has 9 possible class to be used in a skin :247 * ________________248 * - title (+ left/right) |__|__________|__|249 * | | | |250 * | | | |251 * - content (+ left/right) | | | |252 * | | | |253 * |__|__________|__|254 * - bottom (+ left/right) |__|__________|__|255 *256 * using cascading, we can change all of those class with one parent class257 * -> this is how PortletSkinClass is used258 */259 String getPortletSkinClass();
260261 }