Package org.apache.myfaces.trinidadinternal.style.xml.parse

Examples of org.apache.myfaces.trinidadinternal.style.xml.parse.PropertyNode


    // Compute the StringBuffer size
    int bufferSize = 0;
    for (int i = 0; i < properties.length; i++)
    {
      PropertyNode property = properties[i];
      String name = property.getName();
      String value = property.getValue();

      if ((name != null) && (value != null))
      {
        bufferSize += property.getName().length();
        bufferSize += property.getValue().length();

        // Leave room for a separator
        bufferSize++;
      }
    }

    StringBuffer buffer = new StringBuffer(bufferSize);
    boolean first = true;

    for (int i = 0; i < properties.length; i++)
    {
      PropertyNode property = properties[i];
      String name = property.getName();
      String value = property.getValue();

      if ((name != null) && (value != null))
      {
        if (!first)
          buffer.append(";");
View Full Code Here


              }
            }
            else
            {
              // create the PropertyNode for skin properties (e.g., -tr-show-last-item: true)
              PropertyNode node = new PropertyNode(propertyName, propertyValue);
              skinPropertyNodeList.add(node);
            }
          }
          else
          {
View Full Code Here

          }
          // At this point, URIImageIcons start with '/' or 'http:',
          // whereas ContextImageIcons uri do not. This is how we will know which type of
          // Icon to create in StyleSheetDocument. Wrap back up with the 'url()' string so that
          // we will know this is not a TextIcon.
          propertyNodeArray[i] = new PropertyNode(propertyName, _wrapWithURLString(uriString));
        }     
        else if (propertyValue.startsWith("inhibit"))
        {
          propertyNodeArray[i] = new PropertyNode(propertyName, propertyValue);
        }
        else
        {
          String text = trimQuotes(propertyValue);
          propertyNodeArray[i] = new PropertyNode(propertyName, text);
        }
       

      } // end if 'content'
      else
        propertyNodeArray[i] = new PropertyNode(propertyName, propertyValue);
      i++;
    }
    // TODO - Add -tr-rule-ref capability for icons.
    // I purposely do not include the -tr-rule-ref at this time.
View Full Code Here

      selector = selectorName;

    // add text-antialias if it is set
    if (trTextAntialias)
    {
      propertyNodeList.add(new PropertyNode("text-antialias", "true"));
    }
    // convert to a PropertyNode[], because StyleNode takes this type.
    PropertyNode[] propertyArray =
      propertyNodeList.toArray(new PropertyNode[propertyNodeList.size()]);
View Full Code Here

  public void property(String name, String value)
  {

    if (_inStyleRule && (_propertyNodeList != null))
    {
      _propertyNodeList.add(new PropertyNode(name, value));
    }
  }
View Full Code Here

            String resolvedUrl = _resolveURL(baseURI,
                                             propertyValue,
                                             sourceName,
                                             selectorName);
           
            propertyNode = new PropertyNode(propertyName, resolvedUrl);
          }
          else if (_URI_PROPERTIES.contains(propertyName))
          {
            // Make sure it's a legit value for an URL
            if (!_SPECIAL_URI_VALUES.contains(propertyValue))
View Full Code Here

      selector = selectorName;

    // add text-antialias if it is set
    if (trTextAntialias)
    {
      propertyNodeList.add(new PropertyNode("text-antialias", "true"));
    }
    // convert to a PropertyNode[], because StyleNode takes this type.
    PropertyNode[] propertyArray =
      propertyNodeList.toArray(new PropertyNode[propertyNodeList.size()]);
View Full Code Here

      // Add in the properties for the style
      Iterator<PropertyNode> e = styleNode.getProperties();
      while (e.hasNext())
      {
        PropertyNode property = e.next();
        String name = property.getName();
        String value = property.getValue();

        style.setProperty(name, value);
      }

      map.put(id, style);
View Full Code Here

        Iterator<PropertyNode> properties = style.getProperties();
        boolean first = true;

        while (properties.hasNext())
        {
          PropertyNode property = properties.next();
          String propName = property.getName();
          String propValue = property.getValue();

          if ((propName != null) &&
              (propValue != null) &&
              (propValue.length() > 0 ))
          {
View Full Code Here

    // Compute the StringBuffer size
    int bufferSize = 0;
    for (int i = 0; i < properties.length; i++)
    {
      PropertyNode property = properties[i];
      String name = property.getName();
      String value = property.getValue();

      if ((name != null) && (value != null))
      {
        bufferSize += property.getName().length();
        bufferSize += property.getValue().length();

        // Leave room for a separator
        bufferSize++;
      }
    }

    StringBuffer buffer = new StringBuffer(bufferSize);
    boolean first = true;

    for (int i = 0; i < properties.length; i++)
    {
      PropertyNode property = properties[i];
      String name = property.getName();
      String value = property.getValue();

      if ((name != null) && (value != null))
      {
        if (!first)
          buffer.append(";");
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.style.xml.parse.PropertyNode

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.