Class GroupLayer

All Implemented Interfaces:
ICustomPropertyProvider, IGroupLayer, ILayer, ILayerList

public class GroupLayer extends Layer implements IGroupLayer
Represents a group layer in a tile map. This class extends the Layer class and implements the IGroupLayer interface.
  • Constructor Details

    • GroupLayer

      public GroupLayer()
      Creates an empty group for map editors and programmatic map construction.
    • GroupLayer

      public GroupLayer(GroupLayer original)
      Copy constructor for the GroupLayer class. Creates a new instance of the GroupLayer class by copying the properties from the provided GroupLayer object.
      Parameters:
      original - The original GroupLayer object to copy from.
  • Method Details

    • getRenderLayers

      public List<ILayer> getRenderLayers()
      Description copied from interface: ILayerList
      Gets all render layers in the Layer list.
      Specified by:
      getRenderLayers in interface ILayerList
      Returns:
      a List of ILayers
    • getMapObjectLayers

      public List<IMapObjectLayer> getMapObjectLayers()
      Description copied from interface: ILayerList
      Gets all MapObjectLayers in the Layer list.
      Specified by:
      getMapObjectLayers in interface ILayerList
      Returns:
      a List of IMapObjectLayers
    • addLayer

      public void addLayer(ILayer layer)
      Description copied from interface: ILayerList
      Adds an ILayer to the Layer list.
      Specified by:
      addLayer in interface ILayerList
      Parameters:
      layer - the layer to be added
    • addLayer

      public void addLayer(int index, ILayer layer)
      Description copied from interface: ILayerList
      Adds an ILayer to the Layer list at the given index.
      Specified by:
      addLayer in interface ILayerList
      Parameters:
      index - the index
      layer - the layer to be added
    • removeLayer

      public void removeLayer(ILayer layer)
      Description copied from interface: ILayerList
      Removes an ILayer from the Layer list.
      Specified by:
      removeLayer in interface ILayerList
      Parameters:
      layer - the layer to be removed
    • removeLayer

      public void removeLayer(int index)
      Description copied from interface: ILayerList
      Removes a layer from the Layer list.
      Specified by:
      removeLayer in interface ILayerList
      Parameters:
      index - the index of the layer to be removed
    • getTileLayers

      public List<ITileLayer> getTileLayers()
      Description copied from interface: ILayerList
      Gets the ITileLayers contained in a Layer list.
      Specified by:
      getTileLayers in interface ILayerList
      Returns:
      a List of all ITileLayers
    • getImageLayers

      public List<IImageLayer> getImageLayers()
      Description copied from interface: ILayerList
      Gets the IImageLayers contained in a Layer list.
      Specified by:
      getImageLayers in interface ILayerList
      Returns:
      a List of all IImageLayers
    • getGroupLayers

      public List<IGroupLayer> getGroupLayers()
      Description copied from interface: ILayerList
      Gets the IGroupLayers contained in a Layer list.
      Specified by:
      getGroupLayers in interface ILayerList
      Returns:
      a List of all IGroupLayers
    • setMap

      protected void setMap(TmxMap map)
      Overrides:
      setMap in class Layer
    • afterUnmarshal

      protected void afterUnmarshal(jakarta.xml.bind.Unmarshaller u, Object parent)
      Overrides:
      afterUnmarshal in class Layer