Class VParentBase<T>
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 VElementBase
VElementBase.Message, VElementBase.MessageEffect -
Field Summary
FieldsFields inherited from class VElementBase
BEGIN, END -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd child element to parent by parsing content textvoidAdd child element to parent.protected voidaddChildInternal(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) protected booleancheckChild(List<VElementBase.Message> messages, String content, String elementName, VChild newChild) Returns unmodifiable list ofVChildelements.collectGetterMap(Class<?> class1) collectSetterMap(Class<?> class1) voidcopyChildrenInto(VParent destination) booleanerrors()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 Methodprotected MethodinthashCode()voidorderChild(int index, VChild addedChild) Insert the child at the index in the ordered listvoidorderChild(VChild addedChild) voidorderChild(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 voidprocessInLineChild(List<VElementBase.Message> messages, String childName, String content, Class<? extends VElement> singleLineChildClass) booleanremoveChild(int index) booleanremoveChild(VChild child) Remove child from parent.booleanreplaceChild(int index, VChild child) booleanreplaceChild(VChild oldChild, VChild newChild) toString()Methods inherited from class VElementBase
elementName, isContentValid, newEmptyVElement, parse, throwMessageExceptions
-
Field Details
-
SETTERS
-
GETTERS
-
orderer
-
contentLineGenerator
-
-
Constructor Details
-
VParentBase
public VParentBase() -
VParentBase
-
-
Method Details
-
orderChild
- Specified by:
orderChildin interfaceVParent
-
orderChild
Description copied from interface:VParentReplace the oldChild with the newChild in the ordered list- Specified by:
orderChildin interfaceVParent
-
orderChild
Description copied from interface:VParentInsert the child at the index in the ordered list- Specified by:
orderChildin interfaceVParent
-
addChild
-
addChild
-
addChild
-
removeChild
Description copied from interface:VParentRemove child from parent.- Specified by:
removeChildin interfaceVParent- Parameters:
child- element to add to ordered list- Returns:
- true is success, false if failure
-
removeChild
public boolean removeChild(int index) - Specified by:
removeChildin interfaceVParent- Parameters:
index- index of child element to be removed- Returns:
- true is success, false if failure
-
replaceChild
- Specified by:
replaceChildin interfaceVParent- Parameters:
index- index of old child element to be removedchild- new child element to put at index- Returns:
-
replaceChild
- Specified by:
replaceChildin 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:VElementBaseParse content line into calendar element. If element contains childrenVElementBase.parseContent(String)is invoked recursively to parse child elements also- Specified by:
parseContentin 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
-
copyChildrenInto
-
errors
Description copied from interface:VElementProduces 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
-
collectGetterMap
-
collectSetterMap
-