TParent - type of the parent Created by Xyanid on 29.10.2015.public abstract class CssBase<TParent extends CssBase> extends Object
createCssText() method.
| Modifier and Type | Class and Description |
|---|---|
static class |
CssBase.CharacterState
Determines in which state a character read from a css text is.
|
| Constructor and Description |
|---|
CssBase()
Creates a new instance.
|
CssBase(boolean isModifiable)
Creates a new instance of the class.
|
CssBase(TParent parent)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
consumeCssText(String cssText)
Will be called when the given cssText should be consumed by this element.
|
abstract String
|
createCssText()
Creates the cssText for this element, this should be based upon the current status of the element.
|
protected javafx.util.Pair<Boolean,Boolean> |
filterCommentAndString(String data,
Function<Character,Boolean> commentConsumer,
Function<Character,Boolean> insideConsumer,
Function<Character,Boolean> outsideConsumer)
Filters out comments and allows to react differently to characters which are read within a string and outside
a string.
|
String
|
getCssText()
Gets the
cssText. |
boolean |
getIsModifiable()
Returns the
isModifiable of this element. |
TParent |
getParent()
Returns the
parent or this element. |
void |
setCssText(String cssText)
Sets the
cssText. |
void |
setNeedsUpdateCssText(boolean needsUpdateCssText)
Sets the
needsUpdateCssText of this element.
|
public CssBase(TParent parent)
parent - set the parent of this element.public CssBase(boolean isModifiable)
isModifiable - determines if the element is modifiable or notpublic CssBase()
public final TParent getParent()
parent or this element.parent of this element.public final boolean getIsModifiable()
isModifiable of this element.isModifiable of this elementpublic final void setCssText(String cssText) throws DOMException
cssText.cssText - the cssText which will be setDOMException - will be thrown when en error occurs
public final void setNeedsUpdateCssText(boolean needsUpdateCssText)
needsUpdateCssText of this element.needsUpdateCssText - the value for needsUpdateCssText of this element
protected javafx.util.Pair<Boolean,Boolean> filterCommentAndString(String data, Function<Character,Boolean> commentConsumer, Function<Character,Boolean> insideConsumer, Function<Character,Boolean> outsideConsumer) throws DOMException
data - data to be readcommentConsumer - function to be called when a comment character is read, if this function returns true
the iteration is stopped, can be null
insideConsumer - function to be called when a character inside a string is to be consumed, if this
function returns true the iteration is stopped, must not be null
outsideConsumer - function to be called when a character outside a string is to be consumed, if this
function returns true the iteration is stopped, must not be null
Pair contains at its first position if we exited while being in a comment and at its second
position if we exited while being in a string
DOMException - when a comment or string is not properly closed, this is only true if the string
was read
until the end and not exited by one of the consumers
public abstract void consumeCssText(String cssText) throws DOMException
cssText - the cssText to be consumedDOMException - if an error during consumption occurs
public abstract String createCssText()
Copyright © 2015 Saxonia Systems AG. All rights reserved.