File: SourceListModelListener.java

package info (click to toggle)
mac-widgets 0.10.0%2Bsvn416-dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,968 kB
  • ctags: 2,003
  • sloc: java: 9,909; makefile: 13; sh: 12
file content (63 lines) | stat: -rw-r--r-- 2,062 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.explodingpixels.macwidgets;

/**
 * An interface for listening to changes in a {@link SourceListModel}.
 */
public interface SourceListModelListener {

    /**
     * Called when a category is adeded.
     *
     * @param category the category that was removed.
     * @param index    the index at which the category was added.
     */
    void categoryAdded(SourceListCategory category, int index);

    /**
     * Called when a category is removed.
     *
     * @param category the category that was removed.
     */
    void categoryRemoved(SourceListCategory category);

    /**
     * Called when an item is added to a category.
     *
     * @param itemAdded the item that was added.
     * @param category  the category that the item was added to.
     * @param index     the index at which the category was added.
     */
    void itemAddedToCategory(SourceListItem itemAdded, SourceListCategory category, int index);

    /**
     * Called when an item is removed from a category.
     *
     * @param itemRemoved the item that was removed.
     * @param category    the category that the item was removed from.
     */
    void itemRemovedFromCategory(SourceListItem itemRemoved, SourceListCategory category);

    /**
     * Called when an item is added to another item.
     *
     * @param itemAdded  the item that was added.
     * @param parentItem the item that the child item was added to.
     * @param index      the index at which the category was added.
     */
    void itemAddedToItem(SourceListItem itemAdded, SourceListItem parentItem, int index);

    /**
     * Called when an item is removed from another item.
     *
     * @param itemRemoved the item that was removed.
     * @param parentItem  the item that the child item was removed from.
     */
    void itemRemovedFromItem(SourceListItem itemRemoved, SourceListItem parentItem);

    /**
     * Called when an item's content changes (e.g. text, icon etc.).
     *
     * @param item the item that was changed.
     */
    void itemChanged(SourceListItem item);
}