|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.InetHtmlConfiguration
public class InetHtmlConfiguration
This class defines the settings used by the document and the view/editor of a document. It influences
the rendering as well as the parse/write of the document.
The main purpose is, to toggle between settings which support wysiwyg editing and settings which
do a HTML4 conform rendering of the document.
For example: A BR-Tag in HTML causes a line wrap only, if there is content after the BR. But when editing,
one would expect that there whill always be a new line after inserting a soft-break.
Constructor Summary | |
---|---|
InetHtmlConfiguration(boolean inlineBoxCompatible,
boolean allowInternalImages,
boolean transformEmptyBlocks,
boolean doAlwaysBreak,
boolean shouldBeEditable,
HTML.Tag defaultBlock)
Creates an configuration |
Method Summary | |
---|---|
static InetHtmlConfiguration |
getBrowserConfig()
Returns a Browser config - most restrictive |
HTML.Tag |
getDefaultBlock()
Returns the name of the default paragraph block name |
static InetHtmlConfiguration |
getHtmlEditorConfig()
Returns a config for HTML editing. |
static InetHtmlConfiguration |
getMailEditorConfig()
Returns a mail editor config. |
boolean |
isAllowInternalImages()
Returns whether image paste is allowed |
boolean |
isDoAlwaysBreak()
HTML predicts that the last soft-break in a block has to be ignored, if no content follows. |
boolean |
isInlineBoxCompatible()
This flag influences the way, setCharacterAttributes works. |
boolean |
isShouldBeEditable()
Returns whether the editor should be set to editable by default |
boolean |
isTransformEmptyBlocks()
This flag sets the block handling to wysiwyg. |
void |
setAllowInternalImages(boolean allowInternalImages)
Sets whether image paste is allowed |
void |
setDefaultBlock(HTML.Tag defaultBlock)
Sets the name of the default paragraph block name |
void |
setDoAlwaysBreak(boolean doAlwaysBreak)
Sets the always break mode |
void |
setInlineBoxCompatible(boolean inlineBoxCompatible)
Sets the inline box compatible mode |
void |
setShouldBeEditable(boolean shouldBeEditable)
Set whether the editor should be set to editable by default |
void |
setTransformEmptyBlocks(boolean transformEmptyBlocks)
Sets the empty blocks transformation mode |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InetHtmlConfiguration(boolean inlineBoxCompatible, boolean allowInternalImages, boolean transformEmptyBlocks, boolean doAlwaysBreak, boolean shouldBeEditable, HTML.Tag defaultBlock)
inlineBoxCompatible
- set to true, if setCharacterAttributes should not split inline structuresallowInternalImages
- set to true, to allow pasted images with no external sourcetransformEmptyBlocks
- set to true, to fill empty blocks to make them visibledoAlwaysBreak
- set to true, to cause any BR to create a new lineshouldBeEditable
- set to true, to set editors to editable by defaultdefaultBlock
- the default paragraph tag nameMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public static InetHtmlConfiguration getBrowserConfig()
public static InetHtmlConfiguration getHtmlEditorConfig()
public static InetHtmlConfiguration getMailEditorConfig()
public boolean isInlineBoxCompatible()
public void setInlineBoxCompatible(boolean inlineBoxCompatible)
inlineBoxCompatible
- true to activateisInlineBoxCompatible()
public boolean isAllowInternalImages()
public void setAllowInternalImages(boolean allowInternalImages)
allowInternalImages
- true to allowe, false to disablepublic HTML.Tag getDefaultBlock()
public void setDefaultBlock(HTML.Tag defaultBlock)
defaultBlock
- the tag to setpublic boolean isTransformEmptyBlocks()
public void setTransformEmptyBlocks(boolean transformEmptyBlocks)
transformEmptyBlocks
- set to true to enableisTransformEmptyBlocks()
public boolean isDoAlwaysBreak()
public void setDoAlwaysBreak(boolean doAlwaysBreak)
doAlwaysBreak
- set to true to activeisDoAlwaysBreak()
public boolean isShouldBeEditable()
public void setShouldBeEditable(boolean shouldBeEditable)
shouldBeEditable
- true, if editable by default
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |