de.infinityloop.util.style
Class CSSPropertyFilter

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by de.infinityloop.util.style.CSSPropertyFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class CSSPropertyFilter
extends java.util.Hashtable

A simple filter description object used by the RTFStyle to CSS renderer for easily exclusing some properties from being rendered (or including only specific properties for rendering).

Version:
1.0
Author:
Christian Roth
See Also:
Serialized Form

Field Summary
static int kExcludeListed
           
static int kIncludeListed
           
 
Constructor Summary
CSSPropertyFilter(int type, int[] properties)
          Constructor, takes CSS property IDs as int.
CSSPropertyFilter(int type, java.lang.String[] properties)
          Constructor, takes named properties.
 
Method Summary
 java.lang.String filter(int propId)
          The filter method.
 java.lang.String filter(java.lang.String propName)
          The filter method.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

kIncludeListed

public static final int kIncludeListed
See Also:
Constant Field Values

kExcludeListed

public static final int kExcludeListed
See Also:
Constant Field Values
Constructor Detail

CSSPropertyFilter

public CSSPropertyFilter(int type,
                         java.lang.String[] properties)
Constructor, takes named properties.

Parameters:
type - the filter type, either kIncludeListed to include only specified properties or kExcludeListed to accept all properties except for the ones listed
properties - the named properties as String array
See Also:
CSSProperties.translateToName(int)

CSSPropertyFilter

public CSSPropertyFilter(int type,
                         int[] properties)
Constructor, takes CSS property IDs as int.

Parameters:
type - the filter type, either kIncludeListed to include only specified properties or kExcludeListed to accept all properties except for the ones listed
properties - the named properties as an int array
See Also:
CSSProperties.translateToId(java.lang.String)
Method Detail

filter

public java.lang.String filter(java.lang.String propName)
The filter method.

Parameters:
propName - the property name to test
Returns:
the passed property when it passes the filter conditions, returns null if that property is filtered by the filter.

filter

public java.lang.String filter(int propId)
The filter method.

Parameters:
propId - the property Id to test
Returns:
the property name when it passes the filter conditions, returns null if that property is filtered by the filter.