V
- public class NodeStyleImpl<V> extends BaseStyle<NodeStyle<V>> implements NodeStyle<V>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HEIGHT |
static StyleProperty[] |
DEFAULT_PROPERTIES |
static int |
DEFAULT_WIDTH |
static int |
MAX_HEIGHT |
static int |
MAX_WIDTH |
static int |
MIN_SIZE |
Constructor and Description |
---|
NodeStyleImpl() |
NodeStyleImpl(String name,
NodeStyle<V> parent) |
Modifier and Type | Method and Description |
---|---|
boolean |
enforceBorder() |
boolean |
enforceColors() |
boolean |
enforceShape() |
boolean |
enforceSize() |
static boolean |
equals(Color c1,
Color c2) |
Color |
getBackground(V obj) |
String |
getCSS()
define the style as CSS rules.
|
String |
getCSSClass(V node)
get the CSS class(es) used by a specific node.
|
protected Object |
getCustomProperty(StyleProperty prop) |
Color |
getForeground(V obj) |
int |
getHeight(V obj) |
NodeBorder |
getNodeBorder(V obj) |
NodeShape |
getNodeShape(V obj) |
StyleProperty[] |
getProperties()
Retrieve all properties used by this style.
|
Object |
getProperty(StyleProperty prop)
Retrieve the value of a property.
|
Color |
getTextColor(V obj) |
int |
getWidth(V obj) |
boolean |
matches(NodeShape shape,
Color bg,
Color fg,
Color text,
int w,
int h) |
protected void |
setCustomProperty(StyleProperty prop,
Object value) |
void |
setProperty(StyleProperty prop,
Object value)
Assign a value to a property.
|
String |
toString() |
copy, equals, getCSSNameSuffix, getName, getParent, getParentProperty, setName
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int MAX_WIDTH
public static final int MAX_HEIGHT
public static final int MIN_SIZE
public static final StyleProperty[] DEFAULT_PROPERTIES
public Color getBackground(V obj)
getBackground
in interface NodeStyle<V>
public Color getForeground(V obj)
getForeground
in interface NodeStyle<V>
public Color getTextColor(V obj)
getTextColor
in interface NodeStyle<V>
public NodeShape getNodeShape(V obj)
getNodeShape
in interface NodeStyle<V>
public NodeBorder getNodeBorder(V obj)
getNodeBorder
in interface NodeStyle<V>
public boolean enforceColors()
enforceColors
in interface NodeStyle<V>
public boolean enforceShape()
enforceShape
in interface NodeStyle<V>
public boolean enforceSize()
enforceSize
in interface NodeStyle<V>
public boolean enforceBorder()
enforceBorder
in interface NodeStyle<V>
public StyleProperty[] getProperties()
Style
getProperties
in interface Style
public Object getProperty(StyleProperty prop)
Style
getProperty
in interface Style
prop
- the property to retrievepublic void setProperty(StyleProperty prop, Object value)
Style
setProperty
in interface Style
prop
- the property to setvalue
- the assigned value (can be null)protected Object getCustomProperty(StyleProperty prop)
protected void setCustomProperty(StyleProperty prop, Object value)
public String getCSS()
Style
Copyright © 2005–2020. All rights reserved.