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;
1819/***20 * The PortletControl acts both as a decoration around a Portlet or PortletSet21 * and also as the window manager for the enclosed Portlet(Set).22 * As such it controls the operation that may be performed on this portlet23 * and whether the portlet content should be displayed or not.24 * PortletControl also delegates all Portlet and PortletSet methods to its25 * inner object and can thus be transparently cascaded or substituted to26 * a simple portlet wherever in a PSML object tree.27 *28 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>29 * @version $Id: PortletControl.java,v 1.24 2004/02/23 04:05:35 jford Exp $30 */31publicinterfacePortletControlextends Portlet, PortletSet32 {
3334public String COLOR = "#CCCCCC";
35public String BACKGROUND_COLOR = "#FFFFFF";
36public String TITLE_COLOR = "#DDDDDD";
37public String WIDTH = "100%";
3839/***40 * @return the PortletControl specific configuration41 */42publicPortletControlConfig getConfig();
4344/***45 * Sets the PortletControl specific configuration46 * @param conf the new PortletControl configuration47 */48publicvoid setConfig(PortletControlConfig conf);
4950/***51 * Sets the portlet to be managed by this control52 * 53 * @param portlet the new portlet to be managed by the control54 */55publicvoid setPortlet(Portlet portlet);
5657/***58 * Retrieves the portlet managed by this control59 * @return the portlet object managed or null60 */61publicPortlet getPortlet();
6263/***64 * Initializes the control and associates it with a portlet65 *66 * @param portlet the portlet to be managed by this control67 */68publicvoid init( Portlet portlet );
6970/***71 * Returns the color to use for displaying the portlet text72 * 73 * This method is deprecated and is only useful for ECS74 * based Control implementation75 * @deprecated76 * @return the text color value in HTML format (#RRGGBB)77 */78public String getColor();
7980/***81 * Sets the color to use for displaying the portlet text82 * 83 * This method is deprecated and is only useful for ECS84 * based Control implementation85 * @deprecated86 * @param color the text color value in HTML format (#RRGGBB)87 */88publicvoid setColor(String color);
8990/***91 * Returns the color to use for displaying the portlet background92 * 93 * This method is deprecated and is only useful for ECS94 * based Control implementation95 * @deprecated96 * @return the text color value in HTML format (#RRGGBB)97 */98public String getBackgroundColor();
99100/***101 * Sets the color to use for displaying the portlet background102 * 103 * This method is deprecated and is only useful for ECS104 * based Control implementation105 * @deprecated106 * @param backgroundColor the background color value in HTML format (#RRGGBB)107 */108publicvoid setBackgroundColor(String backgroundColor);
109110/***111 * Returns the color to use for displaying the portlet title112 * 113 * This method is deprecated and is only useful for ECS114 * based Control implementation115 * @deprecated116 * @return the text color value in HTML format (#RRGGBB)117 */118public String getTitleColor();
119120/***121 * Sets the color to use for displaying the portlet title122 * 123 * This method is deprecated and is only useful for ECS124 * based Control implementation125 * @deprecated126 * @param titleColor the title color value in HTML format (#RRGGBB)127 */128publicvoid setTitleColor(String titleColor);
129130/***131 * Returns the width of the managed portlet relative to the size of132 * portlet control.133 * This method is deprecated and is only useful for ECS134 * based Control implementation135 * @deprecated136 * @return the size value. May be expressed in percentages (eg, "80%")137 */138public String getWidth();
139140/***141 * Sets the width of the managed portlet relative to the size of142 * portlet control.143 * 144 * This method is deprecated and is only useful for ECS145 * based Control implementation146 * @deprecated147 * @param width the width of portlet. Must be a positive, non nul integer148 */149publicvoid setWidth(int width);
150151/***152 * Sets the width of the managed portlet relative to the size of153 * portlet control.154 * 155 * This method is deprecated and is only useful for ECS156 * based Control implementation157 * @deprecated158 * @param width the width of portlet. Must be parseable as a positive, non 159 * nul integer or a percentage160 */161publicvoid setWidth(String width);
162 }