Home

Awesome

Lib-Tile

Intention

Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tiles in your JavaFX application.

A Tile is per definition a little transparent Image which overlay a background-color or -image with the help of repetitions from the image in a layer.

The current version is 0.2.0 from 08.13.2017 (MM.dd.yyyy).

Image: Crimson Night (Dark / Landscape) with different tile images different-tile-images_v0.3.0.png

Hint
Normally only one Tile can shown simultaneously. For demonstration purpose I have merge different Tiles in one picture.

Hint
This image is from the webpage https://wall.alphacoders.com. The image haven't neither a created by or shared by flag (see http://alphacoders.com/site/faq ). If anyone is the autor and won't that I use this image here in my open souce project plz send me an email (see Contact) and I will remove it. Thanks for your great work :smiley:.

Content

Demo<a name="Demo" />

The application Lib-Tile-Demo shows a demonstration how to use and handle the features from the libraries in the project Lib-Tile.

Image: Demo application
demo_v0.3.0.png

Hint
The library Lib-Tile-Customized-Examples provides different examples about reduced, mixed and own TileSets. This examples are shown in the tab Customized Tiles.

For more informations and examples plz see the ReadMe from Lib-Tile-Demo.

Libraries<a name="Libraries" />

Like I said before Lib-Tile is a multi Maven project which contains different sub-libraries. Which sub-libraries are the best for you depends from your requirements in your project.

To use Lib-Tile in your project you need minimal the library Lib-Tile-Core plus a concrete implementation from an TileLoader which loads your own Tiles images. How that work will be explained in the sub-project Lib-Tile-Demo or have a look into the class TransparentTexturesTileLoader from the library Lib-Tile-TransparentTextures-Images.

Natural you can use additional libraries which contains predefined tilesets. Currently supported is Transparent Textures with the libraries Lib-Tile-TransparentTextures and Lib-Tile-TransparentTextures-Images.

In the library Lib-Tile-Customized-Examples different examples shows how to used a reduced, mixed and / or own TileSet.

Lib-Tile-Core<a name="LiTiCo" />

The library Lib-Tile-Core provides the API to load a Tile (which is per definition a little transparent Image) as a Background or an Image with a concrete implementation from a TileLoader.

The main point for access the functionalities from this API is the class TileProvider. For example with the method TileProvider#loadAsBackground(TileLoader, Tile) the developer can load a Tile as an Background.

Class TileProvider:

/**
 * The singleton {@code TileProvider} allowed the developer access to all relevant 
 * methods in context from the {@code API} from the library {@code Lib-Tile-Core}.
 * <p>
 * For example with the methods {@code getDefaultTile(XY)} a concrete instance from 
 * the {@code Inteface} {@link com.github.naoghuman.lib.tile.core.Tile} can be created.
 * <br>
 * With the method {@code getDefaultValidator()} the developer have access to a 
 * default implementation from the {@code Inteface} 
 * {@link com.github.naoghuman.lib.tile.core.TileValidator}.
 *
 * @author Naoghuman
 * @since  0.2.0
 * @see    com.github.naoghuman.lib.tile.core.Tile
 * @see    com.github.naoghuman.lib.tile.core.TileValidator
 */
public final class TileProvider

For more informations and examples plz see the ReadMe from Lib-Tile-Core.

Lib-Tile-TransparentTextures<a name="LiTiTrTe" />

With the library Lib-Tile-TransparentTextures the developer have access to the tileset Transparent Textures from the internet page https://www.transparenttextures.com/ through the enum TransparentTexturesTile. Momentary that are 396 Tiles.

The tile images from this tileset are outsourced in a own library Lib-Tile-TransparentTextures-Images to reduce the size from this library. One more advance is that you can use an own TileLoader in combination with the library Lib-Tile-TransparentTextures. So you don't need to include the library Lib-Tile-TransparentTextures-Images into your project which size is momenatry 13MB.

Class TransparentTexturesTile:

/**
/**
 * The <code>enum</code> TransparentTexturesTileSet is a collection from 
 {@link com.github.naoghuman.lib.tile.core.Tile}s which representated the 
 * <code>Tileset</code> from the internet page <a href="https://www.transparenttextures.com/">https://www.transparenttextures.com/</a>.
 * <p>
 * The individual {@link com.github.naoghuman.lib.tile.core.Tile} can be loaded over the class 
 * {@link com.github.naoghuman.lib.tile.core.TileProvider} with the help from the concrete class 
 * {@link com.github.naoghuman.lib.tile.transparenttextures.images.TransparentTexturesTileLoader}.<br>
 * See there the methods 
 * {@link com.github.naoghuman.lib.tile.core.TileProvider#loadAsBackground(com.github.naoghuman.lib.tile.core.TileLoader, com.github.naoghuman.lib.tile.core.Tile) }
 * and {@link com.github.naoghuman.lib.tile.core.TileProvider#loadAsImage(com.github.naoghuman.lib.tile.core.TileLoader, com.github.naoghuman.lib.tile.core.Tile) }.
 * <p>
 * Additional informations:<br>
 * The parameters from the initialisation in this <code>Tileset</code> will be validate with the class 
 * {@link com.github.naoghuman.lib.tile.core.internal.DefaultTileValidator}. <code>DefaultTileValidator</code> 
 * allowed basic checks, for example if a {@link java.lang.String} is <code>NULL</code> or <code>EMPTY</code>.
 * 
 * @author Naoghuman
 * @see com.github.naoghuman.lib.tile.core.Tile
 * @see com.github.naoghuman.lib.tile.core.TileLoader
 * @see com.github.naoghuman.lib.tile.core.TileProvider
 * @see com.github.naoghuman.lib.tile.core.TileValidator
 * @see com.github.naoghuman.lib.tile.core.internal.DefaultTileValidator
 * @see com.github.naoghuman.lib.tile.transparenttextures.images.TransparentTexturesTileLoader
 */
