public interface StyleSpecs
This interface is of course implemented by a StyleSheet but also by custom extension code wishing to specify intrinsic styles to the StyledViewFactory (that is, a kind of partial built-in style sheet for a class of documents). This is for example the case for XHTML (HTML 4) tables and for DocBook (CALS) tables.
Modifier and Type | Field and Description |
---|---|
static int |
AFTER_ELEMENT
Index of the StyleSpec of the :after pseudo-element in the
StyleSpec array.
|
static int |
AFTER_ELEMENT_MASK
Bit set to indicate that a StyleSpec has been found for the
:after pseudo-element.
|
static int |
BEFORE_ELEMENT
Index of the StyleSpec of the :before pseudo-element in the
StyleSpec array.
|
static int |
BEFORE_ELEMENT_MASK
Bit set to indicate that a StyleSpec has been found for the
:before pseudo-element.
|
static int |
ELEMENT
Index of the StyleSpec of the element in the StyleSpec array.
|
static int |
ELEMENT_MASK
Bit set to indicate that a StyleSpec has been found for the element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
findStyleSpec(Comment comment,
StyleSpec spec)
Find a StyleSpec matching the specified comment.
|
int |
findStyleSpec(Element element,
StyleSpec[] specs)
Find up to 3 StyleSpecs matching the specified element and its
:before and :after pseudo-elements if any.
|
boolean |
findStyleSpec(ProcessingInstruction pi,
StyleSpec spec)
Find a StyleSpec matching the specified processing-instruction.
|
static final int ELEMENT
static final int BEFORE_ELEMENT
static final int AFTER_ELEMENT
static final int ELEMENT_MASK
static final int BEFORE_ELEMENT_MASK
static final int AFTER_ELEMENT_MASK
int findStyleSpec(Element element, StyleSpec[] specs)
element
- element for which StyleSpecs are to be foundspecs
- array of 3 StyleSpecs created by the caller. This method
directly modifies the 3 StyleSpecs contained in this array. For
example, this method adds to
specs[
BEFORE_ELEMENT
]
all the property values contained in the StyleSpec matching the
:before pseudo-element.ELEMENT_MASK
, BEFORE_ELEMENT_MASK
,
AFTER_ELEMENT_MASK
, specifying which StyleSpecs have been
foundboolean findStyleSpec(Comment comment, StyleSpec spec)
comment
- comment for which a StyleSpec is to be foundspec
- StyleSpec created by the caller which is modified by this
method. This method adds to spec all the property values
contained in the StyleSpec matching comment.true
if StyleSpec has been found;
false
otherwiseboolean findStyleSpec(ProcessingInstruction pi, StyleSpec spec)
pi
- processing-instruction for which a StyleSpec is to be foundspec
- StyleSpec created by the caller which is modified by this
method. This method adds to spec all the property values
contained in the StyleSpec matching pi.true
if StyleSpec has been found;
false
otherwise