Package gamedata

Class TileSet.Entry

  • Enclosing class:
    TileSet

    public static final class TileSet.Entry
    extends java.lang.Object
    An entry in a tile set; that is, a description of a single tile from a tile set file. Tile set entries are used by the DeckEditor to create the prototype Tile objects that the user drags onto deck pages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TileSet.Category getCategory()
      Returns the basic category to which the tile belongs.
      java.util.Map<java.lang.String,​java.lang.String> getClientProperties()
      Returns an immutable copy of the client properties as a map.
      java.lang.String getCredit()
      Returns the credits for the tile, or null if the tile doesn't specify any credits.
      java.lang.String getGameCode()
      Returns the code of the game that this tile belongs to, or Game.ALL_GAMES_CODE if the graphic is not tied to a particular game.
      java.lang.String getImageResource()
      Returns the image resource that contains the tile graphics.
      int getLine()
      Returns the line in the tile set file at which this entry begins.
      java.lang.String getName()
      Returns the name of the tile.
      LineCap getOutlineCap()
      Returns the line cap style used on outline ends.
      java.awt.Color getOutlineColor()
      Returns the color used to draw the outline.
      DashPattern getOutlineDashPattern()
      Returns the dash pattern used to draw the outline.
      LineJoin getOutlineJoin()
      Returns the method used to join the line segments that make up the outline.
      float getOutlineWidth()
      Returns the width, in points, of the outline.
      PageItem getPrototypeItem()
      Returns the prototype page item for this tile set entry.
      double getResolution()
      Returns the resolution of the tile, in pixels per inch.
      PageItem.SnapClass getSnapClass()
      Returns the snap class of the tile; this describes the default behaviour of the tile when it is snapped against other deck objects.
      TileSet.TileClass getTileClass()
      Returns the tile class of the tile.
      java.lang.String getTileName()
      Returns the original tile name for the tile.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getLine

        public int getLine()
        Returns the line in the tile set file at which this entry begins.
        Returns:
        the line number of the tile set entry
      • getTileName

        public java.lang.String getTileName()
        Returns the original tile name for the tile. If the tile name is localized, this is the key that was used to localized the tile name. Otherwise, this will be the same as getName().
        Returns:
        the original tile name, as listed on the first line of the tile set entry
      • getName

        public java.lang.String getName()
        Returns the name of the tile. If the tile name starts with @ in the tile set file, this name will already be converted into its localized form.
        Returns:
        the (possibly localized) name of the tile
      • getImageResource

        public java.lang.String getImageResource()
        Returns the image resource that contains the tile graphics.
        Returns:
        an image resource identifier
        See Also:
        ResourceKit.getImage(java.lang.String)
      • getOutlineColor

        public java.awt.Color getOutlineColor()
        Returns the color used to draw the outline.
        Returns:
        the outline color
      • getOutlineWidth

        public float getOutlineWidth()
        Returns the width, in points, of the outline.
        Returns:
        the outline line width
      • getOutlineDashPattern

        public DashPattern getOutlineDashPattern()
        Returns the dash pattern used to draw the outline.
        Returns:
        the dash pattern for the outline
      • getOutlineCap

        public LineCap getOutlineCap()
        Returns the line cap style used on outline ends.
        Returns:
        the line cap style
      • getOutlineJoin

        public LineJoin getOutlineJoin()
        Returns the method used to join the line segments that make up the outline.
        Returns:
        the line joining method
      • getCredit

        public java.lang.String getCredit()
        Returns the credits for the tile, or null if the tile doesn't specify any credits.
        Returns:
        the credits for the tile design
      • getResolution

        public double getResolution()
        Returns the resolution of the tile, in pixels per inch.
        Returns:
        the tile image resolution; this, combined with the dimensions of the tile image, will determine the physical size of the tile
      • getTileClass

        public TileSet.TileClass getTileClass()
        Returns the tile class of the tile. This determines the tile's default snap class, along with other properties.
        Returns:
        the tile class, as determined by the entry's class key
      • getSnapClass

        public PageItem.SnapClass getSnapClass()
        Returns the snap class of the tile; this describes the default behaviour of the tile when it is snapped against other deck objects.
        Returns:
        the tile's default snapping behaviour
      • getCategory

        public TileSet.Category getCategory()
        Returns the basic category to which the tile belongs. This determines in which list the tile will appear in the deck editor.
        Returns:
        the tile category
      • getGameCode

        public java.lang.String getGameCode()
        Returns the code of the game that this tile belongs to, or Game.ALL_GAMES_CODE if the graphic is not tied to a particular game.
        Returns:
        the code for the game this tile is for
      • getClientProperties

        public java.util.Map<java.lang.String,​java.lang.String> getClientProperties()
        Returns an immutable copy of the client properties as a map.
        Returns:
        the client properties that will be set on the prototype item
      • getPrototypeItem

        public PageItem getPrototypeItem()
        Returns the prototype page item for this tile set entry. This is the main item that appears in the deck editor's list of components.
        Returns:
        the prototype item for display in the deck editor
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object