Package org.apache.myfaces.trinidadinternal.agent

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


   *          and the second value being the version match
   */
  private static boolean[] _isBrowserAndVersionMatch(StyleContext context,
      StyleSheetNode[] styleSheets)
  {
    TrinidadAgent agent = context.getAgent();
    TrinidadAgent.Application browser = agent.getAgentApplication();
    if (browser == TrinidadAgent.Application.UNKNOWN)
    {
      return new boolean[] { false, false };
    }

View Full Code Here

  {
    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

  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;

      // Safari does support the label hack
      case SAFARI:
        return true;
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

    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

    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().ordinal());
    int versScore = _score(_agentMajorVersion, agent.getAgentMajorVersion());
    int osScore = _score(_agentOS, agent.getAgentOS());

    return new ScoreImpl(nameScore,
                         typeScore,
                         appScore,
                         versScore,
View Full Code Here

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

    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

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.