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

  }

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

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

   *          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

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 (deprecatedScore == NO_MATCH)
      return _NO_MATCH_SCORE;

    int nameScore = _scoreName(lafName);

    TrinidadAgent agent = context. getAgent();
   
    int typeScore = NO_MATCH;
    int agentType = agent.getAgentType();
    for (int type: _agentTypes)
    {
      typeScore = Math.max(typeScore, _score(type, agentType));
    }
   
    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

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

   */
  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(),
       true,
       accProfile,
       context.isPortletMode());
    }
View Full Code Here

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

   */
  protected boolean useEmbed(
    RenderingContext rc
    )
  {
    TrinidadAgent agent = (TrinidadAgent) rc.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) rc.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

  {
    ResponseWriter writer = context.getResponseWriter();

    // IE6 does not support stretching by setting both top & bottom or left & right,
    // so we have to use some ugly code.
    TrinidadAgent agent = (TrinidadAgent)rc.getAgent();
    boolean isIE6 = Agent.AGENT_IE.equals(agent.getAgentName()) &&
      agent.getAgentMajorVersion() == 6;
    if (isIE6)
    {
      // send down the JS that we need to stretch the components
      XhtmlUtils.addLib(context, rc, PanelBorderIE6Scriptlet.sharedInstance().getScriptletKey());
    }
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.