Interface XBEditableBlock

  • All Superinterfaces:
    XBBlock
    All Known Implementing Classes:
    XBDefaultEditableBlock

    @ParametersAreNonnullByDefault
    public interface XBEditableBlock
    extends XBBlock
    Interface for editable XBUP level 0 block.
    • Method Detail

      • setParent

        void setParent​(@Nullable
                       XBBlock parent)
        Sets parent block.
        Parameters:
        parent - parent block
      • setTerminationMode

        void setTerminationMode​(XBBlockTerminationMode terminationMode)
        Sets terminated mode.
        Parameters:
        terminationMode - terminated mode flag
      • setDataMode

        void setDataMode​(XBBlockDataMode dataMode)
        Sets data block mode.
        Parameters:
        dataMode - data block mode
      • setAttributes

        void setAttributes​(@Nullable
                           XBAttribute[] attributes)
        Sets array of attributes in order of appearance.
        Parameters:
        attributes - array of attributes
      • setAttributeAt

        void setAttributeAt​(XBAttribute attribute,
                            int attributeIndex)
        Sets attribute of given index. If index is greater than current count of attributes, new zero attributes will be filled.
        Parameters:
        attribute - attribute value
        attributeIndex - attribute index
      • setAttributesCount

        void setAttributesCount​(int count)
        Sets count of attributes. List of attributes will be trimmed/extended with zero values.
        Parameters:
        count - count of attributes
      • removeAttribute

        void removeAttribute​(int attributeIndex)
        Removes attribute on given position.
        Parameters:
        attributeIndex - attribute index
      • setChildren

        void setChildren​(@Nullable
                         XBBlock[] blocks)
        Sets array of all children.
        Parameters:
        blocks - array of children blocks
      • setChildAt

        void setChildAt​(XBBlock block,
                        int childIndex)
        Sets children of given index. If index is greater than current count of children, new empty blocks will be filled.
        Parameters:
        block - child block
        childIndex - index of child block
      • setChildrenCount

        void setChildrenCount​(int count)
        Gets count of children blocks. List of children will be trimmed/extended with empty blocks.
        Parameters:
        count - count of children
      • createNewChild

        XBBlock createNewChild​(int childIndex)
        This method instantiates new child node.
        Parameters:
        childIndex - child index
        Returns:
        new instance of block
      • removeChild

        void removeChild​(int childIndex)
        Removes child on given position.
        Parameters:
        childIndex - child index
      • setData

        void setData​(@Nullable
                     java.io.InputStream data)
              throws java.io.IOException
        Sets block data.
        Parameters:
        data - data stream
        Throws:
        java.io.IOException - exception on input/output error
      • setData

        void setData​(@Nullable
                     org.exbin.auxiliary.paged_data.BinaryData data)
        Sets block data.
        Parameters:
        data - data stream
      • clear

        void clear()
        Clears all data, attributes and child blocks.