com.inet.html
Interface CssDocument

All Superinterfaces:
javax.swing.text.Document
All Known Implementing Classes:
InetHtmlDocument

public interface CssDocument
extends javax.swing.text.Document

View support extension interface.
This Interface has to be implemented by any model, which should be displayed by the HTML views.


Field Summary
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Method Summary
 javax.swing.text.AbstractDocument.BranchElement createAnnonymousElement(javax.swing.text.Element parent)
          Creates a implied paragraph element.
 int getRevision()
          The revision increases with every change, that causes an update event.
 int getSiteCount()
          The site counter is increased every time the model is cleared.
 StyleResolver getStyleResolver()
          Returns the style resolver, which is bound to this document to resolve the CSS styles
 boolean readStylesOfVirtualTags()
          This flag modifies the the behavior of the default StyleResolver.
 
Methods inherited from interface javax.swing.text.Document
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render
 

Method Detail

createAnnonymousElement

javax.swing.text.AbstractDocument.BranchElement createAnnonymousElement(javax.swing.text.Element parent)
Creates a implied paragraph element.
NOTE: Does not change the document model and doesn't need a write lock

Parameters:
parent - the parent for the generated element
Returns:
a new anonymous branch element

getSiteCount

int getSiteCount()
The site counter is increased every time the model is cleared. This happens, if a new page is set or the complete content has been replaced.
Required, if model changes and layout/painting will run in different threads!

Returns:
the current site number

getRevision

int getRevision()
The revision increases with every change, that causes an update event.
Required, if model changes and layout/painting will run in different threads!

Returns:
the current revision number

getStyleResolver

StyleResolver getStyleResolver()
Returns the style resolver, which is bound to this document to resolve the CSS styles

Returns:
the style resolver of this document

readStylesOfVirtualTags

boolean readStylesOfVirtualTags()
This flag modifies the the behavior of the default StyleResolver.
If it returns true, the StyleResolver will read the styles of the virtual elements CONTENT and IMPLIED as well. If false is returned, the styles of these elements will be ignored and it's parents will be searched.
NOTE: This is important for document structures, which set the styles by the tree structure(like HTML) rather than by the leaf elements(like Javas StyledDocument)

Returns:
true, if the styles of CONTENT and IMPLIED will be respected, if false they will be ignored