All Implemented Interfaces:
ICustomPropertyProvider, ILayer
Direct Known Subclasses:
GroupLayer, ImageLayer, MapObjectLayer, TileLayer

public abstract class Layer extends CustomPropertyProvider implements ILayer
  • Constructor Details

    • Layer

      public Layer()
    • Layer

      public Layer(Layer layerToBeCopied)
      Copy Constructor for copying instances of Layers.
      Parameters:
      layerToBeCopied - the layer we want to copy
  • Method Details

    • getHeight

      public int getHeight()
      Gets the height.
      Specified by:
      getHeight in interface ILayer
      Returns:
      the height
    • getId

      public int getId()
      Specified by:
      getId in interface ILayer
    • getName

      public String getName()
      Description copied from interface: ILayer
      Gets the name.
      Specified by:
      getName in interface ILayer
      Returns:
      the name
    • getOpacity

      public float getOpacity()
      Description copied from interface: ILayer
      Gets the opacity.
      Specified by:
      getOpacity in interface ILayer
      Returns:
      the opacity
    • getOffset

      public Point getOffset()
      Description copied from interface: ILayer
      Gets both the X and the Y offset of the layer.
      Specified by:
      getOffset in interface ILayer
      Returns:
      a Point representing the offset
    • getOffsetX

      public int getOffsetX()
      Description copied from interface: ILayer
      Gets the horizontal offset of the layer.
      Specified by:
      getOffsetX in interface ILayer
      Returns:
      the x offset
    • getOffsetY

      public int getOffsetY()
      Description copied from interface: ILayer
      Gets the vertical offset of the layer.
      Specified by:
      getOffsetY in interface ILayer
      Returns:
      the y offset
    • getRenderType

      public RenderType getRenderType()
      Specified by:
      getRenderType in interface ILayer
    • getSizeInTiles

      public Dimension getSizeInTiles()
      Description copied from interface: ILayer
      Gets the size in tiles.
      Specified by:
      getSizeInTiles in interface ILayer
      Returns:
      the size in tiles
    • getWidth

      public int getWidth()
      Gets the width.
      Specified by:
      getWidth in interface ILayer
      Returns:
      the width
    • getMap

      public IMap getMap()
      Specified by:
      getMap in interface ILayer
    • isVisible

      public boolean isVisible()
      Description copied from interface: ILayer
      Checks if is visible.
      Specified by:
      isVisible in interface ILayer
      Returns:
      true, if is visible
    • setName

      public void setName(String name)
      Specified by:
      setName in interface ILayer
    • setWidth

      public void setWidth(int width)
      Specified by:
      setWidth in interface ILayer
    • setHeight

      public void setHeight(int height)
      Specified by:
      setHeight in interface ILayer
    • setOpacity

      public void setOpacity(float opacity)
      Specified by:
      setOpacity in interface ILayer
    • setRenderType

      public void setRenderType(RenderType renderType)
      Specified by:
      setRenderType in interface ILayer
    • setVisible

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface ILayer
    • setMap

      protected void setMap(TmxMap map)
    • afterUnmarshal

      protected void afterUnmarshal(jakarta.xml.bind.Unmarshaller u, Object parent)