public class Style extends Object
Modifier and Type | Field and Description |
---|---|
static Color |
DEFAULT_FONT_COLOR
The default font color is black.
|
static String |
DEFAULT_FONT_FAMILY
The default font name is "TimesRoman".
|
static int |
DEFAULT_FONT_SIZE
The default font size is 9.
|
static String |
DEFAULT_FONT_STYLE
The default font style is "normal".
|
Constructor and Description |
---|
Style() |
Style(String properties)
Constructor with the properties values.
|
Style(String name,
String properties)
Constructor with the properties values and a name for this style.
|
Modifier and Type | Method and Description |
---|---|
String |
getName() |
Enumeration |
getPropertiesNames()
Returns a collection with the properties names.
|
String |
getPropertyValue(String name)
Returns the value of a propertie.
|
void |
setName(String n) |
void |
setProperties(String properties)
Sets the properties values.
|
void |
setProperty(String name,
String value)
Sets a property value.
|
public static final int DEFAULT_FONT_SIZE
public static final String DEFAULT_FONT_FAMILY
public static final String DEFAULT_FONT_STYLE
public static final Color DEFAULT_FONT_COLOR
public Style()
public Style(String name, String properties)
rule
- A css rule from the cssparser package.public Style(String properties)
properties
- For instance: "font-size:15; font-family:verdana;
color:#000000; font-style:normal".public void setProperties(String properties)
properties
- For instance: "font-size:15; font-family:verdana;
color:#000000; font-style:normal".public void setProperty(String name, String value)
name
- For instance: "font-size".value
- For instance: "15".public Enumeration getPropertiesNames()
public String getPropertyValue(String name)
name
- The property name.public void setName(String n)
public String getName()
Copyright © 2015. All rights reserved.