1. Field of the Invention
Embodiments of the present disclosure relate to information management systems and methods, and more particularly to a system and method for controlling dragging scroll bars in a web table.
2. Description of Related Art
As “web” technology has evolved, a web system is accessed via a web browser over a network such as the Internet or an intranet. In an enterprise, the web system is an important platform for employees to acquire inner information of the enterprise. For example, the employees can login to a sales system to query the sales data on a client device via a web browser. Usually, the data in the web system can be presented in a web table to users. A web table includes a title area and a data area. The web table often contains scroll bars for moving the data area. However, the title area may not simultaneously move along with the data area when a user moves the data area by the scroll bars.
Therefore, what is needed is a system and method overcoming the aforementioned problem.
All of the processes described below may be embodied in, and fully automated via, function code modules executed by one or more general purpose computers or processors. The code modules may be stored in any type of computer-readable medium or other computer storage device. Some or all of the methods may alternatively be embodied in specialized computer hardware.
The dividing module 210 is configured for dividing a web table into a title area and a data area. In one embodiment, the web table is divided by hypertext markup language (HTML), and is rendered in a web browser. As shown in
The generating module 211 is configured for generating scroll bars for the data area. In one embodiment, as shown
The obtaining module 212 is configured for obtaining a position and a status of a cursor on a display 1. Depending on the embodiment, the status of the cursor may be a left-click status, a right-click status, or a double-click status.
The determining module 213 is further configured for determining if the cursor is positioned to drag the scroll bars according to the position and the status of the cursor on the display 1. In one embodiment, if the cursor is positioned on the scroll bars, and the cursor is in the left-click status, the determining module 211 determines that the cursor is positioned to drag the scroll bars. For example, if the cursor is positioned on the vertical scroll bar 110, and the cursor is in the left-click status, the determining module 211 determines that the cursor is positioned to drag the vertical scroll bar 110 along the vertical direction.
The determining module 213 is further configured for determining a moving direction of the cursor along the display 1. In one embodiment, the moving direction of the cursor may be a horizontal direction or a vertical direction. For example, if the cursor drags the vertical scroll bar 110, then the moving direction of the cursor is the vertical direction.
The computing module 214 is configured for computing a distance that the cursor moves along the moving direction.
One embodiment of a method for computing a distance that the cursor moves along the horizontal direction is described as follows: (1) obtaining a length M and the number of pixels N distributed in a row of the display 1 along the horizontal direction. (2) obtaining the number of pixels S that the cursor passed through during moving along the horizontal direction. (3) computing the distance D along the horizontal direction according to the length M, the number of pixels N and the number of pixels S. (4) Using the formula:
for computing the distance that the cursor moves along the horizontal direction.
One embodiment of a method for computing a distance that the cursor moves along the vertical direction is described as follows: (1) obtaining a width M and the number of pixels N distributed in a column of the display 1 along the vertical direction. (2) obtaining the number of pixels S that the cursor passed through during moving along the vertical direction. (3) computing the distance D along the vertical direction according to the length M, the number of pixels N and the number of pixels S. (4) Using the formula:
for computing the distance that the cursor moves along the vertical direction.
The moving module 215 is configured for moving the title area the distance along the moving direction accordingly. In one embodiment, if the cursor has moved 3 centimeters along the horizontal direction, the moving module 215 simultaneously moves the first row of the web table 3 centimeters along the horizontal direction. In another embodiment, if the cursor has moved 3 centimeters along the vertical direction, the moving module 215 simultaneously moves the first column of the web table 3 centimeters along the vertical direction.
In block S10, the dividing module 210 divides a web table into a title area and a data area. As mentioned above, the title area in the web table is used to display the column names and the row names and the data area is used to display different kinds of data, such as sales data of products, etc. In one embodiment, the blank area is data area as shown in
In block S11, the generating module 211 generates scroll bars for the data area. As mentioned above, as shown
In block S12, the obtaining module 212 obtains a position and a status of a cursor on the display 1.
In block S13, the determining module 213 determines if the cursor is positioned to drag the scroll bars according to the position and the status of the cursor on the display 1. If the determining module 213 determines that the cursor is not positioned to drag the scroll bars according to the position and the status of the cursor, the procedure ends. Otherwise, if the determining module 213 determines that the cursor is positioned to drag the scroll bars according to the position and the status of the cursor, the procedure turn to block S14.
In block S14, the determining module 213 determines a moving direction of the cursor. As mentioned above, the moving direction of the cursor may be a horizontal direction or a vertical direction along the display 1. For example, if the cursor moves the vertical scroll bar 110, the moving direction of the cursor is the vertical direction.
In block S15, the computing module 211 computes a distance that the cursor moves along the moving direction. As mentioned above, the distance may be computed according to the formula D that the cursor moves along the horizontal and vertical direction.
In block S16, the moving module 215 moves the title area the distance along the moving direction accordingly. As mentioned above, for example, assuming that the cursor has moved 3 centimeters along the horizontal direction, the moving module 215 simultaneously moves the first row of the web table 3 centimeters along the horizontal direction. In another example, assuming that the cursor has moved 3 centimeters along the vertical direction, the moving module 215 simultaneously moves the first column of the web table 3 centimeters along the vertical direction.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
200710203457.2 | Dec 2007 | CN | national |