public final class CalendarActivityRamp extends InstanceStyles implements Serializable
In many calendars each provider uses different colors, for example owner calendar activities are blue, holiday calendar activities are red, and boss calendar activities are green. However a 'blue' calendar doesn't use a single shade of blue, instead it uses a blue color ramp, some areas are medium, light, or dark blue. A calendarActivityRamp provides styles for a ramp.
CalendarActivityRamp can be used with the activityStyles attribute on the calendar component.
Modifier and Type | Class and Description |
---|---|
static class |
CalendarActivityRamp.RampKey |
Constructor and Description |
---|
CalendarActivityRamp(Color veryDarkColor, Color darkColor, Color mediumColor) |
Modifier and Type | Method and Description |
---|---|
static CalendarActivityRamp |
getActivityRamp(CalendarActivityRamp.RampKey key)
Return a CalendarActivityRamp object based on a key name.
|
static CalendarActivityRamp |
getActivityRamp(Color representativeColor)
Return a CalendarActivityRamp object based on the representative color.
|
String |
getInlineStyle(String skinningKey) |
static List<Color> |
getRampColorKeys()
Each time this method is called the internal list is cloned, so cache the return value if possible
|
Color |
getRepresentativeColor()
this color represents the ramp as a whole and could be used to show in a provider 'legend' area or passed to an inputColor
|
getStyleClasses
public static List<Color> getRampColorKeys()
public static CalendarActivityRamp getActivityRamp(CalendarActivityRamp.RampKey key)
key
- the key to use to find a CalendarActivityRamp objectpublic static CalendarActivityRamp getActivityRamp(Color representativeColor)
representativeColor
- the key to use to find a CalendarActivityRamp objectpublic String getInlineStyle(String skinningKey)
getInlineStyle
in class InstanceStyles
skinningKey
- publicly documented skinning key, for example "af|inputText"public Color getRepresentativeColor()