com.itextpdf.tool.xml.css
Class CssFileImpl

java.lang.Object
  extended by com.itextpdf.tool.xml.css.CssFileImpl
All Implemented Interfaces:
CssFile

public class CssFileImpl
extends Object
implements CssFile

Implementation of CssFile, the CSS is stored in a map.

Author:
redlab_b

Constructor Summary
CssFileImpl()
          Constructs a new CssFileImpl.
 
Method Summary
 void add(String selector, Map<String,String> props)
          Add CSS to this CssFile.
 Map<String,String> get(String selector)
          Return CSS for the given selector.
 boolean isPersistent()
           
 void isPersistent(boolean isPeristent)
          Indicates that this file should be kept.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssFileImpl

public CssFileImpl()
Constructs a new CssFileImpl.

Method Detail

add

public void add(String selector,
                Map<String,String> props)
Description copied from interface: CssFile
Add CSS to this CssFile.

Specified by:
add in interface CssFile
Parameters:
selector - the CSS selector
props - the properties for the given selector

get

public Map<String,String> get(String selector)
Description copied from interface: CssFile
Return CSS for the given selector.

Specified by:
get in interface CssFile
Parameters:
selector - the selector to look for
Returns:
a map with all CSS properties for this selector or an empty map if none found.

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface CssFile
Returns:
if this CSS file should never be thrown away. Used in CSSFilesImpl#clear

isPersistent

public void isPersistent(boolean isPeristent)
Indicates that this file should be kept.

Specified by:
isPersistent in interface CssFile
Parameters:
isPeristent - set to true if this file should be kept.


Copyright © 2012. All Rights Reserved.