You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
702 B
25 lines
702 B
package com.sothr.imagetools.ui.component
|
|
|
|
import javafx.geometry.Insets
|
|
import javafx.scene.layout.TilePane
|
|
|
|
import com.sothr.imagetools.engine.util.PropertiesService
|
|
import grizzled.slf4j.Logging
|
|
|
|
/**
|
|
* Created by drew on 8/6/14.
|
|
*
|
|
* Creates pre-generated image tiles that can be rendered to a scene
|
|
*/
|
|
object ImageTileFactory extends Logging {
|
|
|
|
def get(image: com.sothr.imagetools.engine.image.Image, pane: TilePane): ImageTile = {
|
|
val thumbnailWidth = PropertiesService.get("app.thumbnail.size","128").toInt
|
|
val imageTile = new ImageTile(thumbnailWidth, image, pane.asInstanceOf[ImageTilePane])
|
|
//set padding
|
|
imageTile.setPadding(new Insets(2, 2, 2, 2))
|
|
|
|
imageTile
|
|
}
|
|
|
|
}
|