Examples of TrinidadAgent


Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

   */
  private static class Key
  {
    public Key(StyleContext context)
    {
      TrinidadAgent agent = context.getAgent();
      LocaleContext localeContext = context.getLocaleContext();
      AccessibilityProfile accProfile = context.getAccessibilityProfile();

      _init(
       localeContext.getTranslationLocale(),
       LocaleUtils.getReadingDirection(localeContext),
       agent.getAgentApplication(),
       agent.getAgentVersion(),
       agent.getAgentOS(),
       !context.isDisableStyleCompression(),
       accProfile,
       context.isPortletMode());
    }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    if (XhtmlRenderer.isScreenReaderMode(arc))
      return true;

    // For this switch - and for getting the major version - tunnel
    // to CoreRenderingContext
    TrinidadAgent agent = ((CoreRenderingContext) arc).getTrinidadAgent();
    switch (agent.getAgentApplication())
    {
      case IEXPLORER:
        if (agent.getAgentOS() == TrinidadAgent.OS_WINDOWS)
        {
          // IE 4 doesn't support the label hack.
          if (agent.getAgentMajorVersion() == 4)
            return false;

          // JDev VE masquerades as IE Windows, but doesn't support this
          if (agent.getCapability(TrinidadAgent.CAP_IS_JDEV_VE) != null)
            return false;

          // IE 5+ supports hidden labels
          return true;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

  {
    LocaleContext localeContext = context.getLocaleContext();
    Locale locale = localeContext.getTranslationLocale();
    int direction = LocaleUtils.getReadingDirection(localeContext);
    int mode = NameUtils.getMode(ModeUtils.getCurrentMode(context));
    TrinidadAgent agent = context.getAgent();
    AccessibilityProfile accProfile = context.getAccessibilityProfile();

    List<StyleSheetNode> v = new ArrayList<StyleSheetNode>(); // List of matching style sheets
    Iterator<StyleSheetNode> e = getStyleSheets()// Iterator of all style sheets
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

   */
  protected boolean useEmbed(
    RenderingContext arc
    )
  {
    TrinidadAgent agent = (TrinidadAgent) arc.getAgent();

    // =-= bts only desktop IE seems to support this
    //         Move this to capability
    return !((agent.getAgentType()       == TrinidadAgent.TYPE_DESKTOP) &&
            (agent.getAgentApplication() == TrinidadAgent.APPLICATION_IEXPLORER) &&
            (agent.getAgentOS()          == TrinidadAgent.OS_WINDOWS));
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    String           primaryMimeType
    )
  {
    PlayerData playerData = null;
    // the default player is the link player
    TrinidadAgent agent = (TrinidadAgent) arc.getAgent();
    int agentOSInt = agent.getAgentOS();
   
    // get the set of supported players for this OS
    HashSet<Object> supportedPlayers = _sSupportedOSPlayers.get(agentOSInt);
   
    // are we trying to display an image?
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    UIXRenderingContext context
    )
  {

    // First, make sure the agent supports partial rendering
    TrinidadAgent agent = context.getAgent();
    Object capPartial = agent.getCapability(TrinidadAgent.CAP_PARTIAL_RENDERING);
    if (!Boolean.TRUE.equals(capPartial))
      return false;

    return true;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    if (XhtmlRenderer.isInaccessibleMode(arc))
      return false;

    // For this switch - and for getting the major version - tunnel
    // to CoreRenderingContext
    TrinidadAgent agent = ((CoreRenderingContext) arc).getTrinidadAgent();
    switch (agent.getAgentApplication())
    {
      case TrinidadAgent.APPLICATION_IEXPLORER:
        if (agent.getAgentOS() == TrinidadAgent.OS_WINDOWS)
        {
          // IE 4 doesn't support the label hack.
          if (agent.getAgentMajorVersion() == 4)
            return false;

          // JDev VE masquerades as IE Windows, but doesn't support this
          if (agent.getCapability(TrinidadAgent.CAP_IS_JDEV_VE) != null)
            return false;

          // IE 5 and 6 do.
          return true;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    return l;
  }

  private boolean _supportsSeparateWindow(FacesContext context)
  {
    TrinidadAgent agent = AgentUtil.getAgent(context);
    return XhtmlUtils.supportsSeparateWindow(agent);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

    if (encoding != null)
      return encoding;

    // Pick an encoding based on the Configuration/Agent
    Configuration config = context.getConfiguration();
    TrinidadAgent agent = context.getAgent();
    //encodings was part of old Agent capabilities, not in new Agent Caps. So replaced
    //Object encodingsObj = agent.getCapability(AdfFacesAgent.CAP_IMAGE_ENCODINGS);
    //int encodings = ((encodingsObj == null)
    //                 ? (AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF |
    //                    AdfFacesAgent.IMAGE_ENCODINGS_CAP_PNG)
    //                 : ((Number) encodingsObj).intValue());

    // If GIF is enabled and supported, use it
    //if (((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF) != 0) &&
    //      !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
    //{
    //  return ImageEncoderManager.GIF_TYPE;
    //}
    if ((agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE) == Boolean.TRUE) &&
            !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
    {
      return ImageEncoderManager.GIF_TYPE;
    }

    //encodings was part of old Agent capabilities, not in new Agent Caps. So replaced
    //if ((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_PNG) != 0)
    //{
    //  return ImageEncoderManager.PNG_TYPE;
    //}
    if (agent.getCapability(TrinidadAgent.CAP_PNG_TYPE_IMAGE) == Boolean.TRUE)
    {
      return ImageEncoderManager.PNG_TYPE;
    }

View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

  {
    CacheEntry entry = _cache.get(key);
    if (entry == null)
      return null;

    TrinidadAgent agent = context.getAgent();
    //int encodings = ((Integer)agent.getCapability(
    //                                  AdfFacesAgent.CAP_IMAGE_ENCODINGS)).intValue();
    boolean capGif = false;
    Object capability =  agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE);
    if (capability == Boolean.TRUE)
       capGif = true;

    boolean capPng = false;
    capability = agent.getCapability(TrinidadAgent.CAP_PNG_TYPE_IMAGE);
    if (capability == Boolean.TRUE)
      capPng = true;

    if (_supportsEncoding(entry, capGif, capPng))
      return entry;
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.