public final class TransparentTexturesTileSet extends TileSet {
    
    private static final String SCOPE = TransparentTexturesTileLoader.getDefault().getScope();

    /**
     * The <code>Java</code> representation from the tile: 3Px Tile
     */
    public static final Tile TT_3PX_TILE = TileProvider.getDefault().getDefaultTile(SCOPE, "tt-3px-tile.png", "3Px Tile", 100, 100, "Gre3g", "http://gre3g.livejournal.com/"); // NOI18N
    
    /**
     * The <code>Java</code> representation from the tile: 45 Degree Fabric (Dark)
     */
    public static final Tile TT_45_DEGREE_FABRIC_DARK = TileProvider.getDefault().getDefaultTile(SCOPE, "tt-45-degree-fabric-dark.png", "45 Degree Fabric (Dark)", 315, 315, "Atle Mo", "http://atle.co/"); // NOI18N
    
    ...
}

For more informations and examples plz see the ReadMe from Lib-Tile-TransparentTextures.

Lib-Tile-TransparentTextures-Images<a name="LiTiTrTeIm" />

The library Lib-Tile-TransparentTextures-Images contains all images from the tileset Transparent Textures which can be loaded with the help from the class TransparentTexturesTileLoader (which is contained in the library Lib-Tile-TransparentTextures).

Class TransparentTexturesTileLoader:

/**
 * The singleton <code>TransparentTexturesTileLoader</code> is a concrete implementation 
 * from the <code>Interface</code> {@link com.github.naoghuman.lib.tile.core.TileLoader}.
 * <p>
 * With this class it's possible to load a {@link com.github.naoghuman.lib.tile.core.Tile} 
 * (which is per definition a little transparent Image) from the enum 
 * {@link com.github.naoghuman.lib.tile.transparenttextures.TransparentTexturesTile} as a 
 * {@link javafx.scene.layout.Background} or an {@link javafx.scene.image.Image} with the 
 * help from {@link com.github.naoghuman.lib.tile.core.TileProvider#loadAsBackground(TileLoader, Tile)} 
 * or {@link com.github.naoghuman.lib.tile.core.TileProvider#loadAsImage(TileLoader, Tile)}.
 *
 * @author Naoghuman
 * @see com.github.naoghuman.lib.tile.core.Tile
 * @see com.github.naoghuman.lib.tile.core.TileLoader
 * @see com.github.naoghuman.lib.tile.core.TileProvider
 * @see com.github.naoghuman.lib.tile.transparenttextures.TransparentTexturesTile
 * @see javafx.scene.layout.Background
 * @see javafx.scene.image.Image
 */
public final class TransparentTexturesTileLoader extends TileLoader

For more informations and examples plz see the ReadMe from Lib-Tile-TransparentTextures-Images.

Lib-Tile-Customized-Examples<a name="LiTiCuEx" />

The library Lib-Tile-Customized-Examples provides different examples about CustomizedTileSets. There will be following demonstrations:

Class CustomizedExampleReducedTileSet:

/**
 * TODO
 * 
 * @author Naoghuman
 * @since  0.2.0
 */
public final class CustomizedExampleReducedTileSet extends TileSet

For more informations and examples plz see the ReadMe from Lib-Tile-Customized-Examples.

Download<a name="Download" />

Current version is 0.2.0. Main points in this release are:

There are different zip files as download available. Plz choose the right one in dependency from your necessities:

Access to the downloads are here: Download Lib-Tile

Requirements<a name="Requirements" />

Installation<a name="Installation" />

Depends on your necessities you have different options like in the section Download is shown. Download the right zip file, extract it and include the jar file(s) into your project. That was it :smile: .

Documentation<a name="Documentation" />

The projects Lib-Tile and Lib-Tile-Demo contains in form from the README.md and the JavaDoc the documentation.

Contribution<a name="Contribution" />

License<a name="License" />

The project Lib-Tile and all sub-projects are licensed under General Public License 3.0.

Autor<a name="Autor" />

The project Lib-Tile and all sub-projects are maintained by me, Peter Rogge. See Contact.

Contact<a name="Contact" />

You can reach me under peter.rogge@yahoo.de.