Examples of TrinidadAgent


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

  {
    // First, get an AdfFacesAgent 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 AdfFacesAgent in RequestContext
    TrinidadAgent agent;
    if (base instanceof TrinidadAgent)
      agent = (TrinidadAgent) base;
    else
      agent = new TrinidadAgentImpl(context, base);
View Full Code Here

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

    if (deprecatedScore == NO_MATCH)
      return _NO_MATCH_SCORE;

    int nameScore = _scoreName(lafName);

    TrinidadAgent agent = context. getAgent();
    int typeScore = _score(_agentType, agent.getAgentType());
    int appScore = _score(_agentApplication, agent.getAgentApplication());
    int versScore = _score(_agentMajorVersion, agent.getAgentMajorVersion());
    int osScore = _score(_agentOS, agent.getAgentOS());

    return new ScoreImpl(nameScore,
                         typeScore,
                         appScore,
                         versScore,
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();

    // -= Simon Lessard =-
    // TODO: Check if synchronization is truly required   
    Vector<StyleSheetNode> v = new Vector<StyleSheetNode>(); // Vector of matching style sheets
    Iterator<StyleSheetNode> e = getStyleSheets()// Enum of all style sheets
View Full Code Here

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

    // targets during the partial page render.  This forces the icon
    // to be replaced as part of the partial page update, and fixes
    // our layout problems.
    String iconID = null;
    Object id = (supportsID(context) ? getID(context, navBar) : null);
    TrinidadAgent agent = context.getAgent();

    if ((id != null) &&
        (partialTargets != null) &&
        (agent.getAgentApplication() == TrinidadAgent.APPLICATION_IEXPLORER))
    {
      iconID = id.toString() + "-i";
    }

    // if we need to render standalone, create a table and table row...
View Full Code Here

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

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

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

  // Key class used for hashing style sheet URIs
  private static class Key
  {
    public Key(StyleContext context)
    {
      TrinidadAgent agent = context.getAgent();

      LocaleContext localeContext = context.getLocaleContext();

      UserStyleSheet styleSheet = UserStyleSheet.getUserStyleSheet(context);

      _init(
       localeContext.getTranslationLocale(),
       LocaleUtils.getReadingDirection(localeContext),
       agent.getAgentApplication(),
       agent.getAgentMajorVersion(),
       agent.getAgentOS(),
       styleSheet,
       true);
    }
View Full Code Here

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

  }

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

    // Zero indicates that the version is not known
    if (version == 0)
      return _UNKNOWN_NAME;
View Full Code Here

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

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

    TrinidadAgent agent = context.getAgent();
    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;
        }

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

      // Mozilla does support the label hack
      case TrinidadAgent.APPLICATION_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 TrinidadAgent.APPLICATION_NETSCAPE:
      default:
View Full Code Here

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

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

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

  {
    // 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
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.