ucot.ui.gui.dot
Class DotColorModel

java.lang.Object
  extended by ucot.ui.gui.dot.DotColorModel

public class DotColorModel
extends java.lang.Object

Class that implements a color model used in dot graph drawing environment. This model can be used for both main colors and highlights.

Author:
UCOT

Nested Class Summary
static class DotColorModel.ColorModel
          ColorModel sets available for using with Dot
 
Field Summary
private static DotColorModel.ColorModel DEFAULT_COLOR
           
private  java.lang.String edgeColor
           
private  java.lang.String fillColor
           
private  java.lang.String fontColor
           
private  DotColorModel.ColorModel model
           
 
Constructor Summary
private DotColorModel(java.lang.String drawColor, java.lang.String fillColor)
           Constructor for quick color model initialization.
private DotColorModel(java.lang.String edgeColor, java.lang.String fillColor, java.lang.String fontColor)
           Constructor which sets all the colors as specified.
 
Method Summary
private static DotColorModel blackOnWhite()
           This static method creates a black text on white background dot color model.
private static DotColorModel blue()
           This static method creates a blue dot color model.
static DotColorModel color(DotColorModel.ColorModel colorModel)
           Static method for creating a color model from available sets.
static DotColorModel color(java.lang.String colorModel)
           Static method for creating a color model from available sets.
 java.lang.String getEdgeColor()
           Method for acquiring the edge color.
 java.lang.String getFillColor()
           Method for acquiring the fill color.
 java.lang.String getFontColor()
           Method for acquiring the font color.
 java.lang.String getModel()
           Method for acquiring the name of the current model.
private static DotColorModel green()
           This static method creates a green dot color model.
private static DotColorModel red()
           This static method creates a red dot color model.
private static DotColorModel whiteOnBlack()
           This static method creates a white text on black background dot color model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLOR

private static final DotColorModel.ColorModel DEFAULT_COLOR

edgeColor

private java.lang.String edgeColor

fillColor

private java.lang.String fillColor

fontColor

private java.lang.String fontColor

model

private DotColorModel.ColorModel model
Constructor Detail

DotColorModel

private DotColorModel(java.lang.String edgeColor,
                      java.lang.String fillColor,
                      java.lang.String fontColor)

Constructor which sets all the colors as specified.

Parameters:
edgeColor - Color of edges in the graph.
fillColor - Color for filling the elements on the graph. Can also be used for graph background.
fontColor - Text color.

DotColorModel

private DotColorModel(java.lang.String drawColor,
                      java.lang.String fillColor)

Constructor for quick color model initialization.

Parameters:
drawColor - Color for all edges and text in the graph.
fillColor - Background color for the whole graph and all elements.
Method Detail

getEdgeColor

public java.lang.String getEdgeColor()

Method for acquiring the edge color.

Returns:
Edge color.

getFillColor

public java.lang.String getFillColor()

Method for acquiring the fill color.

Returns:
Fill color.

getFontColor

public java.lang.String getFontColor()

Method for acquiring the font color.

Returns:
Font color.

getModel

public java.lang.String getModel()

Method for acquiring the name of the current model.

Returns:
Color model's name.

blue

private static DotColorModel blue()

This static method creates a blue dot color model.

Returns:
Blue dot color model.

green

private static DotColorModel green()

This static method creates a green dot color model.

Returns:
Green dot color model.

blackOnWhite

private static DotColorModel blackOnWhite()

This static method creates a black text on white background dot color model.

Returns:
Black text on white background dot color model.

whiteOnBlack

private static DotColorModel whiteOnBlack()

This static method creates a white text on black background dot color model.

Returns:
White text on black background dot color model.

red

private static DotColorModel red()

This static method creates a red dot color model.

Returns:
Red dot color model.

color

public static DotColorModel color(DotColorModel.ColorModel colorModel)

Static method for creating a color model from available sets.


color

public static DotColorModel color(java.lang.String colorModel)

Static method for creating a color model from available sets.