Package com.jbstrap.ui.bootstrap
Class Color
java.lang.Object
com.jbstrap.ui.bootstrap.Color
- All Implemented Interfaces:
StyleElement
Colors
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
static final Color
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the style setting on the specified componentvoid
Applies the style setting to the specified component with the specified type.static Color
fromHexCode
(String colorCode) Creates theColor
based on the hexadecimal color codes in the parameter.static Color
static Color
fromRGB
(int red, int green, int blue) Creates aColor
object from RGB codes.Gets the color name in a text format.getName()
Gets the color name.Gets the Bootstrap style class namegetStyleClassName
(ColorType type) Gets the Bootstrap style class name.boolean
Checks if the color can be used as a background color.boolean
Checks if the color can be used as a font color.void
Remove style settings from the componentvoid
Removes the style setting from the specified component with the specified type.toString()
static Color[]
values()
-
Field Details
-
PRIMARY
-
SECONDARY
-
SUCCESS
-
DANGER
-
WARNING
-
INFO
-
LIGHT
-
DARK
-
WHITE
-
MUTED
-
BLACK_50
-
WHITE_50
-
BODY
-
TRANSPARENT
-
ALICE_BLUE
-
ANTIQUE_WHITE
-
AQUA
-
AQUAMARINE
-
AZURE
-
BEIGE
-
BISQUE
-
CSS_BLACK
-
BLANCHED_ALMOND
-
BLUE
-
BLUE_VIOLET
-
BROWN
-
BURLY_WOOD
-
CADET_BLUE
-
CHARTREUSE
-
CHOCOLATE
-
CORAL
-
CORNFLOWER_BLUE
-
CORNSILK
-
CRIMSON
-
CYAN
-
DARK_BLUE
-
DARK_CYAN
-
DARK_GOLDEN_ROD
-
DARK_GRAY
-
DARK_GREY
-
DARK_GREEN
-
DARK_KHAKI
-
DARK_MAGENTA
-
DARK_OLIVE_GREEN
-
DARK_ORANGE
-
DARK_ORCHID
-
DARK_RED
-
DARK_SALMON
-
DARK_SEA_GREEN
-
DARK_SLATE_BLUE
-
DARK_SLATE_GRAY
-
DARK_SLATE_GREY
-
DARK_TURQUOISE
-
DARK_VIOLET
-
DEEP_PINK
-
DEEP_SKY_BLUE
-
DIM_GRAY
-
DIM_GREY
-
DODGER_BLUE
-
FIRE_BRICK
-
FLORAL_WHITE
-
FOREST_GREEN
-
FUCHSIA
-
GAINSBORO
-
GHOST_WHITE
-
GOLD
-
GOLDEN_ROD
-
GRAY
-
GREY
-
GREEN
-
GREEN_YELLOW
-
HONEY_DEW
-
HOT_PINK
-
INDIAN_RED
-
INDIGO
-
IVORY
-
KHAKI
-
LAVENDER
-
LAVENDER_BLUSH
-
LAWN_GREEN
-
LEMON_CHIFFON
-
LIGHT_BLUE
-
LIGHT_CORAL
-
LIGHT_CYAN
-
LIGHT_GOLDEN_ROD_YELLOW
-
LIGHT_GRAY
-
LIGHT_GREY
-
LIGHT_GREEN
-
LIGHT_PINK
-
LIGHT_SALMON
-
LIGHT_SEA_GREEN
-
LIGHT_SKY_BLUE
-
LIGHT_SLATE_GRAY
-
LIGHT_SLATE_GREY
-
LIGHT_STEEL_BLUE
-
LIGHT_YELLOW
-
LIME
-
LIME_GREEN
-
LINEN
-
MAGENTA
-
MAROON
-
MEDIUM_AQUA_MARINE
-
MEDIUM_BLUE
-
MEDIUM_ORCHID
-
MEDIUM_PURPLE
-
MEDIUM_SEAG_REEN
-
MEDIUM_SLATE_BLUE
-
MEDIUM_SPRING_GREEN
-
MEDIUM_TURQUOISE
-
MEDIUM_VIOLET_RED
-
MIDNIGHT_BLUE
-
MINT_CREAM
-
MISTY_ROSE
-
MOCCASIN
-
NAVAJO_WHITE
-
NAVY
-
OLDLACE
-
OLIVE
-
OLIVE_DRAB
-
ORANGE
-
ORANGERED
-
ORCHID
-
PALE_GOLDEN_ROD
-
PALE_GREEN
-
PALE_TURQUOISE
-
PALE_VIOLET_RED
-
PAPAYA_WHIP
-
PEACH_PUFF
-
PERU
-
PINK
-
PLUM
-
POWDER_BLUE
-
PURPLE
-
REBECCA_PURPLE
-
RED
-
ROSY_BROWN
-
ROYAL_BLUE
-
SADDLE_BROWN
-
SALMON
-
SANDY_BROWN
-
SEA_GREEN
-
SEA_SHELL
-
SIENNA
-
SILVER
-
SKY_BLUE
-
SLATE_BLUE
-
SLATE_GRAY
-
SLATE_GREY
-
SNOW
-
SPRING_GREEN
-
STEEL_BLUE
-
TAN
-
TEAL
-
THISTLE
-
TOMATO
-
TURQUOISE
-
VIOLET
-
WHEAT
-
CSS_WHITE
-
WHITE_SMOKE
-
YELLOW
-
YELLOW_GREEN
-
-
Method Details
-
apply
Apply the style setting on the specified component- Specified by:
apply
in interfaceStyleElement
- Parameters:
component
- The component
-
remove
Remove style settings from the component- Specified by:
remove
in interfaceStyleElement
- Parameters:
component
- The component
-
getStyleClassName
Gets the Bootstrap style class name- Specified by:
getStyleClassName
in interfaceStyleElement
- Returns:
- The style class name or
null
if is not style class for the style settings
-
getStyleClassName
Gets the Bootstrap style class name.- Parameters:
type
- Style type- Returns:
- The style class name or
null
if no style class corresponds to the settings
-
getColorCode
Gets the color name in a text format. E.g. red, aqua, etc.- Returns:
- Color name
-
apply
Applies the style setting to the specified component with the specified type.- Parameters:
component
- The componenttype
- Color type
-
remove
Removes the style setting from the specified component with the specified type.- Parameters:
component
- The componenttype
- Color type
-
fromRGB
Creates aColor
object from RGB codes. The RGB color values are used to set the text and the background color for theColor
object.- Parameters:
red
- Red colorgreen
- Green colorblue
- Blue color- Returns:
- The created
Color
object
-
fromHexCode
Creates theColor
based on the hexadecimal color codes in the parameter. The hexa color values are used to set the text and the background color for theColor
object.- Parameters:
colorCode
- Hexa color code (# optional)- Returns:
- The created
Color
object
-
fromName
- Parameters:
name
- The name of the button type- Returns:
- The button type corresponding to the name or
null
, if not found
-
values
-
isTextColor
public boolean isTextColor()Checks if the color can be used as a font color.- Returns:
- If
true
, the color can be used as a font color, otherwise not
-
isBackgroundColor
public boolean isBackgroundColor()Checks if the color can be used as a background color.- Returns:
- If
true
, the color can be used as a background color
-
getName
Gets the color name.- Returns:
- Color name
-
toString
-