Class BlockParent

    • Field Detail

      • xOffset

        protected int xOffset
        The x offset position of this block parent. Used for relative (serves as left-offset trait) and absolute positioning (serves as left-position trait).
      • yOffset

        protected int yOffset
        The y offset position of this block parent. Used for relative (serves as top-offset trait) and absolute positioning (serves as top-position trait).
      • children

        protected java.util.List<Area> children
        The children of this block parent area.
    • Constructor Detail

      • BlockParent

        public BlockParent()
    • Method Detail

      • addChildArea

        public void addChildArea​(Area childArea)
        Add a child to this area. The default is to do nothing. Subclasses must override to do something if they can have child areas.
        Overrides:
        addChildArea in class Area
        Parameters:
        childArea - the child area to add
      • addBlock

        public void addBlock​(Block block)
        Add the block area to this block parent.
        Parameters:
        block - the child block area to add
      • getChildAreas

        public java.util.List getChildAreas()
        Get the list of child areas for this block area.
        Returns:
        the list of child areas
      • isEmpty

        public boolean isEmpty()
        Check whether there are child areas.
        Returns:
        the result.
      • setXOffset

        public void setXOffset​(int off)
        Set the X offset of this block parent area.
        Parameters:
        off - the x offset of the block parent area
      • setYOffset

        public void setYOffset​(int off)
        Set the Y offset of this block parent area.
        Parameters:
        off - the y offset of the block parent area
      • getXOffset

        public int getXOffset()
        Get the X offset of this block parent area.
        Returns:
        the x offset of the block parent area
      • getYOffset

        public int getYOffset()
        Get the Y offset of this block parent area.
        Returns:
        the y offset of the block parent area