01: package org.wings;
02:
03: import java.util.List;
04: import java.util.Set;
05: import java.io.Serializable;
06:
07: import org.wings.plaf.Update;
08:
09: /**
10: * A reload manger is responsible for managing reloads and updates of components as
11: * well as for invalidating the epoch of frames whose contained components changed.
12: *
13: * @author Stephan Schuster
14: * @version $Revision: 3914 $
15: */
16: public interface ReloadManager extends Serializable {
17:
18: /**
19: * Marks an entire component change.
20: * @param component the component that changed
21: */
22: void reload(SComponent component);
23:
24: /**
25: * Inserts an update for a component.
26: * @param component the component that changed
27: * @param update the update for this component
28: */
29: void addUpdate(SComponent component, Update update);
30:
31: /**
32: * Returns a (filtered) list of all updates.
33: * @return a list of all needed updates
34: */
35: List<Update> getUpdates();
36:
37: /**
38: * Returns a set of all components marked dirty.
39: * @return a set of all dirty components
40: */
41: Set<SComponent> getDirtyComponents();
42:
43: /**
44: * Return a set of all frames marked dirty.
45: * @return a set of all dirty frames
46: */
47: Set<SFrame> getDirtyFrames();
48:
49: /**
50: * Invalidates all frames containing dirty components.
51: */
52: void invalidateFrames();
53:
54: /**
55: * Notifies the CG's of dirty components about changes.
56: */
57: void notifyCGs();
58:
59: /**
60: * Clears all requested reloads and updates.
61: */
62: void clear();
63:
64: /**
65: * Returns the current operation mode.
66: * @return true if in update mode
67: */
68: boolean isUpdateMode();
69:
70: /**
71: * Sets the current operation mode.
72: * @param enabled true to enable update mode
73: */
74: void setUpdateMode(boolean enabled);
75:
76: /**
77: * Returns the current suppress mode.
78: * @return true if in all reloads are suppressed
79: */
80: boolean isSuppressMode();
81:
82: /**
83: * Sets the current suppress mode.
84: * @param enabled true to suppress all reloads
85: */
86: void setSuppressMode(boolean enabled);
87:
88: /**
89: * Returns a reload suggestion.
90: * @return true if a reload is required
91: */
92: boolean isReloadRequired(SFrame frame);
93:
94: }
|