MiG InfoCom AB
ThemeDateArea.reloadStartupStructureFromTheme();
ThemeDateArea.reloadFromTheme();
ThemeDateArea.recreateAll();
Headers
There are no headers in the default theme, so let's add one.
Since we normally want to set the headers before the
container is created, so it doesn't have to be recreated
directly, we change the code a bit to create the theme
beforehand.
Theme theme = new CalendarTheme("myContext");
CellDecorationRow headerRow = new CellDecorationRow(
DateRange.RANGE_TYPE_DAY,
new DateFormatList("E' 'dd'/'M"),
new AtFixed(20f),
new Font("SansSerif", Font.PLAIN, 12)
);
GridLineRepetition gridLines = new GridLineRepetition(1, new Color(220, 220, 220));
String mainKey = CalendarTheme.KEY_HEADER_;
theme.addToList(mainKey + "North/CellDecorationRows#", headerRow);
theme.addToList(mainKey + "North/GridLines/PrimaryDim#", gridLines);
container = new ThemeDateAreaContainer("myContext");
The code above are using the simplest of the constructors to
MiG Calendar Getting Started Guide Page 11 / 31
Comentários a estes Manuais