public class DecoratedTextFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BALE_ICON |
static String |
BARREL_ICON |
static String |
COIN_ICON |
private IFontLoader |
fontLoader |
static String |
GENERIC_ICON |
static String |
IMAGE |
private SelectiveCachableXMLImageLoader |
imageLoader |
private int |
leftInset |
static String |
SEGMENT_IMAGE |
private int |
topInset |
private int |
wrappingWidth |
| Constructor and Description |
|---|
DecoratedTextFactory(int leftInset,
int topInset,
int wrappingWidth) |
| Modifier and Type | Method and Description |
|---|---|
DecoratedText |
createDecoratedText(String template,
Map<String,Object> parameters)
Create a decorated text from the template string.
|
DecoratedText |
createDecoratedText(String template,
String styleClass,
Map<String,Object> parameters)
Create a decorated text from the template string.
|
javafx.scene.control.Label |
createLabel(String template) |
javafx.scene.layout.VBox |
createMultiParagraphContainer() |
private javafx.scene.shape.Shape |
createSegmentedShape(double width,
double heigth,
List<Integer> visibleSegments) |
DecoratedText |
createSimpleDecoratedText(String template) |
private DecoratedText |
initializeDecoratedText(String template,
Map<String,Object> parameters,
DecoratedText text) |
private boolean |
isSpecialKey(String key) |
private DecoratedText |
replaceParameters(DecoratedText text,
String template,
Map<String,Object> parameters) |
private DecoratedText |
replaceSimpleParameter(DecoratedText text,
Map<String,Object> parameters,
String head,
String tail,
String key) |
private String |
replaceSimpleParameter(Map<String,Object> parameters,
String head,
String tail,
String key) |
private DecoratedText |
replaceSpecialParameter(DecoratedText text,
Map<String,Object> parameters,
String tail,
String key) |
String |
replaceTextParameters(String template,
Map<String,Object> parameters)
Replace the placeholders in the template with the values from the parameters object
|
public static final String COIN_ICON
public static final String BARREL_ICON
public static final String BALE_ICON
public static final String GENERIC_ICON
public static final String SEGMENT_IMAGE
public static final String IMAGE
private final int leftInset
private final int topInset
private final int wrappingWidth
@Autowired @Qualifier(value="xmlImageLoader") private SelectiveCachableXMLImageLoader imageLoader
@Autowired private IFontLoader fontLoader
public DecoratedTextFactory(int leftInset,
int topInset,
int wrappingWidth)
public javafx.scene.layout.VBox createMultiParagraphContainer()
public DecoratedText createDecoratedText(String template, Map<String,Object> parameters)
template - template stringparameters - Map containing the parameters.public javafx.scene.control.Label createLabel(String template)
public DecoratedText createSimpleDecoratedText(String template)
private DecoratedText initializeDecoratedText(String template, Map<String,Object> parameters, DecoratedText text)
public DecoratedText createDecoratedText(String template, String styleClass, Map<String,Object> parameters)
template - template stringstyleClass - style class from the base.css to be applied on the Decorated Text.parameters - Map containing the parameters.public String replaceTextParameters(String template, Map<String,Object> parameters)
template - string containing placeholdersparameters - to replace the parametersprivate DecoratedText replaceParameters(DecoratedText text, String template, Map<String,Object> parameters)
private DecoratedText replaceSpecialParameter(DecoratedText text, Map<String,Object> parameters, String tail, String key)
private javafx.scene.shape.Shape createSegmentedShape(double width,
double heigth,
List<Integer> visibleSegments)
private boolean isSpecialKey(String key)
private DecoratedText replaceSimpleParameter(DecoratedText text, Map<String,Object> parameters, String head, String tail, String key)
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.