|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bsd.x2svg.RuntimeProperties
public class RuntimeProperties
This singleton provides properties that are needed at runtime.
Field Summary | |
---|---|
private java.awt.Color |
attributeColor
|
private java.awt.Font |
attributeFont
|
private java.lang.String |
commentText
|
private java.awt.Color |
commentTextColor
|
private java.awt.Font |
commentTextFont
|
private boolean |
commentTextOn
|
private static java.lang.String |
ERR_STRING
|
private java.awt.Font |
font
|
private java.lang.String |
FONT_NORMAL_NAME
Font for element names. |
private java.lang.String |
FONT_SMALL_NAME
Font for cardinalities. |
private int |
fontHeight
|
private java.awt.FontMetrics |
fontMetrics
|
private java.awt.Font |
fontSmall
|
private boolean |
optimizeDrawing
Should the drawing of the elements be more condensed? |
private static RuntimeProperties |
properties
|
private java.awt.Color |
textColor
|
private boolean |
withAttributes
Should the parser also parse attributes if it supports it? |
private boolean |
withElementComments
Should the parser also parse comments of elements (and possibly attributes)? |
Constructor Summary | |
---|---|
private |
RuntimeProperties()
|
Method Summary | |
---|---|
java.awt.Color |
getAttributeColor()
|
java.awt.Font |
getAttributeFont()
|
java.lang.String |
getCommentText()
A comment text to write on the diagram |
java.awt.Color |
getCommentTextColor()
Color of the diagram comment |
java.awt.Font |
getCommentTextFont()
Font of the diagram comment |
java.awt.Font |
getFont()
Font object for the normal size font |
int |
getFontHeight()
Height of the normal size font |
java.awt.FontMetrics |
getFontMetrics()
Font metrics for the normal size font |
java.lang.String |
getFontName()
Name of the font for the element names |
java.awt.Font |
getFontSmall()
Font object for the small font used by cardinalities |
java.lang.String |
getFontSmallName()
Name of the font used for small characters |
static RuntimeProperties |
getInstance()
Obtain the singleton instance |
java.awt.Color |
getTextColor()
The Color of the text (element name, cardinality) This needs to be given as 24-bit rgb color number in the preferences file. |
boolean |
isCommentTextOn()
Is the comment text from the properties visible by default |
boolean |
isOptimizeDrawing()
Should the drawing of the elements be more condensed? |
boolean |
isWithAttributes()
|
boolean |
isWithElementComments()
|
void |
loadProperties(java.lang.String propertiesLocation,
boolean debug)
Load properties from a file to initialize some system properties. |
void |
setAttributeColor(java.awt.Color attributeColor)
|
void |
setAttributeFont(java.awt.Font attributeFont)
|
void |
setCommentText(java.lang.String commentText)
A comment text to write on the diagram |
void |
setCommentTextColor(java.awt.Color commentTextColor)
Color of the diagram comment |
void |
setCommentTextFont(java.awt.Font commentTextFont)
Font of the diagram comment |
void |
setCommentTextOn(boolean commentTextOn)
Is the comment text from the properties visible by default |
void |
setFont(java.awt.Font font)
|
void |
setFontHeight(int fontHeight)
|
void |
setFontMetrics(java.awt.FontMetrics fontMetrics)
|
void |
setFontName(java.lang.String name)
|
void |
setFontSmall(java.awt.Font fontSmall)
|
void |
setFontSmallName(java.lang.String name)
|
void |
setOptimizeDrawing(boolean optimizeDrawing)
Should the drawing of the elements be more condensed? |
void |
setTextColor(java.awt.Color textColor)
|
void |
setWithAttributes(boolean withAttributes)
|
void |
setWithElementComments(boolean withElementComments)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ERR_STRING
private static volatile RuntimeProperties properties
private java.awt.Font fontSmall
private java.awt.FontMetrics fontMetrics
private int fontHeight
private java.awt.Color textColor
private java.lang.String commentText
private boolean commentTextOn
private java.awt.Font commentTextFont
private java.awt.Color commentTextColor
private java.awt.Font attributeFont
private java.awt.Color attributeColor
private boolean optimizeDrawing
private java.lang.String FONT_SMALL_NAME
private java.lang.String FONT_NORMAL_NAME
private java.awt.Font font
private boolean withAttributes
private boolean withElementComments
Constructor Detail |
---|
private RuntimeProperties()
Method Detail |
---|
public static RuntimeProperties getInstance()
public java.lang.String getFontSmallName()
Font.decode(String)
public void setFontSmallName(java.lang.String name)
public java.lang.String getFontName()
Font.decode(String)
public void setFontName(java.lang.String name)
public int getFontHeight()
public void setFontHeight(int fontHeight)
public java.awt.FontMetrics getFontMetrics()
public void setFontMetrics(java.awt.FontMetrics fontMetrics)
public java.awt.Font getFontSmall()
public void setFontSmall(java.awt.Font fontSmall)
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public java.awt.Color getTextColor()
Color.decode(String)
public void setTextColor(java.awt.Color textColor)
public java.lang.String getCommentText()
public void setCommentText(java.lang.String commentText)
commentText
- the commentText to setpublic boolean isCommentTextOn()
getCommentText()
public void setCommentTextOn(boolean commentTextOn)
commentTextOn
- the commentTextOn to setpublic java.awt.Font getCommentTextFont()
getCommentText()
public void setCommentTextFont(java.awt.Font commentTextFont)
commentTextFont
- the commentTextFont to setpublic java.awt.Color getCommentTextColor()
getCommentText()
public void setCommentTextColor(java.awt.Color commentTextColor)
commentTextColor
- the commentTextColor to setpublic boolean isOptimizeDrawing()
public void setOptimizeDrawing(boolean optimizeDrawing)
optimizeDrawing
- the optimizeDrawing to setpublic void loadProperties(java.lang.String propertiesLocation, boolean debug)
propertiesLocation
- The location of the x2svg properties file, if null, try to load
from x2svg.properties in current directory, else try to load from classpath.debug
- Should additional debugging output be written to stdout?public java.awt.Font getAttributeFont()
public void setAttributeFont(java.awt.Font attributeFont)
attributeFont
- the attributeFont to setpublic java.awt.Color getAttributeColor()
public void setAttributeColor(java.awt.Color attributeColor)
attributeColor
- the attributeColor to setpublic boolean isWithAttributes()
public void setWithAttributes(boolean withAttributes)
withAttributes
- the withAttributes to setpublic boolean isWithElementComments()
public void setWithElementComments(boolean withElementComments)
withElementComments
- the withElementComments to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |