java.lang.Object
jfxtras.icalendarfx.VElementBase
jfxtras.icalendarfx.VParentBase<T>
- Direct Known Subclasses:
RecurrenceRuleValue
,VCalendar
,VComponentBase
,VPropertyBase
Base class for parent calendar components.
The order of the children from childrenUnmodifiable()
equals the order they were added.
Adding children is not exposed by the implementation, but rather handled internally. When a VChild
has its
value set, it's automatically included in the collection of children by the Orderer
.
The Orderer
requires registering listeners to child properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class jfxtras.icalendarfx.VElementBase
VElementBase.Message, VElementBase.MessageEffect
-
Field Summary
FieldsFields inherited from class jfxtras.icalendarfx.VElementBase
BEGIN, END
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Add child element to parent by parsing content textvoid
Add child element to parent.protected void
addChildInternal
(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) protected boolean
checkChild
(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) Returns unmodifiable list ofVChild
elements.collectGetterMap
(Class<?> class1) collectSetterMap
(Class<?> class1) void
copyChildrenInto
(VParent destination) boolean
errors()
Produces a list of error messages indicating problems with calendar elementVElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parentprotected Method
protected Method
int
hashCode()
void
orderChild
(int index, VChild addedChild) Insert the child at the index in the ordered listvoid
orderChild
(VChild addedChild) void
orderChild
(VChild oldChild, VChild newChild) Replace the oldChild with the newChild in the ordered listprotected List
<VElementBase.Message> parseContent
(String content) Parse content line into calendar element.protected List
<VElementBase.Message> parseContent
(Iterator<String> unfoldedLineIterator) protected void
processInLineChild
(List<VElementBase.Message> messages, String childName, String content, Class<? extends VElement> singleLineChildClass) boolean
removeChild
(int index) boolean
removeChild
(VChild child) Remove child from parent.boolean
replaceChild
(int index, VChild child) boolean
replaceChild
(VChild oldChild, VChild newChild) toString()
Methods inherited from class jfxtras.icalendarfx.VElementBase
elementName, isContentValid, newEmptyVElement, parse, throwMessageExceptions
-
Field Details
-
SETTERS
-
GETTERS
-
orderer
-
contentLineGenerator
-
-
Constructor Details
-
VParentBase
public VParentBase() -
VParentBase
-
-
Method Details
-
orderChild
- Specified by:
orderChild
in interfaceVParent
-
orderChild
Description copied from interface:VParent
Replace the oldChild with the newChild in the ordered list- Specified by:
orderChild
in interfaceVParent
-
orderChild
Description copied from interface:VParent
Insert the child at the index in the ordered list- Specified by:
orderChild
in interfaceVParent
-
addChild
Description copied from interface:VParent
Add child element to parent. -
addChild
-
addChild
Description copied from interface:VParent
Add child element to parent by parsing content text -
removeChild
Description copied from interface:VParent
Remove child from parent.- Specified by:
removeChild
in interfaceVParent
- Parameters:
child
- element to add to ordered list- Returns:
- true is success, false if failure
-
removeChild
public boolean removeChild(int index) - Specified by:
removeChild
in interfaceVParent
- Parameters:
index
- index of child element to be removed- Returns:
- true is success, false if failure
-
replaceChild
- Specified by:
replaceChild
in interfaceVParent
- Parameters:
index
- index of old child element to be removedchild
- new child element to put at index- Returns:
-
replaceChild
- Specified by:
replaceChild
in interfaceVParent
- Parameters:
oldChild
- old child element to be removednewChild
- new child element to put at index where oldChild was- Returns:
-
withChild
-
getSetters
-
getGetters
-
getSetter
-
getGetter
-
parseContent
Description copied from class:VElementBase
Parse content line into calendar element. If element contains childrenVElementBase.parseContent(String)
is invoked recursively to parse child elements also- Specified by:
parseContent
in classVElementBase
- Parameters:
content
- calendar content string to parse- Returns:
- log of information and error messages
-
parseContent
-
processInLineChild
-
checkChild
protected boolean checkChild(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) -
addChildInternal
protected void addChildInternal(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) -
childrenUnmodifiable
Description copied from interface:VParent
Returns unmodifiable list of
VChild
elements.- Specified by:
childrenUnmodifiable
in interfaceVParent
- Returns:
- unmodifiable list of children
-
copyChildrenInto
-
errors
Description copied from interface:VElement
Produces a list of error messages indicating problems with calendar elementVElement.errors()
is invoked recursively to return errors of child elements in addition to errors in parent -
toString
-
equals
-
hashCode
public int hashCode() -
collectGetterMap
-
collectSetterMap
-