public class ImageFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
private static LinkedHashMap<Float,String> |
slabExtMap |
private static LinkedHashMap<Float,String> |
slabMap |
| Constructor and Description |
|---|
ImageFactory() |
| Modifier and Type | Method and Description |
|---|---|
private String |
getFileName(float f,
String defaultFileName,
HashMap<Float,String> fNames)
Retrieve the file name that matches best the proportions to be displayed
|
private String |
getFileName(int width,
int height)
Compute the filename based on the stretching factor
|
String |
getFileNameExt(double width,
double height,
int capWidth)
Compute the filename based on the stretching factor
|
javafx.scene.image.Image |
getSlabImage(javafx.geometry.Dimension2D dim)
Draw a borderless stone slab
|
private static LinkedHashMap<Float,String> slabMap
private static LinkedHashMap<Float,String> slabExtMap
private String getFileName(int width, int height)
width - of the buttonheight - of the buttonprivate String getFileName(float f, String defaultFileName, HashMap<Float,String> fNames)
f - result of the division of the displayable width through the displayable heightdefaultFileName - default file name to be usedfNames - Hashmap to be used with the file namespublic javafx.scene.image.Image getSlabImage(javafx.geometry.Dimension2D dim)
graphics - Graphics to draw onbutton - that is represented by the slabpaintShadow - indicates if the surrounding mortar has a different colorpublic String getFileNameExt(double width, double height, int capWidth)
width - of the buttonheight - of the buttonCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.