Examples of Skin


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

    if (icons == null)
    {
      // Next, check to see if the IconData has already been
      // stored on the Skin
      Skin skin = context.getSkin();
      icons = (IconData)skin.getProperty(_ICONS_KEY);

      if (icons == null)
      {
        // If we still haven't found the IconData, create it now
        icons = _createIconData(context);

        // Store the IconData as a property on the Skin,
        // so that we don't have to re-create it next time round
        skin.setProperty(_ICONS_KEY, icons);

        // Store the IconData as a local property, since we'll be
        // looking it up many times for each globalHeader render.
        context.setLocalProperty(_ICONS_KEY, icons);
      }
View Full Code Here

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

    // if the skin is a portlet skin.
     String disableContentCompression =
       FacesContext.getCurrentInstance().getExternalContext().
       getInitParameter(StyleSheetRenderer.DISABLE_CONTENT_COMPRESSION);
     // we do not compress if it is a portlet skin
     Skin skin = RenderingContext.getCurrentInstance().getSkin();
     boolean isPortletSkin =
     CoreRenderKit.OUTPUT_MODE_PORTLET.equals(skin.getRenderKitId());

     boolean compressStyles = (!"true".equals(disableContentCompression)) &&
                                              !isPortletSkin;

View Full Code Here

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

    //   This will be Boolean.TRUE if
    // we have all three icons, Boolean.FALSE if we
    // don't, or null if we haven't checked yet.
    boolean rtl = _isRightToLeft(context);
    Boolean value;
    Skin skin = context.getSkin();
    if (rtl)
      value = (Boolean)skin.getProperty(_IMAGE_BUTTON_RTL_KEY);
    else
      value = (Boolean)skin.getProperty(_IMAGE_BUTTON_KEY);

    if (value != null)
      return (Boolean.TRUE == value);

    // we fetch different icons if we are in the
    // right-to-left reading direction. context.getIcon takes care of
    // this, by adding the :rtl suffix to the icon name if the
    // reading direction is rtl.
    Icon startIcon = context.getIcon(
                                  BUTTON_START_ICON_NAME);
    Icon endIcon = context.getIcon(
                                  BUTTON_END_ICON_NAME);
    Icon topBackgroundIcon = context.getIcon(
                                  BUTTON_TOP_BACKGROUND_ICON_NAME);
    Icon bottomBackgroundIcon = context.getIcon(
                                  BUTTON_BOTTOM_BACKGROUND_ICON_NAME);
    // List of missing icons
    String missing = null;

    if (startIcon == null)
      missing = _addMissingIcon(missing, BUTTON_START_ICON_NAME);
    if (endIcon == null)
      missing = _addMissingIcon(missing, BUTTON_END_ICON_NAME);
    if (topBackgroundIcon == null)
      missing = _addMissingIcon(missing, BUTTON_TOP_BACKGROUND_ICON_NAME);
    if (bottomBackgroundIcon == null)
      missing = _addMissingIcon(missing, BUTTON_BOTTOM_BACKGROUND_ICON_NAME);
    // If we are missing any of the icons, we don't render
    // the button image.
    if (missing != null)
    {
      // Only bother logging a message if one or more of the button
      // icons were actually specified.  If no button icons were
      // specified, than the user probably just wants to use
      // browser-based buttons.

      if ((startIcon != null)         ||
          (endIcon != null)           ||
          (topBackgroundIcon != null) ||
          (bottomBackgroundIcon != null))
      {
        if (_LOG.isWarning())
        {
          if (rtl)
            missing += "(Add :rtl to the icon names since locale is rtl)";
          _LOG.warning(_MISSING_ICON_ERROR + missing);
        }
      }

      if (rtl)
        skin.setProperty(_IMAGE_BUTTON_RTL_KEY, Boolean.FALSE);
      else
        skin.setProperty(_IMAGE_BUTTON_KEY, Boolean.FALSE);

      return false;
    }
    if (rtl)
      skin.setProperty(_IMAGE_BUTTON_RTL_KEY, Boolean.TRUE);
    else
      skin.setProperty(_IMAGE_BUTTON_KEY, Boolean.TRUE);

    return true;
  }
