Mig-infocom MiG Calendar Getting Started Guide Uživatelský manuál Strana 23

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 31
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 22
MiG InfoCom AB
Filter Rows and Categories
Every column/row in the grid can be divided into sub rows.
These sub rows can be divided further into sub rows so it is
basically hierarchical. These sub rows are usually filtered in
some way to only show a certain kind of activities so they
appear separate from each other. This is for instance how the
TV-schedule is done in the demo application.
You can write your own filter code to filter on whatever, but
normally Categories are used as filters. Since categories are
also hierarchical it is quite easy to map a category tree, or
part there of, to sub rows.
The simplest way to do this is to set CategoryFilters on
the DefaultDateArea. The creator class that creates the
DateGrid will pick this up and create sub rows
automatically. You can also exchange the date grid creator
itself to create the rows as you want but that is an advanced
approach.
Below is a code snippet that shows how to set up three sub
rows rows in every main row in the grid.
// (id, name, parentID)
Category mark = new Category(new Integer(0), "Mark", null);
Category susan = new Category(new Integer(1), "Susan", null);
Category michael = new Category(new Integer(2), "Michael", null);
// (category, includeSubCategories, acceptUncategorized)
CategoryFilter[] peopleFilter = new CategoryFilter[] {
MiG Calendar Getting Started Guide Page 23 / 31
Illustration 13 Visually rounded to day
Zobrazit stránku 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Komentáře k této Příručce

Žádné komentáře