cssparser-0.9.5

16:35:00.906 INFO  jd.cli.Main - Decompiling cssparser-0.9.5.jar
package com.steadystate.css.dom;

import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleSheet;

public abstract class AbstractCSSRuleImpl
  extends CSSOMObjectImpl
{
  protected CSSStyleSheetImpl parentStyleSheet = null;
  protected CSSRule parentRule = null;
  
  public void setParentStyleSheet(CSSStyleSheetImpl parentStyleSheet)
  {
    this.parentStyleSheet = parentStyleSheet;
  }
  
  public void setParentRule(CSSRule parentRule)
  {
    this.parentRule = parentRule;
  }
  
  public AbstractCSSRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule)
  {
    this.parentStyleSheet = parentStyleSheet;
    this.parentRule = parentRule;
  }
  
  public AbstractCSSRuleImpl() {}
  
  public CSSStyleSheet getParentStyleSheet()
  {
    return parentStyleSheet;
  }
  
  public CSSRule getParentRule()
  {
    return parentRule;
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.AbstractCSSRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import java.io.Serializable;
import org.w3c.css.sac.LexicalUnit;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.Counter;

public class CounterImpl
  implements Counter, Serializable
{
  private static final long serialVersionUID = 7996279151817598904L;
  private String identifier;
  private String listStyle;
  private String separator;
  
  public void setIdentifier(String identifier)
  {
    this.identifier = identifier;
  }
  
  public void setListStyle(String listStyle)
  {
    this.listStyle = listStyle;
  }
  
  public void setSeparator(String separator)
  {
    this.separator = separator;
  }
  
  public CounterImpl(boolean separatorSpecified, LexicalUnit lu)
    throws DOMException
  {
    LexicalUnit next = lu;
    identifier = next.getStringValue();
    next = next.getNextLexicalUnit();
    if (next != null)
    {
      if (next.getLexicalUnitType() != 0) {
        throw new DOMException((short)12, "Counter parameters must be separated by ','.");
      }
      next = next.getNextLexicalUnit();
      if ((separatorSpecified) && (next != null))
      {
        separator = next.getStringValue();
        next = next.getNextLexicalUnit();
        if (next != null)
        {
          if (next.getLexicalUnitType() != 0) {
            throw new DOMException((short)12, "Counter parameters must be separated by ','.");
          }
          next = next.getNextLexicalUnit();
        }
      }
      if (next != null)
      {
        listStyle = next.getStringValue();
        if ((next = next.getNextLexicalUnit()) != null) {
          throw new DOMException((short)12, "Too many parameters for counter function.");
        }
      }
    }
  }
  
  public CounterImpl() {}
  
  public String getIdentifier()
  {
    return identifier;
  }
  
  public String getListStyle()
  {
    return listStyle;
  }
  
  public String getSeparator()
  {
    return separator;
  }
  
  public String toString()
  {
    StringBuilder sb = new StringBuilder();
    if (separator == null) {
      sb.append("counter(");
    } else {
      sb.append("counters(");
    }
    sb.append(identifier);
    if (separator != null) {
      sb.append(", \"").append(separator).append("\"");
    }
    if (listStyle != null) {
      sb.append(", ").append(listStyle);
    }
    sb.append(")");
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CounterImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import java.io.Serializable;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSS2Properties;

public class CSS2PropertiesImpl
  implements CSS2Properties, Serializable
{
  private static final long serialVersionUID = 6769757755750030077L;
  
  public String getAzimuth()
  {
    return null;
  }
  
  public void setAzimuth(String azimuth)
    throws DOMException
  {}
  
  public String getBackground()
  {
    return null;
  }
  
  public void setBackground(String background)
    throws DOMException
  {}
  
  public String getBackgroundAttachment()
  {
    return null;
  }
  
  public void setBackgroundAttachment(String backgroundAttachment)
    throws DOMException
  {}
  
  public String getBackgroundColor()
  {
    return null;
  }
  
  public void setBackgroundColor(String backgroundColor)
    throws DOMException
  {}
  
  public String getBackgroundImage()
  {
    return null;
  }
  
  public void setBackgroundImage(String backgroundImage)
    throws DOMException
  {}
  
  public String getBackgroundPosition()
  {
    return null;
  }
  
  public void setBackgroundPosition(String backgroundPosition)
    throws DOMException
  {}
  
  public String getBackgroundRepeat()
  {
    return null;
  }
  
  public void setBackgroundRepeat(String backgroundRepeat)
    throws DOMException
  {}
  
  public String getBorder()
  {
    return null;
  }
  
  public void setBorder(String border)
    throws DOMException
  {}
  
  public String getBorderCollapse()
  {
    return null;
  }
  
  public void setBorderCollapse(String borderCollapse)
    throws DOMException
  {}
  
  public String getBorderColor()
  {
    return null;
  }
  
  public void setBorderColor(String borderColor)
    throws DOMException
  {}
  
  public String getBorderSpacing()
  {
    return null;
  }
  
  public void setBorderSpacing(String borderSpacing)
    throws DOMException
  {}
  
  public String getBorderStyle()
  {
    return null;
  }
  
  public void setBorderStyle(String borderStyle)
    throws DOMException
  {}
  
  public String getBorderTop()
  {
    return null;
  }
  
  public void setBorderTop(String borderTop)
    throws DOMException
  {}
  
  public String getBorderRight()
  {
    return null;
  }
  
  public void setBorderRight(String borderRight)
    throws DOMException
  {}
  
  public String getBorderBottom()
  {
    return null;
  }
  
  public void setBorderBottom(String borderBottom)
    throws DOMException
  {}
  
  public String getBorderLeft()
  {
    return null;
  }
  
  public void setBorderLeft(String borderLeft)
    throws DOMException
  {}
  
  public String getBorderTopColor()
  {
    return null;
  }
  
  public void setBorderTopColor(String borderTopColor)
    throws DOMException
  {}
  
  public String getBorderRightColor()
  {
    return null;
  }
  
  public void setBorderRightColor(String borderRightColor)
    throws DOMException
  {}
  
  public String getBorderBottomColor()
  {
    return null;
  }
  
  public void setBorderBottomColor(String borderBottomColor)
    throws DOMException
  {}
  
  public String getBorderLeftColor()
  {
    return null;
  }
  
  public void setBorderLeftColor(String borderLeftColor)
    throws DOMException
  {}
  
  public String getBorderTopStyle()
  {
    return null;
  }
  
  public void setBorderTopStyle(String borderTopStyle)
    throws DOMException
  {}
  
  public String getBorderRightStyle()
  {
    return null;
  }
  
  public void setBorderRightStyle(String borderRightStyle)
    throws DOMException
  {}
  
  public String getBorderBottomStyle()
  {
    return null;
  }
  
  public void setBorderBottomStyle(String borderBottomStyle)
    throws DOMException
  {}
  
  public String getBorderLeftStyle()
  {
    return null;
  }
  
  public void setBorderLeftStyle(String borderLeftStyle)
    throws DOMException
  {}
  
  public String getBorderTopWidth()
  {
    return null;
  }
  
  public void setBorderTopWidth(String borderTopWidth)
    throws DOMException
  {}
  
  public String getBorderRightWidth()
  {
    return null;
  }
  
  public void setBorderRightWidth(String borderRightWidth)
    throws DOMException
  {}
  
  public String getBorderBottomWidth()
  {
    return null;
  }
  
  public void setBorderBottomWidth(String borderBottomWidth)
    throws DOMException
  {}
  
  public String getBorderLeftWidth()
  {
    return null;
  }
  
  public void setBorderLeftWidth(String borderLeftWidth)
    throws DOMException
  {}
  
  public String getBorderWidth()
  {
    return null;
  }
  
  public void setBorderWidth(String borderWidth)
    throws DOMException
  {}
  
  public String getBottom()
  {
    return null;
  }
  
  public void setBottom(String bottom)
    throws DOMException
  {}
  
  public String getCaptionSide()
  {
    return null;
  }
  
  public void setCaptionSide(String captionSide)
    throws DOMException
  {}
  
  public String getClear()
  {
    return null;
  }
  
  public void setClear(String clear)
    throws DOMException
  {}
  
  public String getClip()
  {
    return null;
  }
  
  public void setClip(String clip)
    throws DOMException
  {}
  
  public String getColor()
  {
    return null;
  }
  
  public void setColor(String color)
    throws DOMException
  {}
  
  public String getContent()
  {
    return null;
  }
  
  public void setContent(String content)
    throws DOMException
  {}
  
  public String getCounterIncrement()
  {
    return null;
  }
  
  public void setCounterIncrement(String counterIncrement)
    throws DOMException
  {}
  
  public String getCounterReset()
  {
    return null;
  }
  
  public void setCounterReset(String counterReset)
    throws DOMException
  {}
  
  public String getCue()
  {
    return null;
  }
  
  public void setCue(String cue)
    throws DOMException
  {}
  
  public String getCueAfter()
  {
    return null;
  }
  
  public void setCueAfter(String cueAfter)
    throws DOMException
  {}
  
  public String getCueBefore()
  {
    return null;
  }
  
  public void setCueBefore(String cueBefore)
    throws DOMException
  {}
  
  public String getCursor()
  {
    return null;
  }
  
  public void setCursor(String cursor)
    throws DOMException
  {}
  
  public String getDirection()
  {
    return null;
  }
  
  public void setDirection(String direction)
    throws DOMException
  {}
  
  public String getDisplay()
  {
    return null;
  }
  
  public void setDisplay(String display)
    throws DOMException
  {}
  
  public String getElevation()
  {
    return null;
  }
  
  public void setElevation(String elevation)
    throws DOMException
  {}
  
  public String getEmptyCells()
  {
    return null;
  }
  
  public void setEmptyCells(String emptyCells)
    throws DOMException
  {}
  
  public String getCssFloat()
  {
    return null;
  }
  
  public void setCssFloat(String cssFloat)
    throws DOMException
  {}
  
  public String getFont()
  {
    return null;
  }
  
  public void setFont(String font)
    throws DOMException
  {}
  
  public String getFontFamily()
  {
    return null;
  }
  
  public void setFontFamily(String fontFamily)
    throws DOMException
  {}
  
  public String getFontSize()
  {
    return null;
  }
  
  public void setFontSize(String fontSize)
    throws DOMException
  {}
  
  public String getFontSizeAdjust()
  {
    return null;
  }
  
  public void setFontSizeAdjust(String fontSizeAdjust)
    throws DOMException
  {}
  
  public String getFontStretch()
  {
    return null;
  }
  
  public void setFontStretch(String fontStretch)
    throws DOMException
  {}
  
  public String getFontStyle()
  {
    return null;
  }
  
  public void setFontStyle(String fontStyle)
    throws DOMException
  {}
  
  public String getFontVariant()
  {
    return null;
  }
  
  public void setFontVariant(String fontVariant)
    throws DOMException
  {}
  
  public String getFontWeight()
  {
    return null;
  }
  
  public void setFontWeight(String fontWeight)
    throws DOMException
  {}
  
  public String getHeight()
  {
    return null;
  }
  
  public void setHeight(String height)
    throws DOMException
  {}
  
  public String getLeft()
  {
    return null;
  }
  
  public void setLeft(String left)
    throws DOMException
  {}
  
  public String getLetterSpacing()
  {
    return null;
  }
  
  public void setLetterSpacing(String letterSpacing)
    throws DOMException
  {}
  
  public String getLineHeight()
  {
    return null;
  }
  
  public void setLineHeight(String lineHeight)
    throws DOMException
  {}
  
  public String getListStyle()
  {
    return null;
  }
  
  public void setListStyle(String listStyle)
    throws DOMException
  {}
  
  public String getListStyleImage()
  {
    return null;
  }
  
  public void setListStyleImage(String listStyleImage)
    throws DOMException
  {}
  
  public String getListStylePosition()
  {
    return null;
  }
  
  public void setListStylePosition(String listStylePosition)
    throws DOMException
  {}
  
  public String getListStyleType()
  {
    return null;
  }
  
  public void setListStyleType(String listStyleType)
    throws DOMException
  {}
  
  public String getMargin()
  {
    return null;
  }
  
  public void setMargin(String margin)
    throws DOMException
  {}
  
  public String getMarginTop()
  {
    return null;
  }
  
  public void setMarginTop(String marginTop)
    throws DOMException
  {}
  
  public String getMarginRight()
  {
    return null;
  }
  
  public void setMarginRight(String marginRight)
    throws DOMException
  {}
  
  public String getMarginBottom()
  {
    return null;
  }
  
  public void setMarginBottom(String marginBottom)
    throws DOMException
  {}
  
  public String getMarginLeft()
  {
    return null;
  }
  
  public void setMarginLeft(String marginLeft)
    throws DOMException
  {}
  
  public String getMarkerOffset()
  {
    return null;
  }
  
  public void setMarkerOffset(String markerOffset)
    throws DOMException
  {}
  
  public String getMarks()
  {
    return null;
  }
  
  public void setMarks(String marks)
    throws DOMException
  {}
  
  public String getMaxHeight()
  {
    return null;
  }
  
  public void setMaxHeight(String maxHeight)
    throws DOMException
  {}
  
  public String getMaxWidth()
  {
    return null;
  }
  
  public void setMaxWidth(String maxWidth)
    throws DOMException
  {}
  
  public String getMinHeight()
  {
    return null;
  }
  
  public void setMinHeight(String minHeight)
    throws DOMException
  {}
  
  public String getMinWidth()
  {
    return null;
  }
  
  public void setMinWidth(String minWidth)
    throws DOMException
  {}
  
  public String getOrphans()
  {
    return null;
  }
  
  public void setOrphans(String orphans)
    throws DOMException
  {}
  
  public String getOutline()
  {
    return null;
  }
  
  public void setOutline(String outline)
    throws DOMException
  {}
  
  public String getOutlineColor()
  {
    return null;
  }
  
  public void setOutlineColor(String outlineColor)
    throws DOMException
  {}
  
  public String getOutlineStyle()
  {
    return null;
  }
  
  public void setOutlineStyle(String outlineStyle)
    throws DOMException
  {}
  
  public String getOutlineWidth()
  {
    return null;
  }
  
  public void setOutlineWidth(String outlineWidth)
    throws DOMException
  {}
  
  public String getOverflow()
  {
    return null;
  }
  
  public void setOverflow(String overflow)
    throws DOMException
  {}
  
  public String getPadding()
  {
    return null;
  }
  
  public void setPadding(String padding)
    throws DOMException
  {}
  
  public String getPaddingTop()
  {
    return null;
  }
  
  public void setPaddingTop(String paddingTop)
    throws DOMException
  {}
  
  public String getPaddingRight()
  {
    return null;
  }
  
  public void setPaddingRight(String paddingRight)
    throws DOMException
  {}
  
  public String getPaddingBottom()
  {
    return null;
  }
  
  public void setPaddingBottom(String paddingBottom)
    throws DOMException
  {}
  
  public String getPaddingLeft()
  {
    return null;
  }
  
  public void setPaddingLeft(String paddingLeft)
    throws DOMException
  {}
  
  public String getPage()
  {
    return null;
  }
  
  public void setPage(String page)
    throws DOMException
  {}
  
  public String getPageBreakAfter()
  {
    return null;
  }
  
  public void setPageBreakAfter(String pageBreakAfter)
    throws DOMException
  {}
  
  public String getPageBreakBefore()
  {
    return null;
  }
  
  public void setPageBreakBefore(String pageBreakBefore)
    throws DOMException
  {}
  
  public String getPageBreakInside()
  {
    return null;
  }
  
  public void setPageBreakInside(String pageBreakInside)
    throws DOMException
  {}
  
  public String getPause()
  {
    return null;
  }
  
  public void setPause(String pause)
    throws DOMException
  {}
  
  public String getPauseAfter()
  {
    return null;
  }
  
  public void setPauseAfter(String pauseAfter)
    throws DOMException
  {}
  
  public String getPauseBefore()
  {
    return null;
  }
  
  public void setPauseBefore(String pauseBefore)
    throws DOMException
  {}
  
  public String getPitch()
  {
    return null;
  }
  
  public void setPitch(String pitch)
    throws DOMException
  {}
  
  public String getPitchRange()
  {
    return null;
  }
  
  public void setPitchRange(String pitchRange)
    throws DOMException
  {}
  
  public String getPlayDuring()
  {
    return null;
  }
  
  public void setPlayDuring(String playDuring)
    throws DOMException
  {}
  
  public String getPosition()
  {
    return null;
  }
  
  public void setPosition(String position)
    throws DOMException
  {}
  
  public String getQuotes()
  {
    return null;
  }
  
  public void setQuotes(String quotes)
    throws DOMException
  {}
  
  public String getRichness()
  {
    return null;
  }
  
  public void setRichness(String richness)
    throws DOMException
  {}
  
  public String getRight()
  {
    return null;
  }
  
  public void setRight(String right)
    throws DOMException
  {}
  
  public String getSize()
  {
    return null;
  }
  
  public void setSize(String size)
    throws DOMException
  {}
  
  public String getSpeak()
  {
    return null;
  }
  
  public void setSpeak(String speak)
    throws DOMException
  {}
  
  public String getSpeakHeader()
  {
    return null;
  }
  
  public void setSpeakHeader(String speakHeader)
    throws DOMException
  {}
  
  public String getSpeakNumeral()
  {
    return null;
  }
  
  public void setSpeakNumeral(String speakNumeral)
    throws DOMException
  {}
  
  public String getSpeakPunctuation()
  {
    return null;
  }
  
  public void setSpeakPunctuation(String speakPunctuation)
    throws DOMException
  {}
  
  public String getSpeechRate()
  {
    return null;
  }
  
  public void setSpeechRate(String speechRate)
    throws DOMException
  {}
  
  public String getStress()
  {
    return null;
  }
  
  public void setStress(String stress)
    throws DOMException
  {}
  
  public String getTableLayout()
  {
    return null;
  }
  
  public void setTableLayout(String tableLayout)
    throws DOMException
  {}
  
  public String getTextAlign()
  {
    return null;
  }
  
  public void setTextAlign(String textAlign)
    throws DOMException
  {}
  
  public String getTextDecoration()
  {
    return null;
  }
  
  public void setTextDecoration(String textDecoration)
    throws DOMException
  {}
  
  public String getTextIndent()
  {
    return null;
  }
  
  public void setTextIndent(String textIndent)
    throws DOMException
  {}
  
  public String getTextShadow()
  {
    return null;
  }
  
  public void setTextShadow(String textShadow)
    throws DOMException
  {}
  
  public String getTextTransform()
  {
    return null;
  }
  
  public void setTextTransform(String textTransform)
    throws DOMException
  {}
  
  public String getTop()
  {
    return null;
  }
  
  public void setTop(String top)
    throws DOMException
  {}
  
  public String getUnicodeBidi()
  {
    return null;
  }
  
  public void setUnicodeBidi(String unicodeBidi)
    throws DOMException
  {}
  
  public String getVerticalAlign()
  {
    return null;
  }
  
  public void setVerticalAlign(String verticalAlign)
    throws DOMException
  {}
  
  public String getVisibility()
  {
    return null;
  }
  
  public void setVisibility(String visibility)
    throws DOMException
  {}
  
  public String getVoiceFamily()
  {
    return null;
  }
  
  public void setVoiceFamily(String voiceFamily)
    throws DOMException
  {}
  
  public String getVolume()
  {
    return null;
  }
  
  public void setVolume(String volume)
    throws DOMException
  {}
  
  public String getWhiteSpace()
  {
    return null;
  }
  
  public void setWhiteSpace(String whiteSpace)
    throws DOMException
  {}
  
  public String getWidows()
  {
    return null;
  }
  
  public void setWidows(String widows)
    throws DOMException
  {}
  
  public String getWidth()
  {
    return null;
  }
  
  public void setWidth(String width)
    throws DOMException
  {}
  
  public String getWordSpacing()
  {
    return null;
  }
  
  public void setWordSpacing(String wordSpacing)
    throws DOMException
  {}
  
  public String getZIndex()
  {
    return null;
  }
  
  public void setZIndex(String zIndex)
    throws DOMException
  {}
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSS2PropertiesImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSCharsetRule;
import org.w3c.dom.css.CSSRule;

public class CSSCharsetRuleImpl
  extends AbstractCSSRuleImpl
  implements CSSCharsetRule, Serializable
{
  private static final long serialVersionUID = -2472209213089007127L;
  String encoding = null;
  
  public CSSCharsetRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule, String encoding)
  {
    super(parentStyleSheet, parentRule);
    this.encoding = encoding;
  }
  
  public CSSCharsetRuleImpl() {}
  
  public short getType()
  {
    return 2;
  }
  
  public String getCssText()
  {
    return "@charset \"" + getEncoding() + "\";";
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      CSSRule r = parser.parseRule(is);
      if (r.getType() == 2) {
        encoding = encoding;
      } else {
        throw new DOMExceptionImpl((short)13, 5);
      }
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public String getEncoding()
  {
    return encoding;
  }
  
  public void setEncoding(String encoding)
    throws DOMException
  {
    this.encoding = encoding;
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSCharsetRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSFontFaceRule;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;

public class CSSFontFaceRuleImpl
  extends AbstractCSSRuleImpl
  implements CSSFontFaceRule, Serializable
{
  private static final long serialVersionUID = -3604191834588759088L;
  private CSSStyleDeclarationImpl style = null;
  
  public CSSFontFaceRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule)
  {
    super(parentStyleSheet, parentRule);
  }
  
  public CSSFontFaceRuleImpl() {}
  
  public short getType()
  {
    return 5;
  }
  
  public String getCssText()
  {
    return "@font-face {" + getStyle().getCssText() + "}";
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      CSSRule r = parser.parseRule(is);
      if (r.getType() == 5) {
        style = style;
      } else {
        throw new DOMExceptionImpl((short)13, 8);
      }
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public CSSStyleDeclaration getStyle()
  {
    return style;
  }
  
  public void setStyle(CSSStyleDeclarationImpl style)
  {
    this.style = style;
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSFontFaceRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSImportRule;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleSheet;
import org.w3c.dom.stylesheets.MediaList;

public class CSSImportRuleImpl
  extends AbstractCSSRuleImpl
  implements CSSImportRule, Serializable
{
  private static final long serialVersionUID = 7807829682009179339L;
  String href = null;
  MediaList media = null;
  
  public void setHref(String href)
  {
    this.href = href;
  }
  
  public void setMedia(MediaList media)
  {
    this.media = media;
  }
  
  public CSSImportRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule, String href, MediaList media)
  {
    super(parentStyleSheet, parentRule);
    this.href = href;
    this.media = media;
  }
  
  public CSSImportRuleImpl() {}
  
  public short getType()
  {
    return 3;
  }
  
  public String getCssText()
  {
    StringBuilder sb = new StringBuilder();
    sb.append("@import url(").append(getHref()).append(")");
    if (getMedia().getLength() > 0) {
      sb.append(" ").append(getMedia().toString());
    }
    sb.append(";");
    return sb.toString();
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      CSSRule r = parser.parseRule(is);
      if (r.getType() == 3)
      {
        href = href;
        media = media;
      }
      else
      {
        throw new DOMExceptionImpl((short)13, 6);
      }
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public String getHref()
  {
    return href;
  }
  
  public MediaList getMedia()
  {
    return media;
  }
  
  public CSSStyleSheet getStyleSheet()
  {
    return null;
  }
  
  public String toString()
  {
    return getCssText();
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSImportRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSMediaRule;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSRuleList;
import org.w3c.dom.stylesheets.MediaList;

public class CSSMediaRuleImpl
  extends AbstractCSSRuleImpl
  implements CSSMediaRule, Serializable
{
  private static final long serialVersionUID = 6603734096445214651L;
  private MediaList media = null;
  private CSSRuleList cssRules = null;
  
  public void setMedia(MediaList media)
  {
    this.media = media;
  }
  
  public void setCssRules(CSSRuleList cssRules)
  {
    this.cssRules = cssRules;
  }
  
  public CSSMediaRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule, MediaList media)
  {
    super(parentStyleSheet, parentRule);
    this.media = media;
  }
  
  public CSSMediaRuleImpl() {}
  
  public short getType()
  {
    return 4;
  }
  
  public String getCssText()
  {
    StringBuffer sb = new StringBuffer("@media ");
    sb.append(getMedia().toString()).append(" {");
    for (int i = 0; i < getCssRules().getLength(); i++)
    {
      CSSRule rule = getCssRules().item(i);
      sb.append(rule.getCssText()).append(" ");
    }
    sb.append("}");
    return sb.toString();
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      CSSRule r = parser.parseRule(is);
      if (r.getType() == 4)
      {
        media = media;
        cssRules = cssRules;
      }
      else
      {
        throw new DOMExceptionImpl((short)13, 7);
      }
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public MediaList getMedia()
  {
    return media;
  }
  
  public CSSRuleList getCssRules()
  {
    if (cssRules == null) {
      cssRules = new CSSRuleListImpl();
    }
    return cssRules;
  }
  
  public int insertRule(String rule, int index)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(rule));
      CSSOMParser parser = new CSSOMParser();
      parser.setParentStyleSheet(parentStyleSheet);
      
      CSSRule r = parser.parseRule(is);
      
      ((CSSRuleListImpl)getCssRules()).insert(r, index);
    }
    catch (ArrayIndexOutOfBoundsException e)
    {
      throw new DOMExceptionImpl((short)1, 1, e.getMessage());
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    return index;
  }
  
  public void deleteRule(int index)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      ((CSSRuleListImpl)getCssRules()).delete(index);
    }
    catch (ArrayIndexOutOfBoundsException e)
    {
      throw new DOMExceptionImpl((short)1, 1, e.getMessage());
    }
  }
  
  public void setRuleList(CSSRuleListImpl rules)
  {
    cssRules = rules;
  }
  
  public String toString()
  {
    return getCssText();
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSMediaRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

public abstract interface CSSOMObject
{
  public abstract Object getUserData(String paramString);
  
  public abstract Object setUserData(String paramString, Object paramObject);
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSOMObject
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import java.util.Hashtable;
import java.util.Map;

public class CSSOMObjectImpl
  implements CSSOMObject
{
  private Map userDataMap;
  
  public Map getUserDataMap()
  {
    if (userDataMap == null) {
      userDataMap = new Hashtable();
    }
    return userDataMap;
  }
  
  public void setUserDataMap(Map userDataMap)
  {
    this.userDataMap = userDataMap;
  }
  
  public Object getUserData(String key)
  {
    return getUserDataMap().get(key);
  }
  
  public Object setUserData(String key, Object data)
  {
    return getUserDataMap().put(key, data);
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSOMObjectImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSPageRule;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;

public class CSSPageRuleImpl
  extends AbstractCSSRuleImpl
  implements CSSPageRule, Serializable
{
  private static final long serialVersionUID = -6007519872104320812L;
  private String ident = null;
  private String pseudoPage = null;
  private CSSStyleDeclaration style = null;
  
  public CSSPageRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule, String ident, String pseudoPage)
  {
    super(parentStyleSheet, parentRule);
    this.ident = ident;
    this.pseudoPage = pseudoPage;
  }
  
  public CSSPageRuleImpl() {}
  
  public short getType()
  {
    return 6;
  }
  
  public String getCssText()
  {
    String sel = getSelectorText();
    return "@page {" + sel + (sel.length() > 0 ? " " : "") + getStyle().getCssText() + "}";
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    if ((parentStyleSheet != null) && (parentStyleSheet.isReadOnly())) {
      throw new DOMExceptionImpl((short)7, 2);
    }
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      CSSRule r = parser.parseRule(is);
      if (r.getType() == 6)
      {
        ident = ident;
        pseudoPage = pseudoPage;
        style = style;
      }
      else
      {
        throw new DOMExceptionImpl((short)13, 9);
      }
    }
    catch (CSSException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
    catch (IOException e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public String getSelectorText()
  {
    return (ident != null ? ident : "") + (pseudoPage != null ? ":" + pseudoPage : "");
  }
  
  public void setSelectorText(String selectorText)
    throws DOMException
  {}
  
  public CSSStyleDeclaration getStyle()
  {
    return style;
  }
  
  public void setIdent(String ident)
  {
    this.ident = ident;
  }
  
  public void setPseudoPage(String pseudoPage)
  {
    this.pseudoPage = pseudoPage;
  }
  
  public void setStyle(CSSStyleDeclarationImpl style)
  {
    this.style = style;
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSPageRuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSRuleList;

public class CSSRuleListImpl
  implements CSSRuleList, Serializable
{
  private static final long serialVersionUID = -1269068897476453290L;
  private List<CSSRule> rules = null;
  
  public List<CSSRule> getRules()
  {
    if (rules == null) {
      rules = new ArrayList();
    }
    return rules;
  }
  
  public void setRules(List<CSSRule> rules)
  {
    this.rules = rules;
  }
  
  public int getLength()
  {
    return getRules().size();
  }
  
  public CSSRule item(int index)
  {
    return (CSSRule)getRules().get(index);
  }
  
  public void add(CSSRule rule)
  {
    getRules().add(rule);
  }
  
  public void insert(CSSRule rule, int index)
  {
    getRules().add(index, rule);
  }
  
  public void delete(int index)
  {
    getRules().remove(index);
  }
  
  public String toString()
  {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < getLength(); i++) {
      sb.append(item(i).toString()).append("\r\n");
    }
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     com.steadystate.css.dom.CSSRuleListImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.steadystate.css.dom;

import com.steadystate.css.parser.CSSOMParser;
import java.io.Serializable;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSValue;

public class CSSStyleDeclarationImpl
  implements CSSStyleDeclaration, Serializable
{
  private static final long serialVersionUID = -2373755821317100189L;
  private CSSRule parentRule;
  private List<Property> properties = new ArrayList();
  
  public void setParentRule(CSSRule parentRule)
  {
    this.parentRule = parentRule;
  }
  
  public List<Property> getProperties()
  {
    return properties;
  }
  
  public void setProperties(List<Property> properties)
  {
    this.properties = properties;
  }
  
  public CSSStyleDeclarationImpl(CSSRule parentRule)
  {
    this.parentRule = parentRule;
  }
  
  public CSSStyleDeclarationImpl() {}
  
  public String getCssText()
  {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < properties.size(); i++)
    {
      Property p = (Property)properties.get(i);
      if (p != null) {
        sb.append(p.toString());
      }
      if (i < properties.size() - 1) {
        sb.append("; ");
      }
    }
    return sb.toString();
  }
  
  public void setCssText(String cssText)
    throws DOMException
  {
    try
    {
      InputSource is = new InputSource(new StringReader(cssText));
      CSSOMParser parser = new CSSOMParser();
      properties.clear();
      parser.parseStyleDeclaration(this, is);
    }
    catch (Exception e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public String getPropertyValue(String propertyName)
  {
    Property p = getPropertyDeclaration(propertyName);
    return p != null ? p.getValue().toString() : "";
  }
  
  public CSSValue getPropertyCSSValue(String propertyName)
  {
    Property p = getPropertyDeclaration(propertyName);
    return p != null ? p.getValue() : null;
  }
  
  public String removeProperty(String propertyName)
    throws DOMException
  {
    for (int i = 0; i < properties.size(); i++)
    {
      Property p = (Property)properties.get(i);
      if (p.getName().equalsIgnoreCase(propertyName))
      {
        properties.remove(i);
        return p.getValue().toString();
      }
    }
    return "";
  }
  
  public String getPropertyPriority(String propertyName)
  {
    Property p = getPropertyDeclaration(propertyName);
    if (p != null) {
      return p.isImportant() ? "important" : "";
    }
    return "";
  }
  
  public void setProperty(String propertyName, String value, String priority)
    throws DOMException
  {
    try
    {
      InputSource is = new InputSource(new StringReader(value));
      CSSOMParser parser = new CSSOMParser();
      CSSValue expr = parser.parsePropertyValue(is);
      Property p = getPropertyDeclaration(propertyName);
      boolean important = priority != null ? priority.equalsIgnoreCase("important") : false;
      if (p == null)
      {
        p = new Property(propertyName, expr, important);
        addProperty(p);
      }
      else
      {
        p.setValue(expr);
        p.setImportant(important);
      }
    }
    catch (Exception e)
    {
      throw new DOMExceptionImpl((short)12, 0, e.getMessage());
    }
  }
  
  public int getLength()
  {
    return properties.size();
  }
  
  public String item(int index)
  {
    Property p = (Property)properties.get(index);
    return p != null ? p.getName() : "";
  }
  
  public CSSRule g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

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