public class StrokeProperty extends AbstractToStringProperty<java.awt.BasicStroke>
BasicStroke.AbstractToStringProperty.ChildProperty<T>AbstractProperty.InvalidPreferenceValueException, AbstractProperty.ValueChangeEvent<T>, AbstractProperty.ValueChangeListener<T>defaultValue, key, preferences| Constructor and Description |
|---|
StrokeProperty(java.lang.String key,
java.awt.BasicStroke defaultStroke)
Create a new stroke property from a stroke object.
|
StrokeProperty(java.lang.String key,
java.lang.String defaultValue)
Create a new stroke property from a string.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.BasicStroke |
fromString(java.lang.String string)
Converts the string to an object of the given type.
|
static java.awt.BasicStroke |
getFromString(java.lang.String code)
Return s new BasicStroke object with given thickness and style
|
private static float[] |
toDashArray(java.util.List<java.lang.Double> dashes) |
protected java.lang.String |
toString(java.awt.BasicStroke t)
Converts the string to an object of the given type.
|
get, getAsString, getChildProperty, getSpecialized, putaddListener, addListenerImpl, addWeakListener, cached, equals, getDefaultValue, getKey, getPreferences, hashCode, isSet, remove, removeListener, removeListenerImpl, storeDefaultValuepublic StrokeProperty(java.lang.String key, java.lang.String defaultValue)
key - The key to usedefaultValue - The default stroke as stringpublic StrokeProperty(java.lang.String key, java.awt.BasicStroke defaultStroke)
key - The keydefaultStroke - The default stroke.protected java.awt.BasicStroke fromString(java.lang.String string)
AbstractToStringPropertyfromString in class AbstractToStringProperty<java.awt.BasicStroke>string - The stringprotected java.lang.String toString(java.awt.BasicStroke t)
AbstractToStringPropertytoString in class AbstractToStringProperty<java.awt.BasicStroke>t - The object.public static java.awt.BasicStroke getFromString(java.lang.String code)
code - = 3.5 -> thickness=3.5px; 3.5 10 5 -> thickness=3.5px, dashed: 10px filled + 5px emptyprivate static float[] toDashArray(java.util.List<java.lang.Double> dashes)