Package org.apache.myfaces.trinidadinternal.agent

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


        if (_BUTTON_PART.equals(part))
        {
          // Force partial rendering (if we're launching a window)
          // =-=AEW I don't believe this is necessary;  I believe
          // we've already got "partial" turned on
          TrinidadAgent agent = AgentUtil.getAgent(facesContext);
          if (XhtmlUtils.supportsSeparateWindow(agent))
            PartialPageUtils.forcePartialRendering(facesContext);

          queueActionEvent(facesContext, component);
        }
View Full Code Here


    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 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

  static public boolean supportsHiddenLabels(UIXRenderingContext context)
  {
    if (!BaseLafRenderer.supportsID(context))
      return false;

    TrinidadAgent agent = context.getAgent();
    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 and 6 do.
          return true;
        }

        // IE on the Mac doesn't support the label hack
        return false;

      // Mozilla does support the label hack
      case GECKO:
        // Make sure we don't change the VE to Gecko
        assert(agent.getCapability(TrinidadAgent.CAP_IS_JDEV_VE) == null);
        return true;

      // Assume everyone else doesn't.
      case NETSCAPE:
      default:
View Full Code Here

  {
    // First, get an TrinidadAgent out of the plain Agent
    // =-=AEW In theory, we should only be getting a plain Agent
    // out of the RequestContext:  for some reason, we're going
    // straight to an TrinidadAgent in RequestContext
    TrinidadAgent agent;
    if (base instanceof TrinidadAgent)
      agent = (TrinidadAgent) base;
    else
      agent = new TrinidadAgentImpl(context, base);
View Full Code Here

   */
  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

   */
  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

  }

  // Get the version as a String
  private static String _getVersionString(StyleContext context)
  {
    TrinidadAgent agent = context.getAgent();
    String version = agent.getAgentVersion();

    if (version == null)
      return _UNKNOWN_NAME;

    return version;
View Full Code Here

   */
  public static boolean supportsTransparentImages(
    UIXRenderingContext context
    )
  {
    TrinidadAgent agent = context.getAgent();

    // =-=ags Temporarily disabling the use of transparent images
    // on ICE due to problems with tiling transparent images that
    // are affecting UIXVE.  This code should be removed once the
    // underlying ICE bug is fixed (supposedly ICE 5.4.1)
    if (TrinidadAgent.APPLICATION_ICE == agent.getAgentApplication())
      return false;

    //int encodings = ((Integer)agent.getCapability(
    //                                  AdfFacesAgent.CAP_IMAGE_ENCODINGS)).intValue();

    // If the Agent suports transparent PNG, we are good to go...
    //if ((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_TRANSPARENT_PNG) != 0)
    //  return true;

    if (agent.getCapability(TrinidadAgent.CAP_TRANSPARENT_PNG_TYPE_IMAGE) == Boolean.TRUE)
       return true;

    // Otherwise, check GIF suport...
    Configuration config = context.getConfiguration();

    //return (((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF) != 0) &&
    //          !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)));
    return ((agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE) == Boolean.TRUE) &&
               !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)));

  }
View Full Code Here

  {
    // First, get an TrinidadAgent out of the plain Agent
    // =-=AEW In theory, we should only be getting a plain Agent
    // out of the RequestContext:  for some reason, we're going
    // straight to an TrinidadAgent in RequestContext
    TrinidadAgent agent;
    if (base instanceof TrinidadAgent)
      agent = (TrinidadAgent) base;
    else
      agent = new TrinidadAgentImpl(context, base);
View Full Code Here

  {
    // First, get an TrinidadAgent out of the plain Agent
    // =-=AEW In theory, we should only be getting a plain Agent
    // out of the RequestContext:  for some reason, we're going
    // straight to an TrinidadAgent in RequestContext
    TrinidadAgent agent;
    if (base instanceof TrinidadAgent)
      agent = (TrinidadAgent) base;
    else
      agent = new TrinidadAgentImpl(context, base);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.agent.TrinidadAgent

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.