|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.util.JaxoColor
public final class JaxoColor
Definitions and conversions for the colors of the LaTeX
colordvi
package (approximately) and a predefined set of
gray shades.
Field Summary | |
---|---|
static int |
ALL_COLORS_MODE
Any Color can be chosen. |
static Color |
APRICOT
The color Apricot. |
static Color |
AQUAMARINE
The color Aquamarine. |
static Color |
BITTERSWEET
The color Bittersweet. |
static Color |
BLACK
The color Black. |
static Color |
BLUE
The color Blue. |
static Color |
BLUE_GREEN
The color BlueGreen. |
static Color |
BLUE_VIOLET
The color BlueViolet. |
static Color |
BRICK_RED
The color BrickRed. |
static Color |
BROWN
The color Brown. |
static Color |
BURNT_ORANGE
The color BurntOrange. |
static Color |
CADET_BLUE
The color CadetBlue. |
static Color |
CARNATION_PINK
The color CarnationPink. |
static Color |
CERULEAN
The color Cerulean. |
static Color |
CORNFLOWER_BLUE
The color CornflowerBlue. |
static Color |
CYAN
The color Cyan. |
static Color |
DANDELION
The color Dandelion. |
static Color |
DARK_ORCHID
The color DarkOrchid. |
static Color |
EMERALD
The color Emerald. |
static Color |
FOREST_GREEN
The color ForestGreen. |
static Color |
FUCHSIA
The color Fuchsia. |
static Color |
GOLDEN_ROD
The color Goldenrod. |
static Color |
GRAY
The color Gray. |
static Color |
GRAYSCALE105
The color GrayScale105. |
static Color |
GRAYSCALE120
The color GrayScale120. |
static Color |
GRAYSCALE135
The color GrayScale135. |
static Color |
GRAYSCALE15
The color GrayScale15. |
static Color |
GRAYSCALE150
The color GrayScale150. |
static Color |
GRAYSCALE165
The color GrayScale165. |
static Color |
GRAYSCALE180
The color GrayScale180. |
static Color |
GRAYSCALE195
The color GrayScale195. |
static Color |
GRAYSCALE210
The color GrayScale210. |
static Color |
GRAYSCALE225
The color GrayScale225. |
static Color |
GRAYSCALE240
The color GrayScale240. |
static Color |
GRAYSCALE30
The color GrayScale30. |
static Color |
GRAYSCALE45
The color GrayScale45. |
static Color |
GRAYSCALE60
The color GrayScale60. |
static Color |
GRAYSCALE75
The color GrayScale75. |
static Color |
GRAYSCALE90
The color GrayScale90. |
static Color |
GREEN
The color Green. |
static Color |
GREEN_YELLOW
The color GreenYellow. |
static int |
JAXO_COLORS_MODE
All Colors defined in JaxoColor can be chosen. |
static int |
JAXO_COLORS_NO_GRAYSCALES_MODE
Colors defined in JaxoColor except grayscales can be chosen. |
static Color |
JUNGLE_GREEN
The color JungleGreen. |
static Color |
LAVENDER
The color Lavender. |
static Color |
LIME_GREEN
The color LimeGreen. |
static Color |
MAGENTA
The color Magenta. |
static Color |
MAHOGANY
The color Mahagony. |
static Color |
MAROON
The color Maroon. |
static Color |
MELON
The color Melon. |
static Color |
MIDNIGHT_BLUE
The color MidnightBlue. |
static Color |
MULBERRY
The color Mulberry. |
static Color |
NAVY_BLUE
The color NavyBlue. |
static Color |
OLIVE_GREEN
The color OliveGreen. |
static Color |
ORANGE
The color Orange. |
static Color |
ORANGE_RED
The color OrangeRed. |
static Color |
ORCHID
The color Orchid. |
static Color |
PEACH
The color Peach. |
static Color |
PERIWINKLE
The color Periwinkle. |
static Color |
PINE_GREEN
The color PineGreen. |
static Color |
PLUM
The color Plum. |
static Color |
PROCESS_BLUE
The color ProcessBlue. |
static Color |
PURPLE
The color Purple. |
static Color |
RAWSIENNA
The color RawSienna. |
static Color |
RED
The color Red. |
static Color |
RED_ORANGE
The color RedOrange. |
static Color |
RED_VIOLET
The color RedViolet. |
static Color |
RHODAMINE
The color Rhodamine. |
static Color |
ROYAL_BLUE
The color RoyalBlue. |
static Color |
ROYAL_PURPLE
The color RoyalPurple. |
static Color |
RUBINE_RED
The color RubineRed. |
static Color |
SALMON
The color Salmon. |
static Color |
SEA_GREEN
The color SeaGreen. |
static Color |
SEPIA
The color Sepia. |
static Color |
SKY_BLUE
The color SkyBlue. |
static Color |
SPRING_GREEN
The color SpringGreen. |
static Color |
TAN
The color Tan. |
static Color |
TEAL_BLUE
The color TealBlue. |
static Color |
THISTLE
The color Thistle. |
static Color |
TURQUOISE
The color Turquoise. |
static Color |
VIOLET
The color Violet. |
static Color |
VIOLET_RED
The color VioletRed. |
static Color |
WHITE
The color White. |
static Color |
WILDSTRAWBERRY
The color WildStrawberry. |
static Color |
YELLOW
The color Yellow. |
static Color |
YELLOW_GREEN
The color YellowGreen. |
static Color |
YELLOW_ORANGE
The color YellowOrange. |
Method Summary | |
---|---|
static Color |
getClosestColorTo(Color refcolor,
int mode)
Return the Color closest (in the specified mode) to the given color. |
static Color |
getColor(int i)
Returns the color at index i of the colorList. |
static Color |
getColor(String cName)
Returns the color corresponding to the name cName, or the default color if none. |
static Color |
getColor(String cName,
int mode)
Returns the color corresponding to the name cName, or the default color if none. |
static int |
getColorCount()
Returns the number of colors defined by JaxoColor. |
static String |
getColorName(Color color)
Returns the name of the closest defined color to 'color'. |
static String |
getColorName(Color color,
int space)
Returns the name of the closest defined color (in the mode) color. |
static String |
getColorName(int i)
Returns the name of the color at index i in the colorList. |
static Color |
getDefaultColor()
Returns the current default color. |
static Color |
getDefaultFillColor(Color lineColor)
Returns the current default fill color for the given line color. |
static Color |
getGrayScaleColor(float f)
Returns the grayscale that corresponds to the float value f. |
static float |
getGrayScaleFloat(Color color)
Returns a string representation of a Color that gives the grayscale of color, or sets it to '0.0' (black), if color is not a grayscale. |
static String |
getLatexColorCommand(Color color)
Returns a String containing the LaTex color command (as used by the package colordvi) to set the color. |
static boolean |
isDefinedColor(Color color)
Checks whether the given color is a defined Color. |
static boolean |
isDefinedColor(Color color,
int mode)
Checks whether the given color is a defined Color in the given mode. |
static boolean |
isDefinedColorName(String cName)
Checks whether the given name is for a defined Color. |
static boolean |
isDefinedColorName(String cName,
int mode)
Checks whether the given name is for a Color defined in the given mode. |
static boolean |
isGrayScale(Color color)
Checks whether the 'color' is closest to one of the gray scales defined in this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int JAXO_COLORS_MODE
public static final int JAXO_COLORS_NO_GRAYSCALES_MODE
public static final int ALL_COLORS_MODE
public static final Color GREEN_YELLOW
public static final Color YELLOW
public static final Color GOLDEN_ROD
public static final Color DANDELION
public static final Color APRICOT
public static final Color PEACH
public static final Color MELON
public static final Color YELLOW_ORANGE
public static final Color ORANGE
public static final Color BURNT_ORANGE
public static final Color BITTERSWEET
public static final Color RED_ORANGE
public static final Color MAHOGANY
public static final Color MAROON
public static final Color BRICK_RED
public static final Color RED
public static final Color ORANGE_RED
public static final Color RUBINE_RED
public static final Color WILDSTRAWBERRY
public static final Color SALMON
public static final Color CARNATION_PINK
public static final Color MAGENTA
public static final Color VIOLET_RED
public static final Color RHODAMINE
public static final Color MULBERRY
public static final Color RED_VIOLET
public static final Color FUCHSIA
public static final Color LAVENDER
public static final Color THISTLE
public static final Color ORCHID
public static final Color DARK_ORCHID
public static final Color PURPLE
public static final Color PLUM
public static final Color VIOLET
public static final Color ROYAL_PURPLE
public static final Color BLUE_VIOLET
public static final Color PERIWINKLE
public static final Color CADET_BLUE
public static final Color CORNFLOWER_BLUE
public static final Color MIDNIGHT_BLUE
public static final Color NAVY_BLUE
public static final Color ROYAL_BLUE
public static final Color BLUE
public static final Color CERULEAN
public static final Color CYAN
public static final Color PROCESS_BLUE
public static final Color SKY_BLUE
public static final Color TURQUOISE
public static final Color TEAL_BLUE
public static final Color AQUAMARINE
public static final Color BLUE_GREEN
public static final Color EMERALD
public static final Color JUNGLE_GREEN
public static final Color SEA_GREEN
public static final Color GREEN
public static final Color FOREST_GREEN
public static final Color PINE_GREEN
public static final Color LIME_GREEN
public static final Color YELLOW_GREEN
public static final Color SPRING_GREEN
public static final Color OLIVE_GREEN
public static final Color RAWSIENNA
public static final Color SEPIA
public static final Color BROWN
public static final Color TAN
public static final Color GRAY
public static final Color BLACK
public static final Color GRAYSCALE15
public static final Color GRAYSCALE30
public static final Color GRAYSCALE45
public static final Color GRAYSCALE60
public static final Color GRAYSCALE75
public static final Color GRAYSCALE90
public static final Color GRAYSCALE105
public static final Color GRAYSCALE120
public static final Color GRAYSCALE135
public static final Color GRAYSCALE150
public static final Color GRAYSCALE165
public static final Color GRAYSCALE180
public static final Color GRAYSCALE195
public static final Color GRAYSCALE210
public static final Color GRAYSCALE225
public static final Color GRAYSCALE240
public static final Color WHITE
Method Detail |
---|
public static boolean isDefinedColor(Color color)
color
- A color.
public static boolean isDefinedColor(Color color, int mode)
color
- A color.mode
- the color mode.
public static boolean isDefinedColorName(String cName)
cName
- a color name
public static boolean isDefinedColorName(String cName, int mode)
cName
- a color name.mode
- the color mode.
public static int getColorCount()
public static Color getColor(int i)
i
- Index of the color to be returned
public static String getColorName(int i)
i
- Index of the color whose name is to be returned.
public static Color getDefaultColor()
BLACK
.public static Color getDefaultFillColor(Color lineColor)
lineColor
- The line color.
public static Color getColor(String cName)
cName
- The name of the color to be returned.
getDefaultColor()
public static Color getColor(String cName, int mode)
cName
- The name of the color to be returned.mode
- The mode defining the color space
public static String getColorName(Color color)
color
- Color whose name is to be returned.
public static String getColorName(Color color, int space)
color
- Color whose name is to be returned.space
- defining the allowed colors.
public static float getGrayScaleFloat(Color color)
color
- The color whose grayscale value is to be returned.
public static boolean isGrayScale(Color color)
color
- A color.
public static Color getGrayScaleColor(float f)
f
- A float between 0.f and 1.f
public static String getLatexColorCommand(Color color)
color
- The color to be set in the LaTex command.
public static Color getClosestColorTo(Color refcolor, int mode)
refcolor
- the color to be matched.mode
- mode to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |