Education/Projects/JetpackForLearning/Profiles/Hoovernotes: Difference between revisions

Jump to navigation Jump to search
Line 71: Line 71:


There are 3 classes:
There are 3 classes:
- HooverNotesView: Updates the slide bar.
* HooverNotesView: Updates the slide bar.
- HooverNotesController: Contains the main business logic.
* HooverNotesController: Contains the main business logic.
- HooverNotesStorage: Used for synchronizing the data maintained in the GUI with permanent storage.
* HooverNotesStorage: Used for synchronizing the data maintained in the GUI with permanent storage.


These 3 components interchange information about HooverSheet, HooverPage and HooverNote data objects (DOs). A HooverSheet contains a HooverPage which contains a HooverNote. Each of these objects is identified by randomly generatd GUIDs.
These 3 components interchange information about HooverSheet, HooverPage and HooverNote data objects (DOs). A HooverSheet contains a HooverPage which contains a HooverNote. Each of these objects is identified by randomly generatd GUIDs.


When constructing the GUI, each of these DOs is represented by the following three DIV elements:
When constructing the GUI, each of these DOs is represented by the following three DIV elements:
- a container, representing the whole object
* a container, representing the whole object
- controls, containing the GUI controls such as buttons.
* controls, containing the GUI controls such as buttons.
- content, which contains the actual content - child elements in the case of the 2 upper-level DOs and the actual annotation in the case of a HooverNote.
* content, which contains the actual content - child elements in the case of the 2 upper-level DOs and the actual annotation in the case of a HooverNote.


Each ID is constructed from a prefix that depends on the desired element type and the GUIDs of its predecessors. For instance, the container of a HooverNote would have an ID of hncontainer_sh_sheetguid_p_pageguid_n_noteguid, whereas the content of a HooverSheet would be identified by hncontent_sh_sheetguid.
Each ID is constructed from a prefix that depends on the desired element type and the GUIDs of its predecessors. For instance, the container of a HooverNote would have an ID of hncontainer_sh_sheetguid_p_pageguid_n_noteguid, whereas the content of a HooverSheet would be identified by hncontent_sh_sheetguid.

Navigation menu