MiG InfoCom MiG Calendar Getting Started Guide User Manual
Page 24
![background image](https://www.manualsdir.com/files/798671/content/doc024.png)
MiG InfoCom AB
new CategoryFilter(mark, false, false),
new CategoryFilter(susan, false, false),
new CategoryFilter(michael, false, false)
};
defaultDateArea.setRowFilters(peopleFilter);
dateAreaContainer.revalidate();
The date area does not by default show a category header to
show the names of the filtered rows from above, one have to
add a
SubRowGridHeader
for that. This header has much in
common with the date headers, only it shows a sub row
property (such as the name) rather than the date. They are
very flexible in that a category header can contain multiple
rows with cells that can be merged in very flexible ways. The
simplest way to experiment with this is to use the
North/WestCategoryHeader
JavaBeans with a visual IDE
such as JFormDesigner or netBeans.
Here is some code to set up an example category header. It
is taken from the demo application and can be viewed in a
context there.
DateArea dateArea = mainCalendarContainer.getDateArea();
int size = 15;
SubRowGridHeader header = new SubRowGridHeader(dateArea, 1, new Color(220, 220, 220),
size, 1, SwingConstants.TOP);
header.setBackgroundPaint(new ShapeGradientPaint(new Color(230, 230, 230),
new Color(250, 250, 250), 90, 1, 0.5f, false));
DefaultSubRowLevel row = new DefaultSubRowLevel("$gridRowName$",
new AtFixed(size),
AbsRect.FILL,
null,
Color.DARK_GRAY,
null,
999,
new Font("sansserif", Font.PLAIN, 11),
null,
AtFraction.CENTER,
AtFraction.CENTER,
TextAShape.TYPE_SINGE_LINE,
DefaultSubRowLevel.APPLY_TO_ALL
);
row.setTextAntiAlias(GfxUtil.AA_HINT_ON);
header.addDecorator(new SubRowHeaderDecorator(header, row, 100, true));
header.addDecorator(new GridLineDecorator(header, 110));
mainCalendarContainer.setHeader(header, DateAreaContainer.NORTH, 1);
MiG Calendar Getting Started Guide
Page 24 / 31