|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.ui.gui.dot.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.
Field Summary | |
---|---|
private static DotColorModel.ColorModel |
DEFAULT_COLOR
|
private static DotColorModel.ColorModel |
DEFAULT_HIGHLIGHT
|
private DotColorModel |
highlight
|
private DotColorModel |
normal
|
Constructor Summary | |
---|---|
DotColorTheme()
Default constructor for DotColorTheme class which initially uses the default color theme. |
|
DotColorTheme(DotColorModel.ColorModel color)
Constructor for DotColorTheme class. |
|
DotColorTheme(DotColorModel.ColorModel color,
DotColorModel.ColorModel highlight)
Constructor for DotColorTheme class. |
Method Summary | |
---|---|
void |
changeColor(DotColorModel.ColorModel color)
Normal color changer. |
void |
changeHighlight(DotColorModel.ColorModel highlight)
Highlight color changer. |
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 DotColorModel normal
private DotColorModel highlight
private static final DotColorModel.ColorModel DEFAULT_HIGHLIGHT
private static final DotColorModel.ColorModel DEFAULT_COLOR
Constructor Detail |
---|
public DotColorTheme(DotColorModel.ColorModel color, DotColorModel.ColorModel highlight)
color
- Normal color of the graph.highlight
- Color of the highlighted elements.public DotColorTheme(DotColorModel.ColorModel color)
color
- Normal color of the graph.public DotColorTheme()
Method Detail |
---|
public void changeColor(DotColorModel.ColorModel color)
color
- New normal color.public void changeHighlight(DotColorModel.ColorModel highlight)
highlight
- New highlight color.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 |