Index: src/java/org/apache/jetspeed/portal/BasePortletSkin.java
===================================================================
RCS file: /home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSkin.java,v
retrieving revision 1.5
diff -u -r1.5 BasePortletSkin.java
--- src/java/org/apache/jetspeed/portal/BasePortletSkin.java 2 Apr 2003 15:09:58 -0000 1.5
+++ src/java/org/apache/jetspeed/portal/BasePortletSkin.java 9 Apr 2003 15:26:23 -0000
@@ -75,7 +75,7 @@
public String name = null;
private CapabilityMap cm;
private static final String[] VALID_EXTENSIONS = new String[] { "gif", "jpg", "png" };
-
+
/**
* Returns the name of this color scheme
* @return the color scheme name
@@ -84,7 +84,7 @@
{
return this.name;
}
-
+
/** Sets the name of this Skin
*/
public void setName(String name)
@@ -111,7 +111,7 @@
{
put(TEXT_COLOR,color);
}
- }
+ }
/**
* Returns the color to use for displaying the portlet background
@@ -132,8 +132,8 @@
{
put(BACKGROUND_COLOR,color);
}
- }
-
+ }
+
/**
* Returns the color to use for displaying the portlet title text
@@ -143,7 +143,7 @@
{
return (String)get(TITLE_TEXT_COLOR);
}
-
+
/**
* Sets the color to use for displaying the portlet title text
@@ -155,7 +155,7 @@
{
put(TITLE_TEXT_COLOR,color);
}
- }
+ }
/**
* Returns the color to use for displaying the portlet title background
@@ -165,7 +165,7 @@
{
return (String)get(TITLE_BACKGROUND_COLOR);
}
-
+
/**
* Sets the color to use for displaying the portlet title background
* @param titleColor the title color value in HTML format (#RRGGBB)
@@ -176,7 +176,7 @@
{
put(TITLE_BACKGROUND_COLOR,color);
}
- }
+ }
/**
* Returns the color to use for displaying an highlighted text
@@ -197,7 +197,7 @@
{
put(HIGHLIGHT_TEXT_COLOR,color);
}
- }
+ }
/**
* Returns the color to use for displaying an highlighted background
@@ -218,7 +218,7 @@
{
put(HIGHLIGHT_BACKGROUND_COLOR,color);
}
- }
+ }
/**
* Returns the CSS class to use for the portlet overall
@@ -239,7 +239,7 @@
{
put(PORTLET_STYLE_CLASS,portletStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use for the portlet title
@@ -260,7 +260,7 @@
{
put(TITLE_STYLE_CLASS,titleStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use for the portlet content
@@ -281,7 +281,7 @@
{
put(CONTENT_STYLE_CLASS,contentStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use overall for the tabbed control
@@ -302,7 +302,7 @@
{
put(TAB_STYLE_CLASS,tabStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use on the title of the tabbed control
@@ -323,7 +323,7 @@
{
put(TAB_TITLE_STYLE_CLASS,tabTitleStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use on the control of the tabbed control
@@ -344,7 +344,7 @@
{
put(TAB_CONTENT_STYLE_CLASS,tabContentStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use on the control of the Highlighted title tab or menu item
@@ -365,7 +365,7 @@
{
put(HIGHLIGHT_TITLE_STYLE_CLASS, highlightTitleStyleClass);
}
- }
+ }
/**
* Returns the CSS class to use for the controller overall
@@ -387,8 +387,28 @@
put(CONTROLLER_STYLE_CLASS,controllerStyleClass);
}
}
-
-
+
+ /**
+ * Returns the CSS class to use for the global skin rendering
+ * @see org.apache.jetspeed.portal.PortletSkin#getPortletSkinClass()
+ */
+ public String getPortletSkinClass()
+ {
+ return (String)get(PORTLET_SKIN_CLASS);
+ }
+
+ /**
+ * Sets the CSS class to use for the global skin rendering
+ * @param portletSkinClass the new class to be used
+ */
+ public void setPortletSkinClass(String portletSkinClass)
+ {
+ if (portletSkinClass!=null)
+ {
+ put(PORTLET_SKIN_CLASS,portletSkinClass);
+ }
+ }
+
/**
* @see org.apache.jetspeed.portal.PortletSkin#getImage(String, String)
*/
@@ -411,7 +431,7 @@
}
}
-
+
/**
* This allows the PortalToolKit to make the PortletSkin aware
* of the current user-agents's capabilities
@@ -422,24 +442,24 @@
{
this.cm = cm;
}
-
+
/**
* builds a media type specific path for the relative path provided
- */
+ */
private String buildMediaTypeSpecificPath(String relativePath)
{
String path = "images/" + cm.getPreferredMediaType() + "/skins/" + relativePath;
return path;
}
-
+
/**
* builds a media type specific path using this skin's name.
- */
+ */
private String buildMediaTypeSpecificPath()
- {
+ {
return buildMediaTypeSpecificPath(name);
}
-
+
private String imageDiscovery(String imageName)
{
String imagePathes = (String) get("image.paths");
@@ -469,7 +489,7 @@
}
return fullPath;
}
-
+
/**
* Does the path contain a valid image extension?
*/
@@ -479,9 +499,9 @@
|| (path.indexOf(".jpg") > -1)
|| (path.indexOf(".png") > -1);
}
-
+
/**
- * makes every attempt to locate a valid image based on the combination
+ * makes every attempt to locate a valid image based on the combination
* of an absoulte path and relative path or name. The relPath may pr may not
* contain a valid image extension (.gif, .png, .jpg).
*/
@@ -506,12 +526,12 @@
{
return path;
}
- }
+ }
}
-
+
return null;
}
-
+
/**
* Does this path exist in the current file system.
*/
Index: src/java/org/apache/jetspeed/portal/PortletSkin.java
===================================================================
RCS file: /home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletSkin.java,v
retrieving revision 1.5
diff -u -r1.5 PortletSkin.java
--- src/java/org/apache/jetspeed/portal/PortletSkin.java 2 Apr 2003 15:09:58 -0000 1.5
+++ src/java/org/apache/jetspeed/portal/PortletSkin.java 9 Apr 2003 15:26:24 -0000
@@ -81,7 +81,7 @@
public static final String TAB_STYLE_CLASS = "tab-style-class";
public static final String TAB_TITLE_STYLE_CLASS = "tab-title-style-class";
public static final String TAB_CONTENT_STYLE_CLASS = "tab-content-style-class";
- public static final String STYLESHEET = "stylesheet";
+ public static final String PORTLET_SKIN_CLASS = "portlet-skin-class";
/**
* Returns the name of this color scheme
@@ -256,11 +256,11 @@
* @param controllerStyleClass the new class to be used
*/
void setControllerStyleClass(String controllerStyleClass);
-
+
/**
* Returns a named image from this skin. The skin property
- * must be prefixed with "image-" within the registry.
- * @param String name name of image to retreive.
+ * must be prefixed with "image-" within the registry.
+ * @param String name name of image to retreive.
* DO NOT PREFIX WITH "image-"
* as getImage will do this for you.
* @param String dftPath realtive path to a default image if
@@ -269,7 +269,7 @@
* @author Scott T. Weaver
*/
String getImage(String name, String dftPath);
-
+
/**
* This allows the PortalToolKit to make the PortletSkin aware
* of the current user-agents's capabilities
@@ -277,5 +277,23 @@
* @author Scott T. Weaver
*/
void setCapabilityMap(CapabilityMap cm);
+
+ /**
+ * This returns the class to use for the entire portlet, based
+ * on the cascading :
+ * portlet has 9 possible class to be used in a skin :
+ * ________________
+ * - title (+ left/right) |__|__________|__|
+ * | | | |
+ * | | | |
+ * - content (+ left/right) | | | |
+ * | | | |
+ * |__|__________|__|
+ * - bottom (+ left/right) |__|__________|__|
+ *
+ * using cascading, we can change all of those class with one parent class
+ * -> this is how PortletSkinClass is used
+ */
+ String getPortletSkinClass();
}
Index: webapp/WEB-INF/conf/skins.xreg
===================================================================
RCS file: /home/cvspublic/jakarta-jetspeed/webapp/WEB-INF/conf/skins.xreg,v
retrieving revision 1.9
diff -u -r1.9 skins.xreg
--- webapp/WEB-INF/conf/skins.xreg 2 Apr 2003 15:09:58 -0000 1.9
+++ webapp/WEB-INF/conf/skins.xreg 9 Apr 2003 15:26:25 -0000
@@ -99,4 +99,7 @@