You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by jw...@apache.org on 2006/11/30 01:02:44 UTC
svn commit: r480797 - in
/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main:
java/org/apache/myfaces/trinidadinternal/renderkit/core/
java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/
java/org/apache/myfaces/trinid...
Author: jwaldman
Date: Wed Nov 29 17:02:41 2006
New Revision: 480797
URL: http://svn.apache.org/viewvc?view=rev&rev=480797
Log:
Additions to jwaldman-portal branch:
isPortlet hook in CoreRenderKit
Added Simple+Minimal Portlet skins + registered them in SkinUtils
Added simple-portlet.xss
Added:
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/MinimalPortletSkinExtension.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/simple-portlet.xss
Modified:
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinFactoryImpl.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java
incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java Wed Nov 29 17:02:41 2006
@@ -148,6 +148,15 @@
}
return "org.apache.myfaces.trinidad.core.desktop";
}
+
+ static public boolean isPortlet(FacesContext context)
+ {
+ RequestContext afc = RequestContext.getCurrentInstance();
+ if (afc != null)
+ return (OUTPUT_MODE_PORTLET.equals(afc.getOutputMode()));
+ else
+ return false;
+ }
public CoreRenderKit()
{
Added: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/MinimalPortletSkinExtension.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/MinimalPortletSkinExtension.java?view=auto&rev=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/MinimalPortletSkinExtension.java (added)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/MinimalPortletSkinExtension.java Wed Nov 29 17:02:41 2006
@@ -0,0 +1,39 @@
+ /* Copyright (c) 2001, 2006, Oracle. All rights reserved. */
+
+package org.apache.myfaces.trinidadinternal.renderkit.core.skin;
+
+
+import java.util.Map;
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.skin.Skin;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
+import org.apache.myfaces.trinidadinternal.skin.SkinExtension;
+
+/**
+ * Implementation the Minimal Portlet Skin for desktop
+ * browsers.
+ */
+ public class MinimalPortletSkinExtension extends SkinExtension
+
+ {
+ /**
+ * Creates an MinimalPortletSkinExtension instance which extends
+ * the specified base Skin. (should be SimplePortletSkin)
+ */
+ public MinimalPortletSkinExtension(Skin baseSkin)
+ {
+ super(baseSkin,
+ "minimal.portlet",
+ "minimal",
+ XhtmlConstants.OUTPUT_MODE_PORTLET);
+ }
+
+ public Map<String, String> getStyleClassMap(
+ RenderingContext arc
+ )
+ {
+ // get base skin and call that map.
+ return getBaseSkin().getStyleClassMap(arc);
+ }
+ }
Added: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java?view=auto&rev=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java (added)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java Wed Nov 29 17:02:41 2006
@@ -0,0 +1,515 @@
+/*
+** Copyright (c) 2001-2005, Oracle Corporation. All Rights Reserved.
+**
+**34567890123456789012345678901234567890123456789012345678901234567890123456789
+*/
+package org.apache.myfaces.trinidadinternal.renderkit.core.skin;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit;
+import org.apache.myfaces.trinidadinternal.renderkit.core.skin.BaseDesktopSkin;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
+import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafConstants;
+import org.apache.myfaces.trinidadinternal.ui.laf.simple.desktop.SimpleDesktopConstants;
+
+/**
+ * Skin implementation for simple portlet
+ */
+public class SimplePortletSkin extends BaseDesktopSkin
+{
+ /**
+ * Returns the name of the XSS style sheet for this Skin.
+ */
+ public String getStyleSheetName()
+ {
+ return "META-INF/adf/styles/simple-portlet.xss";
+ }
+
+ /**
+ * Returns the id for the portlet implementation of the Simple
+ * Skin: "simple.portlet".
+ */
+ public String getId()
+ {
+ return "simple.portlet";
+ }
+
+ /**
+ * Returns the family for the portlet implementation of the Simple
+ * Skin: "simple.portlet".
+ */
+ public String getFamily()
+ {
+ return "simple";
+ }
+
+ /**
+ * Returns the renderKitId for the portlet implementation of the Simple
+ * Skin.
+ */
+ public String getRenderKitId()
+ {
+ return CoreRenderKit.OUTPUT_MODE_PORTLET;
+ }
+
+
+/*** =-=jmwSKIN. This split the styleclass, then mapped each one. We are only returning a map, so will it work? I should...
+ * I think. It might not work if they set a styleClass. Test, test, test.
+ public String getStyleClass(
+ String styleClass)
+ {
+ String[] stylesArray = styleClass.split("\\s");
+ StringBuffer buffer = new StringBuffer(styleClass.length()*3);
+ boolean isNullStyle = false;
+
+ for (int i=0; i < stylesArray.length; i++)
+ {
+ String portletStyleClass = (String)_STYLES_MAP.get(stylesArray[i]);
+ if (_NULL_STYLE.equals(portletStyleClass))
+ isNullStyle = true;
+ else if (portletStyleClass != null)
+ buffer.append(portletStyleClass);
+
+ }
+ String bufferString = buffer.toString();
+ if (isNullStyle && "".equals(bufferString))
+ return "";
+ else
+ // if nothing was mapped, return the style class
+ return ("".equals(bufferString)) ? styleClass : bufferString;
+ }
+ ***/
+
+
+ /**
+ * Returns the style class map, or null if there is no map.
+ * The style class map for Portlet skins is a full style class name TO portlet style class name
+ * map. It does not compress style classes.
+ * @param arc RenderingContext
+ * @return Map<String, String> It should be a map that contains the full style class name as
+ * the key, and the value is a portlet style class.
+ */
+ public Map<String, String> getStyleClassMap(
+ RenderingContext arc
+ )
+ {
+ return _STYLES_MAP;
+ }
+
+
+ private static final Map<String, String> _STYLES_MAP = new HashMap<String, String>();
+ private static final String _NULL_STYLE = new String();
+ private static final String _PORTLET_FONT = "portlet-font";
+ private static final String _PORTLET_FONT_DIM = "portlet-font-dim";
+
+ static
+ {
+ // some styles I map to portlet styles + the original style class
+ // The reason I do that is because most of the original style
+ // class properties are nulled out (like font properties), but they
+ // have padding and borders and text-alignment that is needed to
+ // make the component look decent.
+ // I blank out the parts I don't want in porlet-desktop.xss
+
+ // Begin table mappings
+ // --------------------
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_CONTROL_BAR_TOP_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_TREE_TABLE_CONTROL_BAR_TOP_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_CONTROL_BAR_BOTTOM_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_TREE_TABLE_CONTROL_BAR_BOTTOM_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_SUB_CONTROL_BAR_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_TREE_TABLE_SUB_CONTROL_BAR_STYLE,
+ "portlet-table-text");
+ _STYLES_MAP.put("OraHGridLocatorHeader",
+ "portlet-table-text");
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_TEXT_STYLE,
+ "portlet-table-body");
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_TEXT_BAND_STYLE,
+ "portlet-table-alternate");
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_NUMBER_STYLE,
+ "portlet-table-body " +
+ SkinSelectors.AF_COLUMN_CELL_NUMBER_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_NUMBER_BAND_STYLE,
+ "portlet-table-alternate " +
+ SkinSelectors.AF_COLUMN_CELL_NUMBER_BAND_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_ICON_FORMAT_STYLE,
+ "portlet-table-body " +
+ SkinSelectors.AF_COLUMN_CELL_ICON_FORMAT_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_SELECT_ONE_CELL_ICON_FORMAT_STYLE,
+ "portlet-table-body " +
+ SkinSelectors.AF_TABLE_SELECT_ONE_CELL_ICON_FORMAT_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_SELECT_MANY_CELL_ICON_FORMAT_STYLE,
+ "portlet-table-body " +
+ SkinSelectors.AF_TABLE_SELECT_MANY_CELL_ICON_FORMAT_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.TABLE_SELECT_CELL_STYLE,
+ "portlet-table-body " +
+ SkinSelectors.TABLE_SELECT_CELL_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_CELL_ICON_BAND_STYLE,
+ "portlet-table-alternate " +
+ SkinSelectors.AF_COLUMN_CELL_ICON_BAND_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_SELECT_ONE_CELL_ICON_BAND_STYLE,
+ "portlet-table-alternate " +
+ SkinSelectors.AF_TABLE_SELECT_ONE_CELL_ICON_BAND_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_SELECT_MANY_CELL_ICON_BAND_STYLE,
+ "portlet-table-alternate " +
+ SkinSelectors.AF_TABLE_SELECT_MANY_CELL_ICON_BAND_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.TABLE_BAND_SELECT_CELL_STYLE,
+ "portlet-table-alternate " +
+ SkinSelectors.TABLE_BAND_SELECT_CELL_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_HEADER_TEXT_STYLE,
+ "portlet-table-header");
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_HEADER_NUMBER_STYLE,
+ "portlet-table-header " +
+ SkinSelectors.AF_COLUMN_HEADER_NUMBER_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_HEADER_ICON_STYLE,
+ "portlet-table-header " +
+ SkinSelectors.AF_COLUMN_HEADER_ICON_STYLE);
+
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_ROW_HEADER_TEXT_STYLE,
+ "portlet-table-header " +
+ SkinSelectors.AF_COLUMN_ROW_HEADER_TEXT_STYLE);
+
+
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_DETAIL_STYLE,
+ "portlet-table-body");
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_TOTAL_NUMBER_STYLE,
+ "portlet-table-body");
+ _STYLES_MAP.put(SkinSelectors.AF_COLUMN_TOTAL_TEXT_STYLE,
+ "portlet-table-body");
+ _STYLES_MAP.put(SkinSelectors.AF_TABLE_COLUMN_FOOTER_STYLE,
+ "portlet-table-footer");
+
+
+
+ _STYLES_MAP.put(SkinSelectors.NAV_BAR_ILINK_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.NAV_BAR_VIEW_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0001_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0010_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0011_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0100_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0101_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0110_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0111_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1000_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1001_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1010_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1011_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1100_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1101_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1110_STYLE,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1111_STYLE,
+ _NULL_STYLE);
+
+ // selectInputDate and chooseDate have tables
+ _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_HEADER_STYLE_CLASS,
+ "portlet-table-header");
+ _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_HEADER_STYLE_CLASS,
+ "portlet-table-header");
+ _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_CONTENT_STYLE_CLASS,
+ "portlet-table-body");
+ _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_CONTENT_STYLE_CLASS,
+ "portlet-table-body");
+ _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_DISABLED_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_ENABLED_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_DISABLED_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_ENABLED_STYLE_CLASS,
+ _PORTLET_FONT);
+ // keep boldness
+ _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_SELECTED_STYLE_CLASS,
+ "portlet-font " +
+ SkinSelectors.AF_CHOOSE_DATE_SELECTED_STYLE_CLASS);
+ // keep boldness
+ _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_SELECTED_STYLE_CLASS,
+ "portlet-font " +
+ SkinSelectors.AF_SELECT_INPUT_DATE_SELECTED_STYLE_CLASS);
+
+ // End table mappings
+ // -------------------
+
+ // Begin form control mappings
+ // ---------------------------
+ // portlet-form-label
+ // (text used for the descriptive label of the whole form
+ // not the label for fields)
+ // portlet-form-input-field
+ // (Text of the user-input in an input field.)
+ // portlet-form-field-label
+ // (Text for a separator of fields (e.g., checkboxes))
+ // portlet-form-field (Text for a field (not input field. e.g., checkboxes))
+ // Currently UNUSED
+ // portlet-form-button (text on a button)
+ // portlet-icon-label ??????????????????????
+ // (Text that appears beside a context depended action icon)
+ // portlet-dlg-icon-label ??????????????????
+ // (Text that appears beside a 'standard' icon (OK, Cancel))
+
+ // TODO: put some style class on the <input> for checkboxes so I can
+ // map it to portlet-form-field.
+ // TODO: map commandButton to portlet-form-button
+ _STYLES_MAP.put(SkinSelectors.AF_LABEL_TEXT_STYLE_CLASS,
+ "portlet-form-label");
+ /* =-=jmw11/06 TODO This doesn't seem to be used anymore
+ _STYLES_MAP.put(SkinSelectors.AF_LABEL_CELL_STYLE_CLASS,
+ "portlet-form-label");
+ ***/
+ _STYLES_MAP.put(SkinSelectors.AF_FIELD_TEXT_STYLE_CLASS,
+ "portlet-form-field-label");
+ _STYLES_MAP.put(SkinSelectors.AF_FIELD_TEXT_DISABLED_STYLE_CLASS,
+ "portlet-form-field-label");
+ _STYLES_MAP.put("af|inputText::content",
+ "portlet-form-input-field");
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_CHOICE_LABEL_STYLE_CLASS,
+ "portlet-form-label");
+ _STYLES_MAP.put(SkinSelectors.SHUTTLE_HEADER_STYLE_CLASS,
+ "portlet-form-label");
+ _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_FORM_LABEL_CELL_STYLE_CLASS,
+ "portlet-form-label");
+ /** =-=jmw TODO Nov/06. Test panelForm Layouts portlet styles */
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_FORM_STYLE_CLASS,
+ _NULL_STYLE);
+ // End form control mappings
+ // -------------------------
+
+ // Begin message mappings
+ _STYLES_MAP.put(SkinSelectors.INLINE_ERROR_TEXT_STYLE_CLASS,
+ "portlet-msg-error");
+ _STYLES_MAP.put(SkinSelectors.INLINE_INFO_TEXT_STYLE_CLASS,
+ "portlet-msg-info");
+ _STYLES_MAP.put(XhtmlLafConstants.PROCESS_STATUS_STYLE_CLASS,
+ "portlet-msg-status");
+ _STYLES_MAP.put(XhtmlLafConstants.TIP_TEXT_STYLE_CLASS,
+ "portlet-msg-info");
+ _STYLES_MAP.put(XhtmlLafConstants.TIP_LABEL_STYLE_CLASS,
+ "portlet-msg-info");
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,
+ "portlet-msg-error");
+ _STYLES_MAP.put(XhtmlLafConstants.ERROR_ICON_STYLE_CLASS,
+ "portlet-msg-error");
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MESSAGES_HEADER_STYLE_CLASS,
+ "portlet-msg-error" );
+
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,
+ "portlet-msg-error");
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_LIST_STYLE_CLASS,
+ "portlet-msg-error");
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_BODY_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MESSAGES_ERROR_STYLE_CLASS,
+ "portlet-msg-error");
+ // just to give it the same background color as table's header.
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_STYLE_CLASS,
+ "portlet-table-header");
+
+ // End message mappings
+ // -------------------------
+
+ // portlet-font-dim mappings
+ _STYLES_MAP.put("AFInstructionTextDisabled",
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put("AFFieldTextDisabled",
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put("AFFieldTextLTRDisabled",
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put("AFPhoneFieldTextDisabled",
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put("AFPostalCodeFieldTextDisabled",
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put("AFAddressFieldTextDisabled",
+ _PORTLET_FONT_DIM);
+ // We want to keep certain aspects of these styles, so we blank
+ // out the aspects we don't want in portlet-desktop.xss:
+ // keep boldness
+ _STYLES_MAP.put("AFDataTextDisabled",
+ "portlet-font-dim AFDataTextDisabled");
+ // keep boldness and alignment
+ _STYLES_MAP.put("AFDataNumberDisabled",
+ "portlet-font-dim AFDataNumberDisabled");
+ _STYLES_MAP.put("AFFieldNumberDisabled",
+ "portlet-font-dim AFFieldNumberDisabled");
+
+ _STYLES_MAP.put(SkinSelectors.IN_CONTEXT_TEXT_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(SkinSelectors.LINK_DISABLED_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(XhtmlLafConstants.DISABLED_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,
+ _PORTLET_FONT_DIM);
+ // end portlet-font-dim mappings
+
+
+ // begin portlet-font mappings
+ _STYLES_MAP.put(SkinSelectors.INSTRUCTION_TEXT_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put("AFFieldText",
+ _PORTLET_FONT);
+ _STYLES_MAP.put("AFFieldTextLTR",
+ _PORTLET_FONT);
+ _STYLES_MAP.put("AFPhoneFieldText",
+ _PORTLET_FONT);
+ _STYLES_MAP.put("AFPostalCodeFieldText",
+ _PORTLET_FONT);
+ _STYLES_MAP.put("AFAddressFieldText",
+ _PORTLET_FONT);
+ // We want to keep certain aspects of these styles:
+ // keep boldness
+ _STYLES_MAP.put(XhtmlLafConstants.DATA_TEXT_STYLE_CLASS,
+ "portlet-font " +
+ XhtmlLafConstants.DATA_TEXT_STYLE_CLASS);
+ // keep boldness and alignment
+ _STYLES_MAP.put("AFDataNumber",
+ "portlet-font AFDataNumber");
+ _STYLES_MAP.put("AFFieldNumber",
+ "portlet-font AFFieldNumber");
+
+
+ _STYLES_MAP.put(SkinSelectors.PAGE_STAMP_TEXT_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.AF_TREE_TABLE_MP_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.AF_NAVIGATION_PATH_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.AF_NAVIGATION_PATH_SELECTED_STEP_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_SELECTED_STYLE_CLASS,
+ _PORTLET_FONT);
+ _STYLES_MAP.put(SkinSelectors.AF_PANEL_LIST_STYLE_CLASS,
+ _PORTLET_FONT);
+
+ _STYLES_MAP.put(SkinSelectors.LINK_STYLE_CLASS,
+ _PORTLET_FONT);
+
+ _STYLES_MAP.put(XhtmlLafConstants.LINK_TEXT_STYLE_CLASS,
+ _PORTLET_FONT);
+
+
+ // end portlet-font
+
+ // begin section
+ // we render our headers by using the same style class on headers
+ // and subheaders, and we style them in the css file using the
+ // H1/H2 selectors, like H1.af_panelHeader, H2.af_panelHeader.
+ // for portlet we need to have distinctive style classes for headers and
+ // subheaders, so the way we will get this to work is to
+ // rework the renderer to also render out AFHeaderAlias
+ // and AFSubheaderAlias. For portlet skin, we will map the
+ // header classes (e.g., AF_PANEL_HEADER_STYLE_CLAS) to null and
+ // map AFHeaderAlias to portlet-section-header and map
+ // AFSubheaderAlias to portlet-section-subheader.
+ _STYLES_MAP.put(SkinSelectors.AF_PANEL_HEADER_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SkinSelectors.AF_PANEL_HEADER_ERROR_STYLE_CLASS,
+ "portlet-section-header");
+ /** =-=jmw TODO Fix the renderer...
+ _STYLES_MAP.put(SkinSelectors.AF_HEADER_ALIAS_STYLE_CLASS,
+ "portlet-section-header");
+ _STYLES_MAP.put(SkinSelectors.AF_SUBHEADER_ALIAS_STYLE_CLASS,
+ "portlet-section-subheader");
+ ***/
+
+ _STYLES_MAP.put(SkinSelectors.AF_SHOW_DETAIL_HEADER_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_BOX_HEADER_STYLE_CLASS,
+ "portlet-section-header " +
+ SimpleDesktopConstants.AF_PANEL_BOX_HEADER_STYLE_CLASS);
+ // end section
+
+ // begin menu
+ //
+ // use portlet-table styles instead of portlet-menu styles. This
+ // was requested by the portal team
+ //
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_STYLE_CLASS,
+ "portlet-table-text");
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_SELECTED_STYLE_CLASS,
+ "portlet-table-selected " +
+ SimpleDesktopConstants.AF_MENU_TABS_SELECTED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_ENABLED_STYLE_CLASS,
+ "portlet-table-alternate "+
+ SimpleDesktopConstants.AF_MENU_TABS_ENABLED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_DISABLED_STYLE_CLASS,
+ "portlet-table-alternate " +
+ SimpleDesktopConstants.AF_MENU_TABS_DISABLED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_SEPARATOR_STYLE_CLASS,
+ "portlet-table-alternate");
+
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_STYLE_CLASS,
+ "portlet-table-text");
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_BODY_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_TITLE_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_EMPTY_STYLE_CLASS,
+ _NULL_STYLE);
+ // Note: This is kind of strange. We are porting menuBar to menuTabs
+ // so that the background and font won't both be white when running
+ // a portal inside an ADF Faces page.
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_SELECTED_STYLE_CLASS,
+ "portlet-table-selected " +
+ SimpleDesktopConstants.AF_MENU_TABS_SELECTED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_ENABLED_STYLE_CLASS,
+ "portlet-table-alternate "+
+ SimpleDesktopConstants.AF_MENU_TABS_ENABLED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_DISABLED_STYLE_CLASS,
+ "portlet-table-alternate " +
+ SimpleDesktopConstants.AF_MENU_TABS_DISABLED_STYLE_CLASS);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_SEPARATOR_STYLE_CLASS,
+ "portlet-table-alternate");
+
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS,
+ _NULL_STYLE);
+ _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_SIDE_BAR_STYLE_CLASS,
+ "portlet-table-text");
+ // end menu
+
+ }
+
+
+
+}
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java Wed Nov 29 17:02:41 2006
@@ -33,6 +33,7 @@
import org.apache.myfaces.trinidad.context.RenderingContext;
import org.apache.myfaces.trinidad.render.CoreRenderer;
+import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit;
/**
* Renderer for meta data section of the document--a.k.a <head>.
@@ -148,7 +149,7 @@
{
// Disable the Cookie script for portlets
// =-=AEW Right or wrong?
- if (XhtmlConstants.OUTPUT_MODE_PORTLET.equals(arc.getOutputMode()))
+ if (CoreRenderKit.isPortlet(context))
return false;
// Do not need the cookie script when we have a PartialPageContext
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java Wed Nov 29 17:02:41 2006
@@ -27,6 +27,7 @@
import org.apache.myfaces.trinidad.component.core.CoreStyleSheet;
import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit;
import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderingContext;
import org.apache.myfaces.trinidadinternal.style.StyleContext;
@@ -92,7 +93,7 @@
String outputMode = arc.getOutputMode();
// =-=AEW Don't like hardcoding facet names...
- if (XhtmlConstants.OUTPUT_MODE_PORTLET.equals(outputMode) &&
+ if (CoreRenderKit.isPortlet(context) &&
supportsScripting(arc))
{
writer.startElement("script", null);
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinFactoryImpl.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinFactoryImpl.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinFactoryImpl.java Wed Nov 29 17:02:41 2006
@@ -20,10 +20,11 @@
import java.util.Map;
import javax.faces.context.FacesContext;
+
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
import org.apache.myfaces.trinidad.skin.Skin;
import org.apache.myfaces.trinidad.skin.SkinFactory;
-
+import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit;
/**
@@ -94,6 +95,8 @@
/**
* given the skinFamily and renderKitId, pass back the Skin.
+ * If outputMode is PORTLET, then we ignore
+ * the render-kit-id and get the 'portlet' skin for that skin family.
* @param context FacesContext for the request currently being
* processed, or <code>null</code> if none is available.
* @param family skin family of the requested {@link Skin} instance
@@ -113,9 +116,11 @@
if (family == null)
throw new NullPointerException("Null skin family");
- // if there isn't a specific renderKitId specified, get the skin
- // with the default render kit.
- if (renderKitId == null) renderKitId = _RENDER_KIT_ID_CORE;
+ // default render-kit-id, if needed.
+ if (CoreRenderKit.isPortlet(context))
+ renderKitId = _RENDER_KIT_ID_PORTLET;
+ else if (renderKitId == null)
+ renderKitId = _RENDER_KIT_ID_CORE;
// loop through each skin in the SkinFactory
// and see if the family and the renderKitId match
@@ -139,15 +144,16 @@
" and renderkit " + renderKitId + ", so we will" +
" use the simple skin");
}
-
- if (renderKitId.equals(_RENDER_KIT_ID_PDA))
- {
+
+ // if we get here, that means we couldn't find an exact
+ // family/renderKitId match, so return the simple skin
+ // that matches the renderkitid.
+ if (renderKitId.equals(_RENDER_KIT_ID_PORTLET))
+ return getSkin(context, _SIMPLE_PORTLET);
+ else if (renderKitId.equals(_RENDER_KIT_ID_PDA))
return getSkin(context, _SIMPLE_PDA);
- }
- else
- {
+ else
return getSkin(context, _SIMPLE_DESKTOP);
- }
}
@@ -163,9 +169,11 @@
static private final String _RENDER_KIT_ID_CORE = "org.apache.myfaces.trinidad.desktop";
static private final String _RENDER_KIT_ID_PDA = "org.apache.myfaces.trinidad.pda";
+ static private final String _RENDER_KIT_ID_PORTLET = CoreRenderKit.OUTPUT_MODE_PORTLET;
+
static private final String _SIMPLE_PDA = "simple.pda";
static private final String _SIMPLE_DESKTOP = "simple.desktop";
-
+ static private final String _SIMPLE_PORTLET = "simple.portlet";
static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(SkinFactoryImpl.class);
}
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java Wed Nov 29 17:02:41 2006
@@ -348,9 +348,8 @@
* short style classes can be used instead of the full style class
* names to reduce the overall size of generated content.
* @param arc RenderingContext
- * @return Map<String, String> It should be a map that contains the full style class name as
- * the key, and the value could be a shortened style class name,
- * or a portlet style class name, etc.
+ * @return Map<String, String> The default implemention returns a map of full
+ * style class names to shortened style classes.
*/
public Map<String, String> getStyleClassMap(
RenderingContext arc
Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java?view=diff&rev=480797&r1=480796&r2=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java (original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java Wed Nov 29 17:02:41 2006
@@ -41,8 +41,11 @@
import org.apache.myfaces.trinidad.skin.Skin;
import org.apache.myfaces.trinidadinternal.renderkit.core.skin.MinimalDesktopSkinExtension;
import org.apache.myfaces.trinidadinternal.renderkit.core.skin.MinimalPdaSkinExtension;
+import org.apache.myfaces.trinidadinternal.renderkit.core.skin.MinimalPortletSkinExtension;
import org.apache.myfaces.trinidadinternal.renderkit.core.skin.SimpleDesktopSkin;
import org.apache.myfaces.trinidadinternal.renderkit.core.skin.SimplePdaSkin;
+import org.apache.myfaces.trinidadinternal.renderkit.core.skin.SimplePortletSkin;
+
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -258,7 +261,12 @@
SimplePdaSkin simplePdaSkin = new SimplePdaSkin();
skinFactory.addSkin(simplePdaSkin.getId(), simplePdaSkin);
-
+ //portlet skin maps most of our style classes to portlet style classes,
+ // so we output portlet style classes.
+ // It also clears out the portlet style class definitions.
+ SimplePortletSkin simplePortletSkin = new SimplePortletSkin();
+ skinFactory.addSkin(simplePortletSkin.getId(), simplePortletSkin);
+
MinimalDesktopSkinExtension minimalDesktopSkin =
new MinimalDesktopSkinExtension(simpleDesktopSkin);
skinFactory.addSkin(minimalDesktopSkin.getId(), minimalDesktopSkin);
@@ -266,6 +274,10 @@
MinimalPdaSkinExtension minimalPdaSkin =
new MinimalPdaSkinExtension(simplePdaSkin);
skinFactory.addSkin(minimalPdaSkin.getId(), minimalPdaSkin);
+
+ MinimalPortletSkinExtension minimalPortletSkin =
+ new MinimalPortletSkinExtension(simplePortletSkin);
+ skinFactory.addSkin(minimalPortletSkin.getId(), minimalPortletSkin);
}
/**
Added: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/simple-portlet.xss
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/simple-portlet.xss?view=auto&rev=480797
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/simple-portlet.xss (added)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/resources/META-INF/adf/styles/simple-portlet.xss Wed Nov 29 17:02:41 2006
@@ -0,0 +1,449 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2006 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+
+ simple-portlet.xss defines the styles used by the
+ implementation of the Portlet Skin. The styles defined
+ here are layered on top of the styles defined by the Base
+ Skin (simple-desktop.xss).
+ In this file we take out the portlet styles defined in
+ base-desktop.xss.
+ We also clear out the font information so that
+ we can use portlet-font style class instead,
+ and we keep our padding/borders for alignment so the component
+ still renders properly.
+
+-->
+
+<styleSheetDocument xmlns="http://myfaces.apache.org/uix/style"
+ version="2.0">
+
+ <!-- This may well be changed to import simple-base.xss or
+ something. -->
+ <import href="base-desktop.xss"/>
+ <import href="simple-desktop.xss"/>
+
+<styleSheet>
+
+
+ <!-- clear out portlet styles that are defined in base-desktop-->
+ <style selector=".PortletBodyColor" resetProperties="true"/>
+ <style selector=".PortletHeaderColor" resetProperties="true"/>
+ <style selector=".PortletHeaderLink" resetProperties="true"/>
+ <style selector=".PortletHeaderStyle" resetProperties="true"/>
+ <style selector=".PortletHeaderText" resetProperties="true"/>
+ <style selector=".PortletHeading1" resetProperties="true"/>
+ <style selector=".PortletHeading2" resetProperties="true"/>
+ <style selector=".PortletHeading3" resetProperties="true"/>
+ <style selector=".PortletHeading4" resetProperties="true"/>
+ <style selector=".PortletSubHeaderColor" resetProperties="true"/>
+ <style selector=".PortletSubHeaderLink" resetProperties="true"/>
+ <style selector=".PortletSubHeaderText" resetProperties="true"/>
+ <style selector=".PortletText1" resetProperties="true"/>
+ <style selector=".PortletText2" resetProperties="true"/>
+ <style selector=".PortletText3" resetProperties="true"/>
+ <style selector=".PortletText4" resetProperties="true"/>
+ <style selector=".portlet-font" resetProperties="true"/>
+ <style selector=".portlet-font-dim" resetProperties="true"/>
+ <style selector=".portlet-msg-info" resetProperties="true"/>
+ <style selector=".portlet-msg-error" resetProperties="true"/>
+ <style selector=".portlet-section-header" resetProperties="true"/>
+ <style selector=".portlet-section-body" resetProperties="true"/>
+ <style selector=".portlet-section-alternate" resetProperties="true"/>
+ <style selector=".portlet-section-selected" resetProperties="true"/>
+ <style selector=".portlet-section-subheader" resetProperties="true"/>
+ <style selector=".portlet-section-footer" resetProperties="true"/>
+ <style selector=".portlet-section-text" resetProperties="true"/>
+ <style selector=".portlet-table-header" resetProperties="true"/>
+ <style selector=".portlet-table-body" resetProperties="true"/>
+ <style selector=".portlet-table-alternate" resetProperties="true"/>
+ <style selector=".portlet-table-selected" resetProperties="true"/>
+ <style selector=".portlet-table-subheader" resetProperties="true"/>
+ <style selector=".portlet-table-subheader" resetProperties="true"/>
+ <style selector=".portlet-table-footer" resetProperties="true"/>
+ <style selector=".portlet-table-text" resetProperties="true"/>
+ <style selector=".portlet-form-label" resetProperties="true"/>
+ <style selector=".portlet-form-input-field" resetProperties="true"/>
+ <style selector=".portlet-form-button" resetProperties="true"/>
+ <style selector=".portlet-icon-label" resetProperties="true"/>
+ <style selector=".portlet-dlg-icon-label" resetProperties="true"/>
+ <style selector=".portlet-form-field-label" resetProperties="true"/>
+ <style selector=".portlet-form-field" resetProperties="true"/>
+
+ <!-- clear out font information. We'll map to portlet-font instead for
+ the styles that include these font selectors -->
+ <style name="AFDefaultFontFamily" resetProperties="true"/>
+ <style name="AFTextForeground" resetProperties="true"/>
+ <style name="AFDefaultFont" resetProperties="true"/>
+ <style name="AFVerySmallFont" resetProperties="true"/>
+ <style name="AFSmallFont" resetProperties="true"/>
+ <style name="AFMediumFont" resetProperties="true"/>
+ <style name="AFLargeFont" resetProperties="true"/>
+ <style name="AFVeryLargeFont" resetProperties="true"/>
+ <style name="AFActiveLinkForeground" resetProperties="true"/>
+ <style name="AFVisitedLinkForeground" resetProperties="true"/>
+ <style name="AFDisabledLinkForeground" resetProperties="true"/>
+ <style name="AFLinkForeground" resetProperties="true"/>
+ <!-- reset the 'disabled' gray color -->
+ <style name="MediumExtraAccentForeground">
+ <property name="color"/>
+ </style>
+ <!-- for now, we keep the default colors, but we might want to change -->
+ <!-- our background-color/border-color scheme from green to something -->
+ <!-- else. If we do that, we override AFDarkBackground, etc. The accent -->
+ <!-- colors are grey, so they are ok. -->
+
+ <!--
+ Table Styles. Clear out everything except text-alignment for
+ number and icon cells
+ -->
+ <style name="AFTableCellDataText" resetProperties="true"/>
+ <style name="AFTableCellDataBackgroundColor" resetProperties="true"/>
+ <style name="AFTableCellDataBandedBackgroundColor" resetProperties="true"/>
+
+ <style name="AFTableCellDataBorderColor" resetProperties="true"/>
+ <style name="AFTableCellDataVerticalAlign" resetProperties="true"/>
+ <!-- we clear these out simply so that they won't render in the generated
+ css file. We map these to portlet styles in the PortletDesktopSkinExtension file -->
+ <style selector="af|column::header-text" resetProperties="true"/>
+ <style selector="af|column::row-header-text" resetProperties="true"/>
+ <style selector="af|table::detail" resetProperties="true"/>
+ <style selector="af|table::column-footer" resetProperties="true"/>
+ <!-- clear out borders, since portlet styles will add those -->
+ <style selector=".OraTableBorder0001" resetProperties="true"/>
+ <style selector=".OraTableBorder0010" resetProperties="true"/>
+ <style selector=".OraTableBorder0011" resetProperties="true"/>
+ <style selector=".OraTableBorder0100" resetProperties="true"/>
+ <style selector=".OraTableBorder0101" resetProperties="true"/>
+ <style selector=".OraTableBorder0110" resetProperties="true"/>
+ <style selector=".OraTableBorder0111" resetProperties="true"/>
+ <style selector=".OraTableBorder1000" resetProperties="true"/>
+ <style selector=".OraTableBorder1001" resetProperties="true"/>
+ <style selector=".OraTableBorder1010" resetProperties="true"/>
+ <style selector=".OraTableBorder1011" resetProperties="true"/>
+ <style selector=".OraTableBorder1100" resetProperties="true"/>
+ <style selector=".OraTableBorder1101" resetProperties="true"/>
+ <style selector=".OraTableBorder1110" resetProperties="true"/>
+ <style selector=".OraTableBorder1111" resetProperties="true"/>
+
+
+ <!-- for cells containing a total, keep text-align -->
+ <style selector="af|column::total-number">
+ <property name="border-color"/>
+ <property name="font-weight"/>
+ <property name="background-color"/>
+ <property name="color"/>
+ </style>
+
+ <!-- for cells containing a total -->
+ <style selector="af|column::total-text" resetProperties="true"/>
+ <style selector="af|column::sortable-header-text" resetProperties="true"/>
+
+ <!-- make the color picker's borders look ok -->
+ <style selector=".p_OraColorFieldSwatch">
+ <property name="border-color">#ffffff</property>
+ </style>
+
+ <style selector=".p_OraColorPalette">
+ <property name="background-color">#000000</property>
+ </style>
+
+ <style selector=".p_OraColorPaletteEmptyCell">
+ <property name="background-color">#ffffff</property>
+ </style>
+
+ <style name="AFHeaderText" resetProperties="true"/>
+
+ <style selector="af|menuTabs::enabled-link" resetProperties="true"/>
+ <style selector="af|menuTabs::selected-link" resetProperties="true"/>
+ <!-- keep borders and padding only, portlet-menu-item(-selected) can
+ add styles -->
+ <style selector="af|menuTabs::enabled">
+ <property name="background-color"/>
+ </style>
+ <style selector="af|menuTabs::selected">
+ <property name="background-color"/>
+ </style>
+ <style selector="af|menuTabs::disabled">
+ <property name="background-color"/>
+ </style>
+ <style selector="af|menuTabs::separator" resetProperties="true"/>
+
+ <style selector="af|menuBar" resetProperties="true"/>
+ <style selector="af|menuBar::body" resetProperties="true"/>
+ <style selector="af|menuBar::title" resetProperties="true"/>
+ <style selector="af|menuBar::empty" resetProperties="true"/>
+ <style selector="af|menuBar::selected-link" resetProperties="true"/>
+ <style selector="af|menuBar::enabled-link" resetProperties="true"/>
+ <style selector="af|menuBar::separator" resetProperties="true"/>
+ <!-- styles taken from minimal-desktop -->
+ <!-- ********************************* -->
+ <!-- ********************************* -->
+
+ <!--
+ Train Styles
+ -->
+
+ <!-- We override the AFTrainStation named style to add some
+ padding, and also to display the station indicator
+ using a top border -->
+ <style name="AFTrainStation">
+ <property name="border-style">solid</property>
+ <property name="border-width">3px 0px 0px 0px</property>
+ <property name="padding">3pt</property>
+ </style>
+
+ <style selector="af|processTrain::visited-link" resetProperties="true" />
+ <style selector="af|processTrain::unvisited-link" resetProperties="true" />
+
+ <style name="AFPanelBox">
+ <includeStyle name="AFMediumBorder"/>
+ <property name="border-style">solid</property>
+ <property name="border-width">1px</property>
+ <property name="margin">2px</property>
+ </style>
+
+ <!-- Use darker border for dark content containers -->
+ <style selector="af|panelBox::dark">
+ <includeStyle name="AFDarkBorder"/>
+ </style>
+
+ <style name="af|panelBox::content">
+ <includeStyle name="AFMediumBorder"/>
+ <property name="border-style">solid</property>
+ <property name="border-width">1px</property>
+ <property name="margin">2px</property>
+ </style>
+
+ <!-- Use darker border for dark content containers -->
+ <style selector="af|panelBox::content-dark">
+ <includeStyle name="AFDarkBorder"/>
+ </style>
+
+
+ <!-- Adjust the header padding and text size/weight -->
+ <style selector="af|panelBox::header">
+ <property name="padding">0px 3px</property>
+ <includeStyle name="AFMediumFont"/>
+ <property name="font-weight">bold</property>
+ </style>
+
+ <!-- Add padding around the body of all content containers -->
+ <style selector="af|panelBox::body">
+ <property name="padding">5px</property>
+
+ <!-- Add a minimum height so that empty content containers
+ occupy some space -->
+ <property name="height">20px</property>
+ </style>
+
+ <!-- panelForm -->
+ <style selector="af|panelForm::cell">
+ <property name="padding">1px 0px</property>
+ </style>
+
+ <!--
+ Footer Styles
+ -->
+
+ <style name="AFFooterMessageText">
+ <property name="padding">5px</property>
+ </style>
+
+ <!--
+ menuButtons Styles
+ -->
+
+ <style name="AFMenuButtons">
+ <property name="padding">0px 2px 2px 2px</property>
+ </style>
+
+ <!--
+ menuBar Styles
+ -->
+
+
+ <!--
+ Fix up the padding around the MenuBar items and
+ disable word wrapping
+ -->
+ <style name="AFMenuBarItem">
+ <property name="padding">0px 0px 0px 5px</property>
+ <property name="white-space">nowrap</property>
+ </style>
+
+
+ <!--
+ PanelHeader Styles
+ -->
+ <style selector="af|panelHeader">
+ <includeStyle name="AFDarkAccentBorder"/>
+ <property name="border-width">0px 0px 1px 0px</property>
+ <property name="border-style">solid</property>
+ <property name="vertical-align">bottom</property>
+ <property name="margin-bottom">3px</property>
+ <property name="padding">0px 3px</property>
+ </style>
+
+ <style selector="af|showDetailHeader">
+ <includeStyle name="AFDarkAccentBorder"/>
+ <property name="border-width">0px 0px 1px 0px</property>
+ <property name="border-style">solid</property>
+ <property name="vertical-align">bottom</property>
+ <property name="margin-bottom">3px</property>
+ <property name="padding">0px 3px</property>
+ </style>
+
+ <style selector="af|messages::header">
+ <includeStyle name="AFDarkAccentBorder"/>
+ <property name="border-width">0px 0px 1px 0px</property>
+ <property name="border-style">solid</property>
+ <property name="vertical-align">bottom</property>
+ <property name="margin-bottom">3px</property>
+ <property name="padding">0px 3px</property>
+ </style>
+
+
+ <style name="AFHeaderText">
+ <includeStyle name="AFDarkForeground"/>
+ <property name="font-weight">bold</property>
+ <property name="padding">0px</property>
+ <property name="margin">0px</property>
+ </style>
+ <!-- if the user sets the icon attribute on panelHeader, -->
+ <!-- this is the style for that icon -->
+ <style selector="af|panelHeader::icon-style">
+ <property name="margin-right">3px</property>
+ </style>
+
+ <!--
+ af:messages Styles
+ -->
+
+ <style selector="af|messages">
+ <includeStyle name="AFVeryDarkAccentBorder"/>
+ <includeStyle name="AFMediumAccentBackground"/>
+ <property name="border-style">solid</property>
+ <property name="border-width">1px</property>
+ <property name="padding">0px</property>
+ <property name="margin">5px 0px 0px</property>
+ </style>
+
+ <!--
+ objectSeparator Styles
+ -->
+ <style selector="af|objectSeparator">
+ <includeStyle name="AFDarkBorder"/>
+ <property name="border-style">dashed none none</property>
+ <property name="border-width">1px 0px 0px</property>
+ <property name="height">1px</property>
+ <property name="margin">-3px 0px -3px 0px</property>
+ <property name="padding">0px</property>
+ </style>
+
+ <!--
+ panelSideBar styles. adds borders.
+ -->
+ <style selector="af|panelSideBar">
+ <property name="border-width">0px 1px 1px</property>
+ <property name="border-style">solid</property>
+ <property name="padding">0px</property>
+ <property name="margin">0px 5px 0px 0px</property>
+ </style>
+ <!--
+ SortableHeader Styles
+ -->
+ <style selector=".AFSortableHeaderSortIcon">
+ <property name="padding-left">4px</property>
+ <property name="text-decoration">none</property>
+ </style>
+
+ <!--
+ TabBar Styles
+ -->
+
+ <!-- Add a border and padding to all tabBar items -->
+ <style name="AFTabBarItem">
+ <includeStyle name="AFVeryDarkAccentBorder"/>
+ <property name="border-style">solid</property>
+ <property name="border-width">1px 1px 0px 1px</property>
+ <property name="padding">2px 6px</property>
+ </style>
+
+
+
+
+
+ <!-- showOneTab styles -->
+
+ <style name="AFShowOneTab">
+ <includeStyle name="AFLightAccentBackground"/>
+ <includeStyle name="AFMediumBorder"/>
+ <property name="border-style">solid</property>
+ <includeStyle name="AFCenterTextAlign"/>
+ <property name="padding">2px 0px</property>
+ <property name="margin">4px 0px</property>
+ </style>
+
+ <style selector="af|showOneTab::orientation-top">
+ <includeStyle name="AFShowOneTab"/>
+ <property name="border-width">1px 0px 0px</property>
+ </style>
+
+ <style selector="af|showOneTab::orientation-bottom">
+ <includeStyle name="AFShowOneTab"/>
+ <property name="border-width">0px 0px 1px</property>
+ </style>
+
+
+ <!--
+ showOnePanel Styles
+ -->
+
+ <style selector="af|showOnePanel::header-disabled">
+ <property name="padding-left">18px</property>
+ <includeStyle name="AFDefaultBoldFont"/>
+ </style>
+ <style selector="af|showOnePanel::header-collapsed">
+ <includeStyle name="AFDefaultBoldFont"/>
+ </style>
+
+ <style selector="af|showOnePanel::header-expanded">
+ <includeStyle name="AFDefaultBoldFont"/>
+ </style>
+</styleSheet>
+
+<styleSheet direction="rtl">
+
+ <style selector="af|panelHeader::icon-style">
+ <property name="margin-left">3px</property>
+ </style>
+
+ <style selector=".AFSortableHeaderSortIcon">
+ <property name="padding-right">4px</property>
+ </style>
+
+</styleSheet>
+
+<styleSheet browsers="gecko">
+ <style selector="af|objectSeparator">
+ <property name="margin"/>
+ </style>
+</styleSheet>
+
+</styleSheetDocument>