A method, data processing system and computer program product for maintaining/updating managing keyboard navigation using a linked list. In particular, a Dynamic Tree Control Linkage (DTCL) utility creates a doubly linked list with list nodes having assigned values based on a tree control structure UI component. Each list node of the doubly linked list corresponds to a visible tree item of the tree structure UI component. Responding to a keyboard event signal, the DTCL utility finds a current list node corresponding to a first current tree item. The DTCL utility finds a next (i.e. previous or subsequent) list node corresponding to a next tree item. The DTCL utility detects a list node exists. The DTCL utility detects whether the next list node is associated with a null value. When the next list node is associated with a non-null value, the next tree item is identified. The DTCL utility returns an identification of the next tree item representing a second current tree item. The DTCL utility also updates the doubly linked list in response to the expansion/collapsion of the current list item. The DTCL utility avoids the need to number all tree items (both visible and hidden tree items) sequentially by adding list node(s) to or removing list node(s) from the linked list to represent the visible tree items.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A computer implemented method comprising: a processor executing code and creating a doubly linked list based on a tree control structure user interface (UI) component, wherein each list node of the doubly linked list corresponds to a visible tree item of the tree control structure UI component; responsive to a keyboard event signal, finding a current list node corresponding to a first current tree item; finding a next list node corresponding to a next tree item; wherein said next tree item is one of a previous and a subsequent tree item; determining whether a list node exists; detecting whether the next list node is associated with a null value; determining whether the current list node corresponds to a current tree item; and when the next list node is associated with a non-null value: identifying a next tree item of next list node; and returning to the tree control structure UI component an identification of the next tree item, the next tree item representing a second current tree item.
2. The method of claim 1 , further comprising: updating the doubly linked list responsive to an updating command signal to collapse the current list node, said updating step comprising the steps of: identifying at least one child tree item of a current tree item to be collapsed; and removing from the linked list at least one child list node corresponding to said at least one child tree item of the current tree item to be collapsed.
3. The method of claim 1 , further comprising: updating the doubly linked list responsive to an updating command signal to expand the current list node, said updating step comprising the steps of: creating a new list node in said doubly linked list corresponding to each visible child tree item present in the tree control structure; and adding the new list node after a parent list node of said doubly linked list.
4. The method of claim 1 , wherein the keyboard event signal is comprised of one of a keyboard downward arrow signal, a keyboard upward arrow signal, and a keyboard side arrow signal.
5. A data processing system comprising: a processor; a system memory coupled to the processor; and a utility executing on the processor and having executable code for: creating a doubly linked list based on a tree control structure user interface (UI) component, wherein each list node of the doubly linked list corresponds to a visible tree item of the tree control structure UI component; responsive to a keyboard event signal, finding a current list node corresponding to a first current tree item; finding a next list node corresponding to a next tree item; wherein said next tree item is one of a previous and a subsequent tree item; determining whether a list node exists; detecting whether the next list node is associated with a null value; determining whether the current list node corresponds to a current tree item; and when the next list node is associated with a non-null value: identifying a next tree item of the next list node; and returning to the tree control structure UI component an identification of the next tree item, the next tree item representing a second current tree item.
6. The data processing system of claim 5 , the utility further comprising code for updating the doubly linked list to collapse the current list node; said updating step comprising the steps of: identifying at least one child tree item of a current tree item to be collapsed; and removing from the linked list at least one child list node corresponding to said at least one child tree item of the current tree item to be collapsed.
7. The data processing system of claim 5 , the utility further comprising code for updating the doubly linked list to expand the current list node, said updating step comprising the steps of: creating a new list node in said doubly linked list corresponding to each visible child tree item present in the tree control structure; and adding the new list node after a parent list node of said doubly linked list.
8. The data processing system of claim 5 , wherein the keyboard event signal is comprised of one of a keyboard downward arrow signal, a keyboard upward arrow signal, and a keyboard side arrow signal.
9. A computer program product comprising: a computer storage medium; and program code on the computer storage medium that when executed provides the functions of: creating a doubly linked list based on a tree control structure user interface (UI) component, wherein each list node of the doubly linked list corresponds to a visible tree item of the tree control structure UI component; responsive to a keyboard event signal, finding a current list node corresponding to a first current tree item; finding a next list node corresponding to a next tree item; wherein said next tree item is one of a previous and a subsequent tree item; determining whether a list node exists; detecting whether the next list node is associated with a null value; determining whether the current list node corresponds to a current tree item; and when the next list node is associated with a non-null value: identifying a next tree item of the next list node; and returning to the tree control structure UI component an identification of the next tree item, the next tree item representing a second current tree item.
10. The computer program product of claim 9 , further comprising code for: updating the doubly linked list responsive to an updating command signal to collapse the current list node, said updating step comprising the steps of: identifying at least one child tree item of current tree item to be collapsed; and removing from the linked list at least one child list node corresponding to said at least one child tree item of current tree item to be collapsed.
11. The computer program product of claim 9 , further comprising code for: updating the doubly linked list responsive to an updating command signal to expand the current list node, said updating step comprising the steps of: creating a new list node in said doubly linked list corresponding to each visible child tree item present in the tree control structure; and adding the new list node after a parent list node of said doubly linked list.
12. The computer program product of claim 9 , wherein the keyboard event signal is comprised of one of a keyboard downward arrow signal, a keyboard upward arrow signal, and a keyboard side arrow signal.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
September 14, 2007
November 30, 2010
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.