View Full Code Here

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

    {
      comment += ", Accessibility:"+accessibilityMode;
    }

    // Tack on the Skin id
    Skin skin = arc.getSkin();
    String skinId = skin.getId();
    if (skinId != null)
    {
      comment += ", skin:" + skinId;

      // Also log preferred Skin if we have one
View Full Code Here

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

    {
      // getRequestMapSkin --
      // See if a skin-id is requested on the requestMap. If so, then see if the Skin
      // with that id exists on the server, and if it does, and if it is an exact match
      // (styleSheetDocumentIds match), then it returns the Skin. Otherwise, it returns null
      Skin requestMapSkin = ((CoreRenderingContext) arc).getRequestMapSkin();
      return (requestMapSkin != null) ? true : false;
    }
    return false;
  }
View Full Code Here

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

  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

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

  {
    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

Examples of org.jboss.dashboard.ui.resources.Skin

                // Empty skin attribute to give the possibility for no skin selection.
                setAttribute("skinDescription", bundle.getString("ui.admin.configuration.skin.sameGraphicElement"));
                setAttribute("skinId", "");
                renderFragment("outputSelectedSkin");
                for (int i = 0; i < skins.length; i++) {
                    Skin skin = (Skin) skins[i];
                    setAttribute("skinDescription", skin.getDescription().get(SessionManager.getCurrentLocale().getLanguage()));
                    setAttribute("skinId", skin.getId());
                    renderFragment("outputSkin");
                }
            } else {
                // Empty skin attribute to give the possibility for no skin selection.
                setAttribute("skinDescription", bundle.getString("ui.admin.configuration.skin.sameGraphicElement"));
                setAttribute("skinId", "");
                renderFragment("outputSkin");
                for (int i = 0; i < skins.length; i++) {
                    Skin skin = (Skin) skins[i];
                    boolean currentSkin = skin.getId().equals(getSectionPropertiesHandler().getSkin());
                    setAttribute("skinDescription", skin.getDescription().get(SessionManager.getCurrentLocale().getLanguage()));
                    setAttribute("skinId", skin.getId());
                    renderFragment(currentSkin ? "outputSelectedSkin" : "outputSkin");
                }
            }
            renderFragment("skinsEnd");
View Full Code Here

Examples of org.jboss.dashboard.ui.resources.Skin

                setAttribute("skinTitle", bundle.getString("ui.admin.configuration.skin.sameGraphicElement"));
                setAttribute("skinId", "");
                renderFragment("outputSkin");
                for (int i = 0; i < skins.length; i++) {
                    Skin skin = (Skin) skins[i];
                    if (getSectionsPropertiesHandler().getSkin() != null) {
                        if (skin.getId().equals(getSectionsPropertiesHandler().getSkin()))
                            setAttribute("selected", "selected");
                        else
                            setAttribute("selected", "");
                    }
                    setAttribute("skinTitle", LocaleManager.lookup().localize(skin.getDescription()));
                    setAttribute("skinId", skin.getId());
                    renderFragment("outputSkin");
                }
                renderFragment("outputSkinsEnd");

                renderFragment("outputEnvelopesStart");
View Full Code Here

Examples of org.openbp.cockpit.modeler.skins.Skin

   *
   * @param g the graphics object where the shadow has to paint
   */
  public void drawShadow(final Graphics g)
  {
    Skin skin = ((ProcessDrawing) drawing()).getProcessSkin();

    if (shadowLayouter != null && ! skin.isDisableShadows())
    {
      shadowLayouter.drawShadows(ShadowEnumerator.enumerate((CompositeFigure) drawing()), g);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.