Package org.apache.myfaces.trinidad.context

Examples of org.apache.myfaces.trinidad.context.Version


    while (versions.hasNext())
    {
      String version = versions.next();
      if (version != null)
      {
        v.add(new Version(version, "*"));
      }
    }
   
    return v.toArray(new Version[v.size()]);
  }
View Full Code Here


      {
        throw new IllegalArgumentException("Invalid @agent property name: " + propName);
      }
     
      // create the new Version, padding the version number out with wildcards
      Version newVersion = new Version(version, "*");
     
      return new VersionMatcher(newVersion, comparison);     
    }
    else
    {
View Full Code Here

   */
  private static boolean[] _isBrowserAndVersionMatch(StyleContext context,
      StyleSheetNode[] styleSheets)
  {
    int browser = context.getAgent().getAgentApplication();
    Version version = new Version(context.getAgent().getAgentVersion());
    if (browser == TrinidadAgent.APPLICATION_UNKNOWN)
    {
      return new boolean[] { false, false };
    }

View Full Code Here

    {
      Set<Version> versions = _agentVersions.get(browserNum);
      if (versions.isEmpty())
        return _BROWSER_EXACT_MATCH | _VERSION_UNKNOWN_MATCH;
     
      Version version = new Version(agent.getAgentVersion());
       
      for (Version av : versions)
      {
        if (av.compareTo(version) == 0)
        {
View Full Code Here

      {
        throw new IllegalArgumentException("Invalid @agent property name: " + propName);
      }

      // create the new Version, padding the version number out with wildcards
      Version newVersion = new Version(version, "*");

      return new VersionMatcher(newVersion, comparison);
    }
    else
    {
View Full Code Here

    if (Application.GECKO == _application)
      _major = 1;
    else
      _major = _getMajorVersion(versionString);
   
    _version = new Version(versionString);
   
    _skinFamilyType = _getSkinFamilyType(_os, _application);
    _capMap = _getCapabilityMap(context);
   
    Map<Object, Object> requestCaps = _delegate.getCapabilities();
View Full Code Here

    Locale[] anotherLocalesArray = getAnotherLocalesArray();
    Locale[] diffOrderLocalesArray = getDiffOrderLocalesArray();
    
    // create a browsers map
    Map<Integer, Set<Version>> browsers = new HashMap<Integer, Set<Version>>();
    browsers.put(1, new HashSet<Version>(Arrays.asList(new Version("5"), new Version("6"))));
    browsers.put(2, new HashSet<Version>(Arrays.asList(new Version("7"), new Version("8"))));
    Map<Integer, Set<Version>> anotherBrowsers = new HashMap<Integer, Set<Version>>();
    anotherBrowsers.put(1, new HashSet<Version>(Arrays.asList(new Version("5"), new Version("6"))));
    anotherBrowsers.put(2, new HashSet<Version>(Arrays.asList(new Version("7"), new Version("8"))));
    Map<Integer, Set<Version>> anotherBrowsersDiffOrder
        = new HashMap<Integer, Set<Version>>();
    anotherBrowsersDiffOrder.put(2, new HashSet<Version>(Arrays.asList(new Version("8"), new Version("7"))));
    anotherBrowsersDiffOrder.put(1, new HashSet<Version>(Arrays.asList(new Version("6"), new Version("5"))));


    int[] platforms = {2, 3, 4};
    int[] anotherPlatforms = {2, 3, 4};
    int[] differentOrderPlatforms = {2, 4, 3};
View Full Code Here

               
                if (!"version".equals(propName))
                {
                  throw new IllegalArgumentException("Invalid @agent property name: " + propName);
                }
                versions.add(new Version(version, "*"));
              }
            }
          }
        }
      }
View Full Code Here

   */
  private static boolean[] _isBrowserAndVersionMatch(StyleContext context,
      StyleSheetNode[] styleSheets)
  {
    int browser = context.getAgent().getAgentApplication();
    Version version = new Version(context.getAgent().getAgentVersion());
    if (browser == TrinidadAgent.APPLICATION_UNKNOWN)
    {
      return new boolean[] { false, false };
    }

View Full Code Here

    while (versions.hasNext())
    {
      String version = versions.next();
      if (version != null)
      {
        v.add(new Version(version, "*"));
      }
    }
   
    _versions = v.toArray(new Version[v.size()]);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.context.Version

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.