Package gamedata
Class TileSet.Entry
- java.lang.Object
-
- gamedata.TileSet.Entry
-
- Enclosing class:
- TileSet
public static final class TileSet.Entry extends java.lang.ObjectAn entry in a tile set; that is, a description of a single tile from a tile set file. Tile set entries are used by theDeckEditorto create the prototypeTileobjects that the user drags onto deck pages.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TileSet.CategorygetCategory()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.StringgetCredit()Returns the credits for the tile, ornullif the tile doesn't specify any credits.java.lang.StringgetGameCode()Returns the code of the game that this tile belongs to, orGame.ALL_GAMES_CODEif the graphic is not tied to a particular game.java.lang.StringgetImageResource()Returns the image resource that contains the tile graphics.intgetLine()Returns the line in the tile set file at which this entry begins.java.lang.StringgetName()Returns the name of the tile.LineCapgetOutlineCap()Returns the line cap style used on outline ends.java.awt.ColorgetOutlineColor()Returns the color used to draw the outline.DashPatterngetOutlineDashPattern()Returns the dash pattern used to draw the outline.LineJoingetOutlineJoin()Returns the method used to join the line segments that make up the outline.floatgetOutlineWidth()Returns the width, in points, of the outline.PageItemgetPrototypeItem()Returns the prototype page item for this tile set entry.doublegetResolution()Returns the resolution of the tile, in pixels per inch.PageItem.SnapClassgetSnapClass()Returns the snap class of the tile; this describes the default behaviour of the tile when it is snapped against other deck objects.TileSet.TileClassgetTileClass()Returns the tile class of the tile.java.lang.StringgetTileName()Returns the original tile name for the tile.java.lang.StringtoString()
-
-
-
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 asgetName().- 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, ornullif 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
classkey
-
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, orGame.ALL_GAMES_CODEif 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:
toStringin classjava.lang.Object
-
-