org.eclipse.e4.ui.css.core_0.10.2.v20120912-132817

16:42:58.325 INFO  jd.cli.Main - Decompiling org.eclipse.e4.ui.css.core_0.10.2.v20120912-132817.jar
package org.eclipse.e4.ui.css.core;

public class SACConstants
{
  public static final String SACPARSER_FLUTE = "org.w3c.flute.parser.Parser";
  public static final String SACPARSER_FLUTE_CSS3 = "org.w3c.flute.parser.CSS3Parser";
  public static final String SACPARSER_STEADYSTATE = "com.steadystate.css.parser.SACParser";
  public static final String SACPARSER_BATIK = "org.apache.batik.css.parser.Parser";
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.SACConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterColorConfig;
import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.RGBColor;

public class CSS2ColorHelper
{
  private static Map colorNamesMap = new HashMap();
  private static Map colorHexasMap = new HashMap();
  
  public static RGBColor getRGBColor(String value)
  {
    if ((value.startsWith("#")) && (value.length() == 7)) {
      try
      {
        int redValue = Integer.decode("0x" + value.substring(1, 3))
          .intValue();
        int greenValue = Integer.decode("0x" + value.substring(3, 5))
          .intValue();
        int blueValue = Integer.decode("0x" + value.substring(5))
          .intValue();
        return new CSS2RGBColorImpl(redValue, greenValue, blueValue);
      }
      catch (Exception localException)
      {
        return null;
      }
    }
    value = value.toLowerCase();
    value = (String)colorNamesMap.get(value);
    if (value != null) {
      return getRGBColor(value);
    }
    return null;
  }
  
  public static String getColorStringValue(RGBColor rgbColor, ICSSValueConverterConfig config)
  {
    if ((config instanceof ICSSValueConverterColorConfig))
    {
      ICSSValueConverterColorConfig colorConfig = (ICSSValueConverterColorConfig)config;
      switch (colorConfig.getFormat())
      {
      case 0: 
        return getHexaColorStringValue(rgbColor);
      case 2: 
        return getRGBColorStringValue(rgbColor);
      case 1: 
        String hexaColor = getHexaColorStringValue(rgbColor);
        if (hexaColor != null)
        {
          String colorName = getColorNameFromHexaColor(hexaColor);
          if (colorName != null) {
            return colorName;
          }
          return hexaColor;
        }
        return getRGBColorStringValue(rgbColor);
      }
    }
    return getHexaColorStringValue(rgbColor);
  }
  
  public static String getRGBColorStringValue(RGBColor rgbColor)
  {
    String result = "rgb(";
    int red = (int)rgbColor.getRed().getFloatValue(
      (short)1);
    result = result + red;
    result = result + ",";
    int green = (int)rgbColor.getGreen().getFloatValue(
      (short)1);
    result = result + green;
    result = result + ",";
    int blue = (int)rgbColor.getBlue().getFloatValue(
      (short)1);
    result = result + blue;
    result = result + ")";
    return result;
  }
  
  public static String getHexaColorStringValue(RGBColor rgbColor)
  {
    String result = "#";
    int red = (int)rgbColor.getRed().getFloatValue(
      (short)1);
    if (red < 16) {
      result = result + "0";
    }
    result = result + Integer.toHexString(red);
    int green = (int)rgbColor.getGreen().getFloatValue(
      (short)1);
    if (green < 16) {
      result = result + "0";
    }
    result = result + Integer.toHexString(green);
    int blue = (int)rgbColor.getBlue().getFloatValue(
      (short)1);
    if (blue < 16) {
      result = result + "0";
    }
    result = result + Integer.toHexString(blue);
    return result;
  }
  
  public static String getHexaColorFromColorName(String colorName)
  {
    return (String)colorNamesMap.get(colorName);
  }
  
  public static boolean isColorName(String value)
  {
    return colorNamesMap.get(value) != null;
  }
  
  public static String getColorNameFromHexaColor(String hexaColor)
  {
    hexaColor = hexaColor.toUpperCase();
    return (String)colorHexasMap.get(hexaColor);
  }
  
