1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing data. Still more particularly, the present invention provides a method, apparatus, and computer instructions for displaying data in a hierarchical format.
2. Description of Related Art
In today's computing environment, large amounts of data are being generated and stored. Many different types of systems are present for searching and viewing data. One of these systems involves a graphical user interface (GUI) that presents folders and files in a hierarchical format. The arrangement of folders forms hierarchical data that may be presented to a user.
For example, a user interface tree control is used by programmers to display hierarchical data in hierarchical tree form. A hierarchical tree consists of nodes, where each node in the tree may have child nodes. Each node with child nodes may either be in an expanded state where its child nodes are shown, or in a contracted state where its child nodes are not shown. When a node is expanded, an indicator symbol such as a plus sign, resides next to the node. When a node is contracted, an indicator symbol such as a minus sign, resides next to the node. Each node without child nodes are called leaf nodes. Leaf nodes do not have an expansion or contraction indicator beside them. Current user interface trees only expand child nodes in a vertical orientation beneath the parent node. This restriction has a number of limitations. For example, whenever multiple nodes are expanded, a vertically oriented tree may have to be scrolled excessively in order to navigate from one part of the tree to another. A tree occupies space mostly in a vertical direction. The horizontal space is not effectively used. Additionally, a user does not have any control over how nodes are to be arranged based upon information type or preference.
Currently, no known solutions are present to solve these problems. Thus, it would be advantageous to have an improved method, apparatus, and computer instructions for presenting hierarchical data in a tree format.
The present invention provides a method, apparatus, and computer instructions for controlling a display of hierarchical data. A mode of expansion is identified for a selected node, in response to a selection of the selected node in a hierarchical tree being displayed on a display in the data processing system. A plurality of modes of expansion are present for the selected node. The selected node is expanded in the mode of expansion.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
With reference now to the figures and in particular with reference to
With reference now to
In the depicted example, local area network (LAN) adapter 210, small computer system interface (SCSI) host bus adapter 212, and expansion bus interface 214 are connected to PCI local bus 206 by direct component connection. In contrast, audio adapter 216, graphics adapter 218, and audio/video adapter 219 are connected to PCI local bus 206 by add-in boards inserted into expansion slots. Expansion bus interface 214 provides a connection for a keyboard and mouse adapter 220, modem 222, and additional memory 224. SCSI host bus adapter 212 provides a connection for hard disk drive 226, tape drive 228, and CD-ROM drive 230. Typical PCI local bus implementations will support three or four PCI expansion slots or add-in connectors.
An operating system runs on processor 202 and is used to coordinate and provide control of various components within data processing system 200 in
Those of ordinary skill in the art will appreciate that the hardware in
For example, data processing system 200, if optionally configured as a network computer, may not include SCSI host bus adapter 212, hard disk drive 226, tape drive 228, and CD-ROM 230. In that case, the computer, to be properly called a client computer, includes some type of network communication interface, such as LAN adapter 210, modem 222, or the like. As another example, data processing system 200 may be a stand-alone system configured to be bootable without relying on some type of network communication interface, whether or not data processing system 200 comprises some type of network communication interface. As a further example, data processing system 200 may be a personal digital assistant (PDA), which is configured with ROM and/or flash ROM to provide non-volatile memory for storing operating system files and/or user-generated data.
The depicted example in
The processes of the present invention are performed by processor 202 using computer implemented instructions, which may be located in a memory such as, for example, main memory 204, memory 224, or in one or more peripheral devices 226-230.
The present invention provides a method, apparatus, and computer instructions for displaying nodes in a hierarchical tree presented to a user on a display. The mechanism of the present invention includes a hierarchical tree control that improves upon existing hierarchical tree controls by providing a user interacting with the tree control, the ability to expand each expandable node in more than one way or direction. For example, a user may expand an expandable node in a number of different directions. For example, an expandable node may be expanded in one of the following ways: vertical, horizontal, vertical exclusive, and horizontal exclusive. With vertical expansion, the nodes are expanded with child nodes arranged below the current node in a vertical direction. This type of expansion is presently used. Horizontal expansion occurs when a node is expanded with child nodes arranged in a horizontal direction. A vertical exclusive expansion mode involves the expansion of a node with child nodes being arranged in a vertical direction. In this type of expansion, all of the sibling nodes are contracted. A sibling node is a node that has the same parent node as the specified or selected node. Horizontal exclusive is a mode of expansion in which a node is expanded with child nodes being arranged in a horizontal direction. In this type of expansion, all sibling nodes are contracted.
The mechanism of the present invention may identify or use any one of these expansion modes at any one time. The selection of a particular direction in which nodes are expanded may be set by default, by a software application, or through a user input.
The diagrams in
Turning now to
Node 304 has been expanded vertically to show nodes 314, 316, and 318. These nodes are child nodes to node 304. Additionally, nodes 320, 322, and 324 are child nodes to node 306. In summary, nodes 300, 302, 304, and 306 are expanded in a vertical mode or direction.
With reference next to
Turning next to
In
Turning now to
In
Turning now to
With reference to
Control 800 is only an illustration and one way in which expansion modes may be selected. Other types of controls or mechanisms, such as, for example, the use of controls keys, mouse buttons, or combinations of key strokes may be used to select different modes of expansion.
As another example, plus signs and minus signs displayed in the hierarchical trees may be implemented as controls to select a mode of expansion in conjunction with a default, and last used mode. For example, a user may select an expansion mode by activating a pop-up menu for the node that is to be expanded. In response to this activation, the pop-up menu appears and is populated with a menu item for each expansion mode. The user may select an expansion mode by selecting a menu item from the pop-up menu. The different items identify different modes of expansion in this particular example.
The selected node is expanded using the selected expansion mode. Subsequent selections of the expansion control results in an expansion of the node using the last selected expansion mode in these examples. If a user attempts to expand a node by selecting the expansion control without prior selection of an expansion mode, then a default expansion mode is used. The default expansion mode may have been set by the tree control implementation, the application that contains the tree control, or the user through a user settable preference in these examples.
Turning now to
The process begins by determining whether a vertical expansion mode has been selected (step 900). If a vertical expansion mode has been selected through the user input, all sibling nodes with horizontal exclusive expansion or vertical exclusive expansion are contracted (step 902). Next, the selected node is expanded by arranging the child nodes vertically (step 904) with the processing terminating thereafter.
With reference back to step 900, if a vertical expansion mode is absent, a determination is made as to whether a horizontal expansion mode is selected (step 906). When the horizontal expansion mode has been selected, all sibling nodes with horizontal exclusive or vertical exclusive expansions are contracted (step 908). Then, the selected node is expanded by arranging the child nodes horizontally (step 910) with the process terminating thereafter.
With reference back to step 906, if a horizontal expansion mode is absent, a determination is made as to whether a horizontal exclusive expansion mode as been selected (step 912). When the horizontal exclusive expansion mode has been selected, all sibling nodes are contracted (step 914). Next, the selected node is expanded by arranging child nodes horizontally (step 916) with the process terminating thereafter.
With reference back to step 912, if a horizontal exclusive expansion mode is absent, a determination is made as to whether a vertical exclusive expansion mode has been selected (step 918). When the vertical exclusive expansion mode has been selected, all sibling nodes are contracted (step 920). Then, the selected node is expanded by arranging child nodes vertically (step 922) with the process terminating thereafter.
With reference again to step 918, if a vertical exclusive expansion mode has not been selected, then the process terminates. In this case, the user input has not selected any of the four illustrative modes of expansion. In this case, the process may terminate without expanding the nodes. Alternatively, a default mode of expansion may be selected for expanding nodes.
Thus, the present invention provides an improved method, apparatus, and computer instructions for displaying nodes in a hierarchical tree. The mechanism of the present invention allows for nodes to be expanded or displayed in different modes or directions. Further, the mechanism of the present invention also allows a user to choose how each hierarchical level in the tree is arranged. Combinations of modes of expansion may be provided. The mechanism also includes an ability to determine how each hierarchical layer should be arranged according to user preferences. The ability to arrange each hierarchical level depending on the type of information the hierarchical level displays is provided by the mechanism of the present invention.
Further, this mechanism provides for increased flexibility in determining how the display area is used in both horizontal and vertical directions. The exclusive modes in these illustrative examples allow a user to treat the nodes of a hierarchical level as a set of categories where the child levels of only one category are displayed at any one time. Having exclusive node processing built into a tree control removing the need for software applications to do exclusive node processing themselves is another advantage provided by the mechanism of the present invention.
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMs, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.