public class CSSEdgeStyle extends Object implements CSSStyle
Modifier and Type | Field and Description |
---|---|
float |
border |
static String |
CSS_BORDER |
static String |
CSS_LINECOLOR |
static String |
CSS_LINEEND |
static String |
CSS_LINEEND_DUAL |
static String |
CSS_LINEEND_NEGATIVE |
static String |
CSS_LINEEND_POSITIVE |
static String |
CSS_LINEEND_UNKNOWN |
static String |
CSS_SHAPE |
static String |
CSS_SHAPE_CURVE |
static String |
CSS_SHAPE_STRAIGHT |
int |
curve |
Color |
lineColor |
EdgeEnd |
lineEnd |
static float |
NULL_BORDER |
static int |
NULL_CURVE |
Constructor and Description |
---|
CSSEdgeStyle()
A new style from the with all values to NULL
|
CSSEdgeStyle(Color lineColor) |
CSSEdgeStyle(Color lineColor,
EdgeEnd lineEnd,
int curve,
float border)
A new style from the scratch
|
CSSEdgeStyle(CSSEdgeStyle s)
A new style copied from another
|
CSSEdgeStyle(EdgeAttributesReader areader)
A new style from a GsAttributesReader areader
|
Modifier and Type | Method and Description |
---|---|
void |
apply(AttributesReader areader)
Apply the style to an element using its GsAttributesReader
|
Object |
clone() |
static CSSStyle |
fromString(String[] lines)
Create a new style from an array of strings
|
void |
merge(CSSStyle st)
Merge the defined attributes from the style s
|
void |
setProperty(String property,
String value,
int i)
Define the value of a property of a style
|
String |
toString()
a css string representation of this style.
|
String |
toString(int tabs_count)
a css string representation of this style.
|
public static final float NULL_BORDER
public static final int NULL_CURVE
public static final String CSS_LINECOLOR
public static final String CSS_SHAPE
public static final String CSS_SHAPE_STRAIGHT
public static final String CSS_SHAPE_CURVE
public static final String CSS_LINEEND
public static final String CSS_LINEEND_POSITIVE
public static final String CSS_LINEEND_NEGATIVE
public static final String CSS_LINEEND_DUAL
public static final String CSS_LINEEND_UNKNOWN
public static final String CSS_BORDER
public Color lineColor
public int curve
public EdgeEnd lineEnd
public float border
public CSSEdgeStyle()
public CSSEdgeStyle(Color lineColor)
public CSSEdgeStyle(Color lineColor, EdgeEnd lineEnd, int curve, float border)
lineColor
- the lineColor color for the nodeshape
- the shape for the linelineEnd
- the style for the end of the lineEdgeAttributesReader
public CSSEdgeStyle(EdgeAttributesReader areader)
areader
- public CSSEdgeStyle(CSSEdgeStyle s)
s
- public void merge(CSSStyle st)
CSSStyle
public void apply(AttributesReader areader)
CSSStyle
public void setProperty(String property, String value, int i) throws CSSSyntaxException
CSSStyle
setProperty
in interface CSSStyle
i
- the index in the parsed textCSSSyntaxException
public String toString()
public String toString(int tabs_count)
tabs_count
- the number of tabulations to append at the beginning of each linepublic static CSSStyle fromString(String[] lines) throws PatternSyntaxException, CSSSyntaxException
lines
- PatternSyntaxException
CSSSyntaxException
- if there is an error in the syntaxCopyright © 2005–2020. All rights reserved.