  static
  {
    colorNamesMap.put("aliceBlue", "#F0F8FF");
    colorNamesMap.put("aqua", "#00FFFF");
    colorNamesMap.put("aquamarine", "#7FFFD4");
    colorNamesMap.put("azure", "#F0FFFF");
    colorNamesMap.put("beige", "#F5F5DC");
    colorNamesMap.put("bisque", "#FFE4C4");
    colorNamesMap.put("black", "#000000");
    colorNamesMap.put("blanchedalmond", "#FFEBCD");
    colorNamesMap.put("blue", "#0000FF");
    colorNamesMap.put("blueviolet", "#8A2BE2");
    colorNamesMap.put("brown", "#A52A2A");
    colorNamesMap.put("burlywood", "#DEB887");
    colorNamesMap.put("cadetblue", "#5F9EA0");
    colorNamesMap.put("chartreuse", "#7FFF00");
    colorNamesMap.put("chocolate", "#D2691E");
    colorNamesMap.put("coral", "#FF7F50");
    colorNamesMap.put("cornflowerblue", "#6495ED");
    colorNamesMap.put("cornsilk", "#FFF8DC");
    colorNamesMap.put("crimson", "#DC143C");
    colorNamesMap.put("cyan", "#00FFFF");
    colorNamesMap.put("darkblue", "#00008B");
    colorNamesMap.put("darkcyan", "#008B8B");
    colorNamesMap.put("darkgoldenrod", "#B8860B");
    colorNamesMap.put("darkgray", "#A9A9A9");
    colorNamesMap.put("darkgrey", "#A9A9A9");
    colorNamesMap.put("darkgreen", "#006400");
    colorNamesMap.put("darkkhaki", "#BDB76B");
    colorNamesMap.put("darkmagenta", "#8B008B");
    colorNamesMap.put("darkolivegreen", "#556B2F");
    colorNamesMap.put("darkorange", "#FF8C00");
    colorNamesMap.put("darkorchid", "#9932CC");
    colorNamesMap.put("darkred", "#8B0000");
    colorNamesMap.put("darksalmon", "#E9967A");
    colorNamesMap.put("darkseagreen", "#8FBC8F");
    colorNamesMap.put("darkslateblue", "#483D8B");
    colorNamesMap.put("darkslategray", "#2F4F4F");
    colorNamesMap.put("darkslategrey", "#2F4F4F");
    colorNamesMap.put("darkturquoise", "#00CED1");
    colorNamesMap.put("darkviolet", "#9400D3");
    colorNamesMap.put("deeppink", "#FF1493");
    colorNamesMap.put("deepskyblue", "#00BFFF");
    colorNamesMap.put("dimgray", "#696969");
    colorNamesMap.put("dimgrey", "#696969");
    colorNamesMap.put("dodgerblue", "#1E90FF");
    colorNamesMap.put("firebrick", "#B22222");
    colorNamesMap.put("floralwhite", "#FFFAF0");
    colorNamesMap.put("forestgreen", "#228B22");
    colorNamesMap.put("fuchsia", "#FF00FF");
    colorNamesMap.put("gainsboro", "#DCDCDC");
    colorNamesMap.put("ghostwhite", "#F8F8FF");
    colorNamesMap.put("gold", "#FFD700");
    colorNamesMap.put("goldenrod", "#DAA520");
    colorNamesMap.put("gray", "#808080");
    colorNamesMap.put("grey", "#808080");
    colorNamesMap.put("green", "#008000");
    colorNamesMap.put("greenyellow", "#ADFF2F");
    colorNamesMap.put("honeydew", "#F0FFF0");
    colorNamesMap.put("hotpink", "#FF69B4");
    colorNamesMap.put("indianred", "#CD5C5C");
    colorNamesMap.put("indigo", "#4B0082");
    colorNamesMap.put("ivory", "#FFFFF0");
    colorNamesMap.put("khaki", "#F0E68C");
    colorNamesMap.put("lavender", "#E6E6FA");
    colorNamesMap.put("lavenderblush", "#FFF0F5");
    colorNamesMap.put("lawngreen", "#7CFC00");
    colorNamesMap.put("lemonchiffon", "#FFFACD");
    colorNamesMap.put("lightblue", "#ADD8E6");
    colorNamesMap.put("lightcoral", "#F08080");
    colorNamesMap.put("lightcyan", "#E0FFFF");
    colorNamesMap.put("lightgoldenrodyellow", "#FAFAD2");
    colorNamesMap.put("lightgray", "#D3D3D3");
    colorNamesMap.put("lightgrey", "#D3D3D3");
    colorNamesMap.put("lightgreen", "#90EE90");
    colorNamesMap.put("lightpink", "#FFB6C1");
    colorNamesMap.put("lightsalmon", "#FFA07A");
    colorNamesMap.put("lightseagreen", "#20B2AA");
    colorNamesMap.put("lightskyblue", "#87CEFA");
    colorNamesMap.put("lightslategray", "#778899");
    colorNamesMap.put("lightslategrey", "#778899");
    colorNamesMap.put("lightsteelblue", "#B0C4DE");
    colorNamesMap.put("lightyellow", "#FFFFE0");
    colorNamesMap.put("lime", "#00FF00");
    colorNamesMap.put("limegreen", "#32CD32");
    colorNamesMap.put("linen", "#FAF0E6");
    colorNamesMap.put("magenta", "#FF00FF");
    colorNamesMap.put("maroon", "#800000");
    colorNamesMap.put("mediumaquamarine", "#66CDAA");
    colorNamesMap.put("mediumblue", "#0000CD");
    colorNamesMap.put("mediumorchid", "#BA55D3");
    colorNamesMap.put("mediumpurple", "#9370D8");
    colorNamesMap.put("mediumseagreen", "#3CB371");
    colorNamesMap.put("mediumslateblue", "#7B68EE");
    colorNamesMap.put("mediumspringgreen", "#00FA9A");
    colorNamesMap.put("mediumturquoise", "#48D1CC");
    colorNamesMap.put("mediumvioletred", "#C71585");
    colorNamesMap.put("midnightblue", "#191970");
    colorNamesMap.put("mintcream", "#F5FFFA");
    colorNamesMap.put("mistyrose", "#FFE4E1");
    colorNamesMap.put("moccasin", "#FFE4B5");
    colorNamesMap.put("navajowhite", "#FFDEAD");
    colorNamesMap.put("navy", "#000080");
    colorNamesMap.put("oldlace", "#FDF5E6");
    colorNamesMap.put("olive", "#808000");
    colorNamesMap.put("olivedrab", "#6B8E23");
    colorNamesMap.put("orange", "#FFA500");
    colorNamesMap.put("orangered", "#FF4500");
    colorNamesMap.put("orchid", "#DA70D6");
    colorNamesMap.put("palegoldenrod", "#EEE8AA");
    colorNamesMap.put("palegreen", "#98FB98");
    colorNamesMap.put("paleturquoise", "#AFEEEE");
    colorNamesMap.put("palevioletred", "#D87093");
    colorNamesMap.put("papayawhip", "#FFEFD5");
    colorNamesMap.put("peachpuff", "#FFDAB9");
    colorNamesMap.put("peru", "#CD853F");
    colorNamesMap.put("pink", "#FFC0CB");
    colorNamesMap.put("plum", "#DDA0DD");
    colorNamesMap.put("powderblue", "#B0E0E6");
    colorNamesMap.put("purple", "#800080");
    colorNamesMap.put("red", "#FF0000");
    colorNamesMap.put("rosybrown", "#BC8F8F");
    colorNamesMap.put("royalblue", "#4169E1");
    colorNamesMap.put("saddlebrown", "#8B4513");
    colorNamesMap.put("salmon", "#FA8072");
    colorNamesMap.put("sandybrown", "#F4A460");
    colorNamesMap.put("seagreen", "#2E8B57");
    colorNamesMap.put("seashell", "#FFF5EE");
    colorNamesMap.put("sienna", "#A0522D");
    colorNamesMap.put("silver", "#C0C0C0");
    colorNamesMap.put("skyblue", "#87CEEB");
    colorNamesMap.put("slateblue", "#6A5ACD");
    colorNamesMap.put("slategray", "#708090");
    colorNamesMap.put("slategrey", "#708090");
    colorNamesMap.put("snow", "#FFFAFA");
    colorNamesMap.put("springgreen", "#00FF7F");
    colorNamesMap.put("steelblue", "#4682B4");
    colorNamesMap.put("tan", "#D2B48C");
    colorNamesMap.put("teal", "#008080");
    colorNamesMap.put("thistle", "#D8BFD8");
    colorNamesMap.put("tomato", "#FF6347");
    colorNamesMap.put("turquoise", "#40E0D0");
    colorNamesMap.put("violet", "#EE82EE");
    colorNamesMap.put("wheat", "#F5DEB3");
    colorNamesMap.put("white", "#FFFFFF");
    colorNamesMap.put("whitesmoke", "#F5F5F5");
    colorNamesMap.put("yellow", "#FFFF00");
    colorNamesMap.put("yellowgreen", "#9ACD32");
    for (Iterator iterator = colorNamesMap.entrySet().iterator(); iterator
          .hasNext();)
    {
      Map.Entry entry = (Map.Entry)iterator.next();
      colorHexasMap.put(entry.getValue(), entry.getKey());
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import org.w3c.dom.css.CSSPrimitiveValue;

public class CSS2FontHelper
{
  public static String getFontFamily(String family)
  {
    if (family == null) {
      return null;
    }
    if ((family.indexOf(" ") != -1) || (family.startsWith("@"))) {
      family = "\"" + family + "\"";
    }
    return family;
  }
  
  public static String getFontSize(int size)
  {
    return size;
  }
  
  public static String getFontStyle(boolean isItalic)
  {
    if (isItalic) {
      return "italic";
    }
    return "normal";
  }
  
  public static String getFontWeight(boolean isBold)
  {
    if (isBold) {
      return "bold";
    }
    return "normal";
  }
  
  public static String getCSSFontPropertyName(CSSPrimitiveValue value)
  {
    short type = value.getPrimitiveType();
    switch (type)
    {
    case 19: 
    case 21: 
      String s = value.getStringValue();
      if (("italic".equals(s)) || 
        ("oblique".equals(s))) {
        return "font-style";
      }
      if (("normal".equals(s)) || ("bold".equals(s)) || ("bolder".equals(s))) {
        return "font-weight";
      }
      return "font-family";
    case 1: 
    case 5: 
    case 9: 
      return "font-size";
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSS2FontHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import org.eclipse.e4.ui.css.core.dom.properties.css2.CSS2FontProperties;
import org.eclipse.e4.ui.css.core.dom.properties.css2.CSS2FontPropertiesImpl;
import org.eclipse.e4.ui.css.core.engine.CSSElementContext;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.CSSValue;
import org.w3c.dom.css.CSSValueList;

public class CSS2FontPropertiesHelpers
{
  public static final String CSS2FONT_KEY = "org.eclipse.e4.ui.css.core.css2.CSS2FONT_KEY";
  
  public static CSS2FontProperties getCSS2FontProperties(CSSElementContext context)
  {
    return (CSS2FontProperties)context.getData("org.eclipse.e4.ui.css.core.css2.CSS2FONT_KEY");
  }
  
  public static void setCSS2FontProperties(CSS2FontProperties fontProperties, CSSElementContext context)
  {
    if (fontProperties == null) {
      return;
    }
    context.setData("org.eclipse.e4.ui.css.core.css2.CSS2FONT_KEY", fontProperties);
  }
  
  public static CSS2FontProperties createCSS2FontProperties(CSSValue value, String property)
  {
    CSS2FontProperties fontProperties = new CSS2FontPropertiesImpl();
    updateCSSPropertyFont(fontProperties, property, value);
    return fontProperties;
  }
  
  public static void updateCSSPropertyFont(CSS2FontProperties fontProperties, String property, CSSValue value)
  {
    if ("font-family".equals(property)) {
      updateCSSPropertyFontFamily(fontProperties, value);
    } else if ("font-size".equals(property)) {
      updateCSSPropertyFontSize(fontProperties, value);
    } else if ("font-style".equals(property)) {
      updateCSSPropertyFontStyle(fontProperties, value);
    } else if ("font-weight".equals(property)) {
      updateCSSPropertyFontWeight(fontProperties, value);
    } else if ("font".equals(property)) {
      updateCSSPropertyFontComposite(fontProperties, value);
    }
  }
  
  public static void updateCSSPropertyFontComposite(CSS2FontProperties font, CSSValue value)
  {
    if (value.getCssValueType() == 2)
    {
      CSSValueList valueList = (CSSValueList)value;
      int length = valueList.getLength();
      for (int i = 0; i < length; i++)
      {
        CSSValue value2 = valueList.item(i);
        updateCSSPropertyFontComposite(font, value2);
      }
    }
    else if (value.getCssValueType() == 1)
    {
      String property = 
        CSS2FontHelper.getCSSFontPropertyName((CSSPrimitiveValue)value);
      updateCSSPropertyFont(font, property, value);
    }
  }
  
  public static void updateCSSPropertyFontFamily(CSS2FontProperties font, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      font.setFamily((CSSPrimitiveValue)value);
    }
  }
  
  public static void updateCSSPropertyFontSize(CSS2FontProperties font, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      font.setSize((CSSPrimitiveValue)value);
    }
  }
  
  public static void updateCSSPropertyFontStyle(CSS2FontProperties font, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      font.setStyle((CSSPrimitiveValue)value);
    }
  }
  
  public static void updateCSSPropertyFontWeight(CSS2FontProperties font, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      font.setWeight((CSSPrimitiveValue)value);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSS2FontPropertiesHelpers
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.Counter;
import org.w3c.dom.css.RGBColor;
import org.w3c.dom.css.Rect;

public class CSS2PrimitiveValueImpl
  implements CSSPrimitiveValue
{
  private String s = null;
  private float v = -9999.0F;
  private int i = 55537;
  private short primitiveType;
  
  public CSS2PrimitiveValueImpl(String s)
  {
    this.s = s;
    primitiveType = 21;
  }
  
  public CSS2PrimitiveValueImpl(float v)
  {
    this.v = v;
    primitiveType = 1;
  }
  
  public CSS2PrimitiveValueImpl(int i)
  {
    this.i = i;
    primitiveType = 1;
  }
  
  public Counter getCounterValue()
    throws DOMException
  {
    return null;
  }
  
  public float getFloatValue(short word0)
    throws DOMException
  {
    if (v != -9999.0F) {
      return v;
    }
    return i;
  }
  
  public short getPrimitiveType()
  {
    return primitiveType;
  }
  
  public Rect getRectValue()
    throws DOMException
  {
    return null;
  }
  
  public RGBColor getRGBColorValue()
    throws DOMException
  {
    return null;
  }
  
  public String getStringValue()
    throws DOMException
  {
    return s;
  }
  
  public void setFloatValue(short word0, float f)
    throws DOMException
  {}
  
  public void setStringValue(short word0, String s)
    throws DOMException
  {}
  
  public String getCssText()
  {
    return null;
  }
  
  public short getCssValueType()
  {
    return 1;
  }
  
  public void setCssText(String s)
    throws DOMException
  {}
  
  public String toString()
  {
    if (s != null) {
      return s;
    }
    if (v != -9999.0F) {
      return v;
    }
    if (i != 55537) {
      return i;
    }
    return super.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSS2PrimitiveValueImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.RGBColor;

public class CSS2RGBColorImpl
  implements RGBColor
{
  private CSSPrimitiveValue red;
  private CSSPrimitiveValue green;
  private CSSPrimitiveValue blue;
  
  public CSS2RGBColorImpl(int r, int g, int b)
  {
    red = new CSS2PrimitiveValueImpl(r);
    green = new CSS2PrimitiveValueImpl(g);
    blue = new CSS2PrimitiveValueImpl(b);
  }
  
  public CSSPrimitiveValue getBlue()
  {
    return blue;
  }
  
  public CSSPrimitiveValue getGreen()
  {
    return green;
  }
  
  public CSSPrimitiveValue getRed()
  {
    return red;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSS2RGBColorImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.css2;

import org.eclipse.e4.ui.css.core.dom.properties.CSSBorderProperties;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.CSSValue;

public class CSSBorderPropertiesHelpers
{
  public static void updateCSSProperty(CSSBorderProperties borderProperties, String property, CSSValue value)
  {
    if ("border-style".equals(property)) {
      updateCSSPropertyBorderStyle(borderProperties, value);
    } else if ("border-color".equals(property)) {
      updateCSSPropertyBorderColor(borderProperties, value);
    } else if ("border-width".equals(property)) {
      updateCSSPropertyBorderWidth(borderProperties, value);
    }
  }
  
  public static void updateCSSPropertyBorderStyle(CSSBorderProperties borderProperties, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      borderProperties.setStyle(((CSSPrimitiveValue)value)
        .getStringValue());
    }
  }
  
  public static void updateCSSPropertyBorderColor(CSSBorderProperties borderProperties, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      borderProperties.setColor((CSSPrimitiveValue)value);
    }
  }
  
  public static void updateCSSPropertyBorderWidth(CSSBorderProperties borderProperties, CSSValue value)
  {
    if (value.getCssValueType() == 1) {
      borderProperties.setWidth(
        (int)((CSSPrimitiveValue)value).getFloatValue((short)9));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.css2.CSSBorderPropertiesHelpers
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import org.w3c.dom.css.CSS2Properties;

public abstract interface CSSExtendedProperties
  extends CSS2Properties
{}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.CSSExtendedProperties
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import org.w3c.dom.css.CSSValue;

public abstract interface CSSProperty
{
  public abstract String getName();
  
  public abstract CSSValue getValue();
  
  public abstract void setValue(CSSValue paramCSSValue);
  
  public abstract boolean isImportant();
  
  public abstract void setImportant(boolean paramBoolean);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.CSSProperty
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

public abstract interface CSSPropertyList
{
  public abstract int getLength();
  
  public abstract CSSProperty item(int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.CSSPropertyList
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.css.CSSStyleDeclaration;

public abstract interface CSSStylableElement
  extends Element
{
  public abstract Object getNativeWidget();
  
  public abstract String getCSSId();
  
  public abstract String getCSSClass();
  
  public abstract String getCSSStyle();
  
  public abstract CSSStyleDeclaration getDefaultStyleDeclaration(String paramString);
  
  public abstract void copyDefaultStyleDeclarations(CSSStylableElement paramCSSStylableElement);
  
  public abstract void setDefaultStyleDeclaration(String paramString, CSSStyleDeclaration paramCSSStyleDeclaration);
  
  public abstract boolean isPseudoInstanceOf(String paramString);
  
  public abstract String[] getStaticPseudoInstances();
  
  public abstract boolean isStaticPseudoInstance(String paramString);
  
  public abstract void onStylesApplied(NodeList paramNodeList);
  
  public abstract CSSExtendedProperties getStyle();
  
  public abstract void initialize();
  
  public abstract void dispose();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.CSSStylableElement
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.eclipse.e4.ui.css.core.impl.dom.CSSExtendedPropertiesImpl;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.TypeInfo;
import org.w3c.dom.UserDataHandler;
import org.w3c.dom.css.CSSStyleDeclaration;

public abstract class ElementAdapter
  implements Element, CSSStylableElement
{
  private static final String[] EMPTY_STRING = new String[0];
  private Object nativeWidget;
  protected CSSEngine engine;
  private Map defaultStyleDeclarationMap = new HashMap();
  private CSSExtendedProperties style = null;
  private List staticPseudoInstances;
  
  public ElementAdapter(Object nativeWidget, CSSEngine engine)
  {
    this.nativeWidget = nativeWidget;
    this.engine = engine;
  }
  
  public void addStaticPseudoInstance(String pseudoE)
  {
    if (staticPseudoInstances == null) {
      staticPseudoInstances = new ArrayList();
    }
    staticPseudoInstances.add(pseudoE);
  }
  
  public boolean isStaticPseudoInstance(String s)
  {
    if (staticPseudoInstances == null) {
      return false;
    }
    return staticPseudoInstances.contains(s);
  }
  
  public void copyDefaultStyleDeclarations(CSSStylableElement stylableElement)
  {
    setDefaultStyleDeclaration(null, stylableElement
      .getDefaultStyleDeclaration(null));
    
    String[] staticPseudoInstances = stylableElement
      .getStaticPseudoInstances();
    if (staticPseudoInstances != null) {
      for (int i = 0; i < staticPseudoInstances.length; i++)
      {
        String pseudoE = staticPseudoInstances[i];
        CSSStyleDeclaration declaration = stylableElement
          .getDefaultStyleDeclaration(pseudoE);
        setDefaultStyleDeclaration(pseudoE, declaration);
      }
    }
  }
  
  public abstract String getLocalName();
  
  public abstract String getAttribute(String paramString);
  
  public String getAttributeNS(String namespace, String attr)
    throws DOMException
  {
    return getAttribute(attr);
  }
  
  public Attr getAttributeNode(String arg0)
  {
    return null;
  }
  
  public Attr getAttributeNodeNS(String arg0, String arg1)
    throws DOMException
  {
    return null;
  }
  
  public NodeList getElementsByTagName(String arg0)
  {
    return null;
  }
  
  public NodeList getElementsByTagNameNS(String arg0, String arg1)
    throws DOMException
  {
    return null;
  }
  
  public boolean hasAttribute(String arg0)
  {
    return false;
  }
  
  public boolean hasAttributeNS(String namespace, String attr)
    throws DOMException
  {
    return hasAttribute(attr);
  }
  
  public void removeAttribute(String arg0)
    throws DOMException
  {}
  
  public void removeAttributeNS(String arg0, String arg1)
    throws DOMException
  {}
  
  public Attr removeAttributeNode(Attr arg0)
    throws DOMException
  {
    return null;
  }
  
  public void setAttribute(String arg0, String arg1)
    throws DOMException
  {}
  
  public void setAttributeNS(String arg0, String arg1, String arg2)
    throws DOMException
  {}
  
  public Attr setAttributeNode(Attr arg0)
    throws DOMException
  {
    return null;
  }
  
  public Attr setAttributeNodeNS(Attr arg0)
    throws DOMException
  {
    return null;
  }
  
  public Node appendChild(Node newChild)
    throws DOMException
  {
    return insertBefore(newChild, null);
  }
  
  public Node cloneNode(boolean arg0)
  {
    return null;
  }
  
  public NamedNodeMap getAttributes()
  {
    return null;
  }
  
  public Node getFirstChild()
  {
    return null;
  }
  
  public Node getLastChild()
  {
    return null;
  }
  
  public String getTagName()
  {
    return getLocalName();
  }
  
  public Node getNextSibling()
  {
    return null;
  }
  
  public String getNodeName()
  {
    return getLocalName();
  }
  
  public short getNodeType()
  {
    return 1;
  }
  
  public String getNodeValue()
    throws DOMException
  {
    return null;
  }
  
  public Document getOwnerDocument()
  {
    return null;
  }
  
  public String getPrefix()
  {
    return null;
  }
  
  public Node getPreviousSibling()
  {
    return null;
  }
  
  public boolean hasAttributes()
  {
    return false;
  }
  
  public boolean hasChildNodes()
  {
    return false;
  }
  
  public Node insertBefore(Node newChild, Node refChild)
    throws DOMException
  {
    return null;
  }
  
  public boolean isSupported(String arg0, String arg1)
  {
    return false;
  }
  
  public void normalize() {}
  
  public Node removeChild(Node arg0)
    throws DOMException
  {
    return null;
  }
  
  public Node replaceChild(Node arg0, Node arg1)
    throws DOMException
  {
    return null;
  }
  
  public void setNodeValue(String arg0)
    throws DOMException
  {}
  
  public void setPrefix(String arg0)
    throws DOMException
  {}
  
  public void setIdAttribute(String name, boolean isId)
    throws DOMException
  {}
  
  public void setIdAttributeNS(String namespaceURI, String localName, boolean isId)
    throws DOMException
  {}
  
  public void setIdAttributeNode(Attr idAttr, boolean isId)
    throws DOMException
  {}
  
  public short compareDocumentPosition(Node other)
    throws DOMException
  {
    return 0;
  }
  
  public String getBaseURI()
  {
    return null;
  }
  
  public Object getFeature(String feature, String version)
  {
    return null;
  }
  
  public String getTextContent()
    throws DOMException
  {
    return null;
  }
  
  public Object getUserData(String key)
  {
    return null;
  }
  
  public boolean isDefaultNamespace(String namespaceURI)
  {
    return false;
  }
  
  public boolean isEqualNode(Node arg)
  {
    return false;
  }
  
  public boolean isSameNode(Node other)
  {
    return false;
  }
  
  public String lookupNamespaceURI(String prefix)
  {
    return null;
  }
  
  public String lookupPrefix(String namespaceURI)
  {
    return null;
  }
  
  public void setTextContent(String textContent)
    throws DOMException
  {}
  
  public Object getNativeWidget()
  {
    return nativeWidget;
  }
  
  public Object setUserData(String key, Object data, UserDataHandler handler)
  {
    return null;
  }
  
  public TypeInfo getSchemaTypeInfo()
  {
    return null;
  }
  
  public CSSStyleDeclaration getDefaultStyleDeclaration(String pseudoE)
  {
    return (CSSStyleDeclaration)defaultStyleDeclarationMap.get(pseudoE);
  }
  
  public void setDefaultStyleDeclaration(String pseudoE, CSSStyleDeclaration declaration)
  {
    defaultStyleDeclarationMap.put(pseudoE, declaration);
  }
  
  public void onStylesApplied(NodeList nodes) {}
  
  protected Element getElement(Object widget)
  {
    return engine.getElement(widget);
  }
  
  public CSSExtendedProperties getStyle()
  {
    if (style == null) {
      style = new CSSExtendedPropertiesImpl(nativeWidget, engine);
    }
    return style;
  }
  
  public String[] getStaticPseudoInstances()
  {
    if (staticPseudoInstances == null) {
      return EMPTY_STRING;
    }
    return (String[])staticPseudoInstances.toArray(EMPTY_STRING);
  }
  
  public boolean isPseudoInstanceOf(String s)
  {
    if (staticPseudoInstances == null) {
      return false;
    }
    return staticPseudoInstances.contains(s);
  }
  
  public void initialize() {}
  
  public void dispose() {}
  
  protected void doApplyStyles()
  {
    try
    {
      engine.applyStyles(getNativeWidget(), false, true);
    }
    catch (Exception ex)
    {
      engine.handleExceptions(ex);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.ElementAdapter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import org.w3c.css.sac.SelectorList;
import org.w3c.dom.css.CSSRule;

public abstract interface ExtendedCSSRule
  extends CSSRule
{
  public abstract CSSPropertyList getCSSPropertyList();
  
  public abstract SelectorList getSelectorList();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.ExtendedCSSRule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import java.util.List;
import org.w3c.dom.css.DocumentCSS;
import org.w3c.dom.stylesheets.StyleSheet;

public abstract interface ExtendedDocumentCSS
  extends DocumentCSS
{
  public static final Integer SAC_ID_CONDITION = new Integer(
    5);
  public static final Integer SAC_CLASS_CONDITION = new Integer(
    9);
  public static final Integer SAC_PSEUDO_CLASS_CONDITION = new Integer(
    10);
  public static final Integer OTHER_SAC_CONDITIONAL_SELECTOR = new Integer(
    0);
  public static final Integer OTHER_SAC_SELECTOR = new Integer(999);
  
  public abstract void addStyleSheet(StyleSheet paramStyleSheet);
  
  public abstract void removeAllStyleSheets();
  
  public abstract List queryConditionSelector(int paramInt);
  
  public abstract List querySelector(int paramInt1, int paramInt2);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.ExtendedDocumentCSS
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom;

import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.w3c.dom.Element;

public abstract interface IElementProvider
{
  public abstract Element getElement(Object paramObject, CSSEngine paramCSSEngine);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.IElementProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.parsers;

import java.io.IOException;
import org.eclipse.e4.ui.css.core.sac.DocumentHandlerFactory;
import org.w3c.css.sac.ConditionFactory;
import org.w3c.css.sac.InputSource;
import org.w3c.css.sac.SelectorFactory;
import org.w3c.css.sac.SelectorList;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSStyleSheet;
import org.w3c.dom.css.CSSValue;

public abstract interface CSSParser
{
  public abstract CSSStyleSheet parseStyleSheet(InputSource paramInputSource)
    throws IOException;
  
  public abstract void setParentStyleSheet(CSSStyleSheet paramCSSStyleSheet);
  
  public abstract CSSStyleDeclaration parseStyleDeclaration(InputSource paramInputSource)
    throws IOException;
  
  public abstract void parseStyleDeclaration(CSSStyleDeclaration paramCSSStyleDeclaration, InputSource paramInputSource)
    throws IOException;
  
  public abstract CSSValue parsePropertyValue(InputSource paramInputSource)
    throws IOException;
  
  public abstract CSSRule parseRule(InputSource paramInputSource)
    throws IOException;
  
  public abstract SelectorList parseSelectors(InputSource paramInputSource)
    throws IOException;
  
  public abstract void setDocumentHandlerFactory(DocumentHandlerFactory paramDocumentHandlerFactory);
  
  public abstract ConditionFactory getConditionFactory();
  
  public abstract void setConditionFactory(ConditionFactory paramConditionFactory);
  
  public abstract SelectorFactory getSelectorFactory();
  
  public abstract void setSelectorFactory(SelectorFactory paramSelectorFactory);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.parsers.CSSParser
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.parsers;

import org.eclipse.e4.ui.css.core.impl.dom.parsers.CSSParserFactoryImpl;

public abstract class CSSParserFactory
  implements ICSSParserFactory
{
  public static ICSSParserFactory newInstance()
  {
    return new CSSParserFactoryImpl();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.parsers.CSSParserFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.parsers;

public abstract interface ICSSParserFactory
{
  public abstract CSSParser makeCSSParser();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.parsers.ICSSParserFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.w3c.dom.css.CSSValue;
import org.w3c.dom.css.CSSValueList;

public abstract class AbstractCSSPropertyCompositeHandler
  implements ICSSPropertyCompositeHandler
{
  public void applyCSSPropertyComposite(Object element, String property, CSSValue value, String pseudo, CSSEngine engine)
    throws Exception
  {
    if (value.getCssValueType() == 2)
    {
      CSSValueList valueList = (CSSValueList)value;
      int length = valueList.getLength();
      for (int i = 0; i < length; i++)
      {
        CSSValue value2 = valueList.item(i);
        applyCSSProperty(element, value2, pseudo, engine);
      }
    }
    else
    {
      applyCSSProperty(element, value, pseudo, engine);
    }
  }
  
  public abstract void applyCSSProperty(Object paramObject, CSSValue paramCSSValue, String paramString, CSSEngine paramCSSEngine)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.AbstractCSSPropertyCompositeHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

import org.w3c.dom.css.CSSPrimitiveValue;

public abstract interface CSSBorderProperties
{
  public abstract CSSPrimitiveValue getColor();
  
  public abstract void setColor(CSSPrimitiveValue paramCSSPrimitiveValue);
  
  public abstract int getWidth();
  
  public abstract void setWidth(int paramInt);
  
  public abstract String getStyle();
  
  public abstract void setStyle(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.CSSBorderProperties
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.css.CSSPrimitiveValue;

public class Gradient
{
  private final List rgbs = new ArrayList();
  private final List percents = new ArrayList();
  private final List values = new ArrayList();
  private boolean isLinear = true;
  private boolean vertical = true;
  
  public void setLinear(boolean linear)
  {
    isLinear = linear;
  }
  
  public boolean isLinear()
  {
    return isLinear;
  }
  
  public boolean isRadial()
  {
    return !isLinear;
  }
  
  public void addRGB(Object rgb, CSSPrimitiveValue value)
  {
    rgbs.add(rgb);
    values.add(value);
  }
  
  public void addPercent(Integer percent)
  {
    percents.add(percent);
  }
  
  public void setVertical(boolean vertical)
  {
    this.vertical = vertical;
  }
  
  public List getRGBs()
  {
    return rgbs;
  }
  
  public List getValues()
  {
    return values;
  }
  
  public List getPercents()
  {
    return percents;
  }
  
  public boolean getVerticalGradient()
  {
    return vertical;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.Gradient
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

public abstract interface ICSSPropertyCompositeHandler
  extends ICSSPropertyHandler
{
  public abstract boolean isCSSPropertyComposite(String paramString);
  
  public abstract String[] getCSSPropertiesNames(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyCompositeHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.w3c.dom.css.CSSValue;

public abstract interface ICSSPropertyHandler
{
  public abstract boolean applyCSSProperty(Object paramObject, String paramString1, CSSValue paramCSSValue, String paramString2, CSSEngine paramCSSEngine)
    throws Exception;
  
  public abstract String retrieveCSSProperty(Object paramObject, String paramString1, String paramString2, CSSEngine paramCSSEngine)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

import org.eclipse.e4.ui.css.core.engine.CSSEngine;

public abstract interface ICSSPropertyHandler2
{
  public abstract void onAllCSSPropertiesApplyed(Object paramObject, CSSEngine paramCSSEngine)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.css.core.dom.properties;

public abstract interface ICSSPropertyHandler2Delegate
{
 
1 2 3 4 5 6 7 8 9

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd