public class SinkUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
HR_ATTRIBUTES |
private static java.lang.String[] |
IMG_ATTRIBUTES |
private static java.lang.String[] |
LINK_ATTRIBUTES |
static java.lang.String[] |
SINK_BASE_ATTRIBUTES
The set of base attributes.
|
static java.lang.String[] |
SINK_BR_ATTRIBUTES
The attributes that are supported for the br tag.
|
static java.lang.String[] |
SINK_HR_ATTRIBUTES
The attributes that are supported for the <hr> tag.
|
static java.lang.String[] |
SINK_IMG_ATTRIBUTES
The attributes that are supported for the <img> tag.
|
static java.lang.String[] |
SINK_LINK_ATTRIBUTES
The attributes that are supported for the <a> tag.
|
static java.lang.String[] |
SINK_SECTION_ATTRIBUTES
The attributes that are supported for the section tags, like <p>, <h2>, <div>.
|
static java.lang.String[] |
SINK_TABLE_ATTRIBUTES
The attributes that are supported for the <table> tag.
|
static java.lang.String[] |
SINK_TD_ATTRIBUTES
The attributes that are supported for the <td> and <th> tags.
|
static java.lang.String[] |
SINK_TR_ATTRIBUTES
The attributes that are supported for the <tr> tag.
|
static java.lang.String[] |
SINK_VERBATIM_ATTRIBUTES
The attributes that are supported for the <div> and <pre> tags.
|
private static java.lang.String[] |
TABLE_ATTRIBUTES |
private static java.lang.String[] |
TABLE_CELL_ATTRIBUTES |
Modifier | Constructor and Description |
---|---|
private |
SinkUtils()
Do not instantiate.
|
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
asCssString(javax.swing.text.AttributeSet att) |
static javax.swing.text.MutableAttributeSet |
filterAttributes(javax.swing.text.AttributeSet attributes,
java.lang.String[] valids)
Filters the given AttributeSet.
|
static java.lang.String |
getAttributeString(javax.swing.text.AttributeSet att)
Utility method to get an AttributeSet as a String.
|
private static java.lang.String[] |
join(java.lang.String[] a,
java.lang.String[] b) |
public static final java.lang.String[] SINK_BASE_ATTRIBUTES
public static final java.lang.String[] SINK_BR_ATTRIBUTES
public static final java.lang.String[] SINK_IMG_ATTRIBUTES
public static final java.lang.String[] SINK_SECTION_ATTRIBUTES
public static final java.lang.String[] SINK_VERBATIM_ATTRIBUTES
public static final java.lang.String[] SINK_HR_ATTRIBUTES
public static final java.lang.String[] SINK_LINK_ATTRIBUTES
public static final java.lang.String[] SINK_TABLE_ATTRIBUTES
public static final java.lang.String[] SINK_TD_ATTRIBUTES
public static final java.lang.String[] SINK_TR_ATTRIBUTES
private static final java.lang.String[] IMG_ATTRIBUTES
private static final java.lang.String[] HR_ATTRIBUTES
private static final java.lang.String[] LINK_ATTRIBUTES
private static final java.lang.String[] TABLE_ATTRIBUTES
private static final java.lang.String[] TABLE_CELL_ATTRIBUTES
private static java.lang.String[] join(java.lang.String[] a, java.lang.String[] b)
public static java.lang.String getAttributeString(javax.swing.text.AttributeSet att)
SinkEventAttributes.STYLE
.
All other keys and values are written as Strings.att
- The AttributeSet. May be null, in which case an empty String is returned.private static java.lang.String asCssString(javax.swing.text.AttributeSet att)
public static javax.swing.text.MutableAttributeSet filterAttributes(javax.swing.text.AttributeSet attributes, java.lang.String[] valids)
attributes
- The AttributeSet to filter. The String values of Attribute names
are compared to the elements of the valids array.valids
- a sorted array of attribute names that are to be kept in the resulting AttributeSet.
Note: a binary search is employed, so the array has to be sorted for correct results.