Enum Sheet.DeckSnappingHint

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Sheet.DeckSnappingHint>
    Enclosing class:
    Sheet<G extends GameComponent>

    public static enum Sheet.DeckSnappingHint
    extends java.lang.Enum<Sheet.DeckSnappingHint>
    A deck snapping hint is used the describe the general behaviour of a sheet when it is placed in a deck and an attempt is made to snap it against another object. The hint values represent different basic roles that object might play in a deck.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CARD
      The default hint value.
      INLAY
      Inlays snap to each other and to tiles.
      OTHER
      This class can be used for objects that don't fit any of the above categories.
      OVERLAY
      Overlays do not snap to anything by default.
      TILE
      Tiles snap to other tiles and the page grid, and are snapped into by inlays.
    • Enum Constant Detail

      • CARD

        public static final Sheet.DeckSnappingHint CARD
        The default hint value. Cards snap to other cards, and also to the page grid.
      • OVERLAY

        public static final Sheet.DeckSnappingHint OVERLAY
        Overlays do not snap to anything by default. They are typically used for decorations that may be placed anywhere over other deck objects.
      • INLAY

        public static final Sheet.DeckSnappingHint INLAY
        Inlays snap to each other and to tiles. When snapped to tiles, they snap to the inside edge rather the outside. A collection of inlays is typically used together to build up a more complex structure overtop (inside of) a tile.
      • TILE

        public static final Sheet.DeckSnappingHint TILE
        Tiles snap to other tiles and the page grid, and are snapped into by inlays. They are typically used to lay down the basic blueprint or background for a game board, with inlays placed overtop.
      • OTHER

        public static final Sheet.DeckSnappingHint OTHER
        This class can be used for objects that don't fit any of the above categories. By default, these objects snap only to each other.
    • Method Detail

      • values

        public static Sheet.DeckSnappingHint[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Sheet.DeckSnappingHint c : Sheet.DeckSnappingHint.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Sheet.DeckSnappingHint valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • apply

        public void apply​(PageItem item)
        Applies this hint to the snapping behaviour of a page item.
        Parameters:
        item -