|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.ui.gui.DotColorTheme
public class DotColorTheme
This class implements a color theme for dot markup language, which is useful for DotPanel when figuring out color strings. It is easy to change the color theme using the method 'changeToColorTheme' and giving it the identifier of the preferred color theme. All themes available currently have to be hard coded here because of the way how dot understands colors. TODO Make color themes more dynamic? TODO Add more color themes.
Nested Class Summary | |
---|---|
private static interface |
DotColorTheme.CallBack
|
Field Summary | |
---|---|
private java.lang.String |
backgroundColor
|
static int |
BLACK_ON_WHITE_WITH_BLUE_HIGHLIGHTS
|
static int |
BLACK_ON_WHITE_WITH_GREEN_HIGHLIGHTS
|
private static int |
DEFAULT_COLOR_THEME
|
private DotColorTheme.CallBack |
defaultColorTheme
|
private java.lang.String |
highlightEdgeColor
|
private java.lang.String |
highlightFillColor
|
private java.lang.String |
highlightFontColor
|
private java.lang.String |
normalEdgeColor
|
private java.lang.String |
normalFillColor
|
private java.lang.String |
normalFontColor
|
Constructor Summary | |
---|---|
DotColorTheme()
Default constructor for DotColorTheme class which initially uses the default color theme. |
|
DotColorTheme(int theme)
Constructor for DotColorTheme class. |
Method Summary | |
---|---|
private void |
changeToBlackOnWhiteWithBlueHighlights()
Change color theme to black text on white background with blue highlight colors. |
private void |
changeToBlackOnWhiteWithGreenHighlights()
Change color theme to black text on white background with green highlight colors. |
void |
changeToColorTheme(int newTheme)
Method for changing the color theme. |
java.awt.Color |
getBackgroundColorAsJavaObject()
Method for getting the background color of the graph as a java object. |
java.lang.String |
getBackgroundColorString()
Method for getting the background color of the whole graph in dot's syntax. |
java.lang.String |
getColorString(boolean isHighlighted)
Method for getting the appropriate color string for an entity based on its highlight status. |
java.lang.String |
getHighlightedColorString()
Method which formats highlighted item's color attributes into dot's syntax. |
java.lang.String |
getNormalColorString()
Method which formats normal item's color attributes into dot's syntax. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String highlightFillColor
private java.lang.String highlightFontColor
private java.lang.String highlightEdgeColor
private java.lang.String normalFillColor
private java.lang.String normalFontColor
private java.lang.String normalEdgeColor
private java.lang.String backgroundColor
public static final int BLACK_ON_WHITE_WITH_BLUE_HIGHLIGHTS
public static final int BLACK_ON_WHITE_WITH_GREEN_HIGHLIGHTS
private static final int DEFAULT_COLOR_THEME
private final DotColorTheme.CallBack defaultColorTheme
Constructor Detail |
---|
public DotColorTheme(int theme)
theme
- Initial color theme identifier.public DotColorTheme()
Method Detail |
---|
private void changeToBlackOnWhiteWithBlueHighlights()
private void changeToBlackOnWhiteWithGreenHighlights()
public void changeToColorTheme(int newTheme)
newTheme
- Identifier of the new theme.public java.lang.String getHighlightedColorString()
public java.lang.String getBackgroundColorString()
public java.lang.String getNormalColorString()
public java.lang.String getColorString(boolean isHighlighted)
isHighlighted
- Defines wether or not the returned
color string is supposed to be for an highlighted entity
or a normal entity.
public java.awt.Color getBackgroundColorAsJavaObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |