Package org.apache.myfaces.trinidad.skin

Examples of org.apache.myfaces.trinidad.skin.Skin


     
      // we still need to check if we don't want to compress even if the disable content
      // compression flag is true
      if (CoreRenderKit.OUTPUT_MODE_PORTLET.equals(_arc.getOutputMode()))
      {
        Skin skin = ((CoreRenderingContext) _arc).getSkin();
        boolean isPortletSkin =
        CoreRenderKit.OUTPUT_MODE_PORTLET.equals(skin.getRenderKitId());

        if (isPortletSkin)
          _isDisableStyleCompression = Boolean.TRUE;
        else
        {
View Full Code Here


  public Skin getSkin()
  {
    // this might switch the skin from portlet to desktop depending upon the request map parameters.
    if(!_checkedRequestMapSkin)
    {
      Skin requestedSkin = getRequestMapSkin();
      _checkedRequestMapSkin = true;
      if (requestedSkin != null)
      {
        _skin = requestedSkin;
        // recompute the cached style provider with the new skin
View Full Code Here

  {
    iconName = getSkinResourceMappedKey(iconName);
    if (iconName == null)
      return null;

    Skin skin = getSkin();

    // If we're in right-to-left, and the code asking us hasn't
    // already slapped on a right-to-left suffix, then go looking
    // in right-to-left land
    if (isRightToLeft() && !iconName.endsWith(StyleUtils.RTL_CSS_SUFFIX))
    {
      // append :rtl to the mappedIconName. If no icon with that name,
      // default to getting the icon with the original mappedIconName.
      String rtlIconName = iconName + StyleUtils.RTL_CSS_SUFFIX;
      Icon rtlIcon = skin.getIcon(rtlIconName);

      if ((rtlIcon == null) || rtlIcon.isNull())
      {
        // we want :rtl icons to default to regular icons, not a NullIcon,
        //  which is what the Skin does.
        rtlIcon = skin.getIcon(iconName);
        if (rtlIcon != null)
        {
          // cache regular icon so we don't need to get it again!
          skin.registerIcon(rtlIconName, rtlIcon);
        }
      }

      return rtlIcon;
    }
    else
    {
      return skin.getIcon(iconName);
    }
  }
View Full Code Here

        {
          _LOG.warning("NO_SKIN_FACTORY");
          return null;
        }
       
        Skin requestedSkin = factory.getSkin(context, requestedSkinId.toString());
        if (requestedSkin != null)
        {
          // In portlet mode, we will switch to using the requestedSkin
          // (the skin requested by the portlet's producer on the requestMap) if it exists.
          // Otherwise we'll use the portal skin.
View Full Code Here

    {
      _LOG.warning("NO_SKIN_FACTORY");
      return;
    }

    Skin skin = factory.getSkin(null, skinFamily, renderKitId);

    if (skin == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("CANNOT_GET_SKIN_FROM_SKINFACTORY", skinFamily);
View Full Code Here

    // Write out the style sheet
    // First figure out whether or not we need to compress the style classes.
    // We don't compress the style classes if the content compression flag is disabled or
    // if the skin is a portlet skin.
    RenderingContext arc = RenderingContext.getCurrentInstance();
    Skin skin = arc.getSkin();
    boolean compressStyles = _isCompressStyles(context);

    StyleWriterFactoryImpl writerFactory = new StyleWriterFactoryImpl(_targetPath,
      getTargetStyleSheetName(context, document));
    CSSGenerationUtils.writeCSS(context,
                                skin.getStyleSheetName(),
                                styles,
                                writerFactory,
                                compressStyles,
                                shortStyleClassMap,
                                namespacePrefixes,
View Full Code Here

  public Skin getSkin()
  {
    // this might switch the skin from portlet to desktop depending upon the request map parameters.
    if(!_checkedRequestMapSkin)
    {
      Skin requestedSkin = getRequestMapSkin();
      _checkedRequestMapSkin = true;
      if (requestedSkin != null)
      {
        _skin = requestedSkin;
        // recompute the cached style provider with the new skin
View Full Code Here

  {
    iconName = getSkinResourceMappedKey(iconName);
    if (iconName == null)
      return null;

    Skin skin = getSkin();

    // If we're in right-to-left, and the code asking us hasn't
    // already slapped on a right-to-left suffix, then go looking
    // in right-to-left land
    if (isRightToLeft() && !iconName.endsWith(StyleUtils.RTL_CSS_SUFFIX))
    {
      // append :rtl to the mappedIconName. If no icon with that name,
      // default to getting the icon with the original mappedIconName.
      String rtlIconName = iconName + StyleUtils.RTL_CSS_SUFFIX;
      Icon rtlIcon = skin.getIcon(rtlIconName);

      if ((rtlIcon == null) || rtlIcon.isNull())
      {
        // we want :rtl icons to default to regular icons, not a NullIcon,
        //  which is what the Skin does.
        rtlIcon = skin.getIcon(iconName);
        if (rtlIcon != null)
        {
          // cache regular icon so we don't need to get it again!
          skin.registerIcon(rtlIconName, rtlIcon);
        }
      }

      return rtlIcon;
    }
    else
    {
      return skin.getIcon(iconName);
    }
  }
View Full Code Here

        {
          _LOG.warning("NO_SKIN_FACTORY");
          return null;
        }
       
        Skin requestedSkin = factory.getSkin(context, requestedSkinId.toString());
        if (requestedSkin != null)
        {
          // In portlet mode, we will switch to using the requestedSkin
          // (the skin requested by the portlet's producer on the requestMap) if it exists.
          // Otherwise we'll use the portal skin.
View Full Code Here

    {
      _LOG.warning("NO_SKIN_FACTORY");
      return;
    }

    Skin skin = factory.getSkin(context, skinFamily, renderKitId, skinVersionString);

    if (skin == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("CANNOT_GET_SKIN_FROM_SKINFACTORY", skinFamily);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.skin.Skin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.