Table editor

Abstract: A table editor for text processing or spread sheet processing wherein a user picks a vertical line separating cells of the table, and issues an insertion command where they want to insert one or more new columns at that position, they pick a horizontal line and issue an insertion command where they want to insert new rows, and they pick two horizontal or vertical lines and issue a delete command to delete the rows or columns between the picked lines.

Description: The present invention relates to a table editor for text processing and spread sheet processing, and more particularly a table editor that allows rows or columns to be inserted into or deleted from a table in a user-friendly manner. In text processing and spread sheet processing, there often arise occasions in which it is necessary to insert or delete rows or columns in order to edit an existing table. In conventional techniques, as in Microsoft's MULTIPLAN Version 2, it is usual to first pick a cell or box with a pointing device such as a mouse device, then to select either insertion or deletion, and then to specify the number of rows or columns. Thus, one or more rows or columns are inserted just under or at the right of the picked cell. Almost the same technique applies on occasions when deletion is done as well. However, in such an arrangement, the user must know in advance where those rows or columns are inserted with respect of the picked cell, and therefore an inexperienced user might insert the rows in an incorrect position, or one line below. In such a mistake the rows could be inserted above the cell being picked. Also, since the user is apt to confuse rows with columns, it is improper and unadvisable to specify rows or columns, or R's or C's. Similar systems are described in "Using Framework II" 1985 Ashton-Tate, US and Y McCoy and "Quattro: The Complete Reference" 1988, Borland/Osborne McGraw Hill, Berkeley CA, US. Prior art relating to the present invention include a method wherein a starting point and an end point of a line are specified, and the line is drawn or deleted between them, thereby inserting or deleting rows (Japanese Published Unexamined Patent Application No. 60-2514743); and a method wherein a point on an already drawn line is specified, then a direction is specified, and then another line beginning at the point in the line is generated to the outer frame (Japanese Published Unexamined Patent Application No. 62-237494). However, these publications include no techniques for inserting or deleting rows or columns into or from a table in a user-friendly manner. The problems of the prior art table creating and editing systems are that they are not simple and definite in the designation of an inserting location, they cause confusion between rows and columns are not therefore user friendly. Therefore, in accordance with the present invention there is provided a table editor for use with a display device for editing a table comprising table information to be displayed in a number of boxes arranged in rows and columns, the table editor comprising: pointing mark information storage means for storing pointing mark information indicative of a pointing mark; means for controlling the display device to display a graphical representation of the table and said pointing mark on the screen of the display device; location pointing means for updating the pointing mark information in said pointing mark information storage means to direct a location of said pointing mark, characterised by line information storage means for storing line information indicative of a plurality of lines in the graphical representation, said lines defining the boxes in which the table information is displayed; means for enabling an operator to generate a line identifying command; line identification means for identifying one or more of said lines pointed to by said pointing mark, based on said pointing mark information and said line identifying command; means for executing an insertion or deletion operation against the table information, in which the identified line or lines define an inserting or deleting position; means for updating the line information in said line information storage means in accordance with the insertion or deletion operation. In order to solve the above mentioned problems, the present invention enables a table editor to be provided which is designed to pick lines in a table for inserting or deleting a row or column. That is, when a row is inserted, the line in the inserting position, or the line between the two rows above and below the row to be inserted, is picked. Similarly, when a column is inserted, the line between the two columns at the left and the right of the column to be inserted, is picked. When a row is deleted, the lines above and below the row to be deleted are picked. When a column is deleted, the lines at the right and the left of the column to be deleted are picked. In such an arrangement, the line or lines define an inserting or deleting position, thereby enabling a row or column to be determined visually independent of the concepts of row and column and thus allowing specification of any such row or column more directly and accurately. In preferred forms of the invention, therefore, the editing command can be either an insertion command and/or a deletion command. In the case of the insertion command the means for updating the line information does so such that if a line identified by said line identification means is located between two consecutive rows, one or more new rows are inserted, in response to said insertion command, and so that, if a line identified by said line identification means is located between two consecutive columns, one or more new columns are inserted in response to said insertion command. In the case of the deletion command the means for updating the line information does so such that if two lines identified by said line identification means are located between two rows, one or more rows between said two lines are deleted in response to said deletion command, and so that, if two lines identified by said line identification means are located between two columns, one or more columns between said two lines are deleted in response to said deletion command. The table editor can include a display device and the location pointing means can be a mouse device. The table editor can be in the form of a general purpose data processing system under the control of suitable software, and can include other devices such as a keyboard, data storage devices, communications links and the like. Alternatively, the table editor could be a dedicated hardware device. An embodiment of the invention will now be described, by way of example, with reference to the accompanying drawings, wherein: Figure 1 is a general block diagram of an embodiment of the present invention; Figure 2 is a block diagram showing the configuration of the table editor 3 in Figure 1; Figure 3 is a configuration of the table manager 9 in Figure 2; Figures 4A to 4F are flowcharts of the processing routines for the respective events in the embodiment; Figure 5 illustrates a manner for inserting a row; Figure 6 illustrates a manner for deleting a row; Figure 7 illustrates a manner for concatenating boxes; and Figure 8 illustrates a manner for moving a line. Figure 1 shows the overall system configuration of the embodiment. In Figure 1, the system consists of a personal computer 1, an operating system 2, and a table editor 3. The personal computer 1 may be a PS/55 of IBM Japan, for example, which consists of a processor 4, a display device 5, a keyboard 6, and a mouse device 7. The operating system 2 may be an OS/55 of IBM Japan, for example, which includes a presentation manager 8 managing interaction between a display device 5 and a user. The presentation manager 8 also manages mouse cursor (pointer) information controlled by the mouse device. The table editor 3 is a feature that generates and edits a table according to directions inputted by the user. Figure 2 is to illustrate the configuration of the table editor 3 in Figure 1 in more detail. In Figure 2, the table editor 3 consists of a table manager 9 and an event processor 10, etc. The event processor 10 is designed to receive event information from the presentation manager 8, and to execute the processing routines shown in Figures 4A to 4F, which will be described later. The event processor 10 also controls drag flags indicating whether or not the mode is the drag mode used to move lines. The table manager 9 has the configuration shown in Figure 3, which will be detailed later. In this configuration, when a user gives directions with the keyboard 6 or the mouse device 7, the presentation manager 8 in the operating system 2 generates event information according to the user's directions, and sends it to the event processor 10. The event processor 10 supplies based on the event information to the table manager 9 messages directing it to produce or modify table information. Then, the table manager 9 produces or modifies the table information in response to the messages, and returns it to the presentation manager 8, which then displays a table in accordance with said user's directions. Figure 3 is to illustrate the configuration of the table manager 9 shown in Figure 2 in more detail. In Figure 3, the table manager 9 consists of a line information storage 11, a box information storage 12, a content information storage 13, and a table information manager 14, etc. The line information storage 11 contains location information (the coordinates of starting points and end points of all the lines constituting a table, line type information, and pick flags (indicating whether or not lines are being picked). The box information storage 12 contains a information concerning four lines constituting a box, and the contents to be displayed in the box, that is, pointers to the line information storage 11 and the content information storage 13 which is described later. The box information storage 12 also contains pick flags (indicating certain boxes are being picked). The content information storage 13 stores the contents to be displayed in a box. The table information manager 14 manages the line information storage 11, box information storage 12, and content information storage 13. The following describes the operation of the embodiment. The table editor 3 creates and edits tables. Such a table usually consists of some vertical lines and horizontal lines as in Figure 5. A field enclosed by four such lines, two vertical and two horizontal, is hereinafter called a box, as usually so designated. In the following, editing of a table is mainly explained because it is created in a substantially similar manner to a conventional one. It will be first explained how the processing routine are executed on event information according to directions inputted by a user, and then insertion or deletion of rows and columns, and the concatenation of boxes will be explained. Button-down Routine (Figure 4A) When a user presses a button on the mouse device 7, the presentation manager 8 sends button-down event information to the event processor 10 (step S1), together with mouse cursor (pointer) location information. The event processor 10 sequentially inquires line information of the table manager 9, and runs a test as to whether or not the mouse cursor is near a line (step S2). If the mouse cursor is near a line, then the line is picked (step S3). That is, a pick flag is set at the corresponding line entry in the line information storage 11 of the table manager 9. Also, a flag for the drag mode, which is managed by the event processor 10, is turned on (step S4). Then, the routine is terminated (step S5). If it is judged at step 2 that the mouse cursor is not near a line, then a test is run as to whether or not the mouse cursor is in a box (step S6). The test is also run by using the line information in the line information storage 11. If the mouse cursor is in a box, then the box is picked (step S7). That is, a pick flag is set at the corresponding box entry in the box information storage 12 of the table manager 9. Then, the routine is terminated (step S5). If the mouse cursor is not in a box, then the routine terminates at once (step S5). Button-up Routine (Figure 4B) If the user presses once a button on the mouse device 7, and then take his finger off the button, the button goes up to the original position. The presentation manager 8 then detects the button-up event and sends button-up event information to the event processor 10 (step S11). Then the event processor 10 resets the drag mode flag to the off position (step S12) and terminates the routine (step S13). Move Routine (Figure 4C) If the user manipulates the mouse device 7 to move the mouse cursor, a move routine runs by increment of the location of the mouse cursor (step S21). This routine first tests whether or not the mode is in the drag mode (step S22). If it is in the drag mode, or the drag mode flag is on, the line being picked at the moment, if any, is moved (step S23). That is, location information of the line is updated. Then, the routine is terminated (step S24). If it is not in the drag mode, then the routine terminates at once (step S24). Menu/line Insertion Routine (Figure 4D) When the user picks the line insertion item in the edit menu field (pull-down menu), the presentation manager 8 sends line insertion event information to the event processor 10 (step S31). The event processor 10 then inquires pick information of the line information storage 11 (step S31). If there is a line being picked, the event processor 10 separates the line into two lines (step S33), and then terminates the line insertion routine (step S34). If there is no line being picked, the routine terminates at once (step S34). Menu/line Deletion Routine (Figure 4E) When the user picks the line deletion item in the edit menu field (pull-down menu), the presentation manager 8 sends line deletion event information to the event processor 10 (step S41). The event processor 10 then inquires pick information of the line information storage 11 (step S41). If there are two lines being picked, the event processor 10 concatenates the two lines into a single line, deletes the contents between the two lines (step S43), and terminates the line deletion routine (step S44). If two lines are not picked, the routine terminates at once (step S44). Menu/box Concatenation Routine (Figure 4F) When the user picks the box concatenation item in the edit menu field (pull-down menu), the presentation manager 8 sends box concatenation event information to the event processor 10 (step S51). The event processor 10 then inquires pick information of the box information storage 12 (step S51). If there are two or more boxes being picked, the event processor 10 concatenates these two or more boxes into a single box (step S53), and thus hides away the lines between those boxes as hidden lines. To set up such hidden lines, it is necessary only to specify the attribute "hidden line" for that area. Then the event processor 10 terminates the box concatenation routine (step S54). If fewer than two boxes are being picked, the routine terminates at once (step S54). The following explains the insertion or deletion of rows and columns and the concatenation of boxes. Figure 5 illustrates how rows are inserted. In the example in Figure 5, one row is inserted between the second row and the third row from the top. The mouse device 7 (Figure 1) is first used to move the mouse cursor (the arrow mark in this example) on the line between the second and the third row as shown in (A). Then a button on the mouse device 7 is clicked to generate button-down event information, as shown in Figure 4A. A pick flag is set in the line information for the corresponding line based on the button-down information. A triangular mark indicating the line being picked is displayed at each end of the picked line based on the flag (B). Then, the edit item in the menu bar in the upper area of the screen (window) is picked to display a pull-down menu of edit items (C). Then, when the insertion item in the pull-down menu is picked, the presentation manager 8 sends line insertion event information to the event processor 10, and separates the corresponding line into two new lines as shown by four triangular marks in (D), between which a row is then inserted. In this example, both the vertical and the horizontal length of the outer frame of the table are fixed, and both the height of each row and the width of each column are both constant. Accordingly, the height of each row in (D) is less than that of each row in (A) on account of the insertion of the row mentioned. As a matter of course, the height of the row to be inserted may be uniquely determined locationally in relation to that of the row just above or just below the row in question, or may be left to the user's decision. Explanation of insertion of a column is omitted because it is the same as that of insertion of a row except that the line being picked is vertical. Figure 6 illustrates how a row is deleted. With the example in Figure 6, the third row from the top is deleted. The ruled lines just above and just below the row to be deleted are picked one after the other with the mouse device 7 (Figure 1), similarly to the case shown in in Figure 5. Thus, a pick flag is set on the lines just above and just below the row to the deleted. Then, a triangular mark is displayed at each end of the two lines based on the flag, as shown in (A), to indicate that they are picked. Then, the edit item in the menu bar in the upper area of the screen (window) is picked to display a pull-down menu of edit items. Then, when the deletion item in the pull-down menu is picked, the presentation manager 8 sends line deletion event information to the event processor 10, and concatenates the corresponding two lines into a single line using the routine shown in Figure 4E, thus the row being deleted is as shown in (B). Explanation of deletion of a column is omitted because it is the same as that of deletion of a row except that the line being picked is vertical. Figure 7 illustrates how boxes are concatenated. Using the example shown in Figure 7, the box at the intersection of the third row and the second column and the box at the intersection of the third row and the third column are concatenated into a single box. The mouse device 7 (Figure 1) is first used to move the mouse cursor into the box at the intersection of the third row and the second column, as shown in (A). Then, a button on the mouse device 7 is clicked to generate button-down event information of Figure 4A. A pick flag is set in the box information for the corresponding box based on the button-down information, and the box is highlighted (B). Then, the mouse cursor is moved into the box at the intersection of the third row and the third column (C). A pick flag is set in the box information for the corresponding box in the same manner to highlight two picked boxes as shown in (D). Then, the edit item in the menu bar in the upper area row of the screen (window) is picked to display a pull-down menu of edit items (E). Then, when the box concatenation item in the pull-down menu is picked, the presentation manager 8 sends box concatenation event information to the event processor 10, and concatenates the corresponding two boxes into a single box by the routine shown in Figure 4F (F). Figure 8 illustrates how a line is moved (dragged). In this example, the third vertical line from the left is dragged. In this example, the box at the intersection of the third row and the second column and the box at the intersection of the third row and the third column have already been concatenated according to the example of Figure 7. For this reason, part of the third line has been hidden. First, the mouse device 7 (Figure 1) is used to move the mouse cursor onto the third line from the left, as shown in (A). Then, a button on the mouse device 7 is pressed to generate button-down event information, as shown in Figure 4A. A pick flag is set in the line information for the corresponding line based on the button-down information. Then, a triangular mark is displayed at each end of the picked line based on the flag, as shown in (A) to indicate that it is picked. Furthermore, a drag mode flag is set (turned on) based on the button-down information. The drag mode flag is kept ON until button-up event information is generated, as shown in Figure 4B. Then, when the mouse device 7 is moved with the button of the mouse device 7 down, the move routine is executed repeatedly based on the move event information of Figure 4C, thus the picked line is moved. The line visually is discontinued on the third row, but the upper partial line and the lower partial line move together with each other (B) because the line is a ruled line partially having the attribute of a "hidden line." The present invention is not limited to the above-mentioned embodiment, but is capable of being embodied in various variations. For example, even where all lines are hidden lines, this invention can be applied to insert rows and columns. Moreover, needless to say, pointing devices other than the mouse device 7 may be used. As has been described so far, the present invention enables insertion locations to be specified simply and also allows operations to be performed freely irrespective of the concepts of row and column, inasmuch as the line between the rows just above and just below an inserting location is picked when a row is inserted, and the line between the columns at the left and the right of an inserting location is picked when a column is inserted. Also, this invention simplifies the deletion of rows and columns because it allows such deletion of rows and columns to be specified by picking lines.

Claims: A table editor (3) for use with a display device (5) for editing a table comprising table information to be displayed in a number of boxes arranged in rows and columns, the table editor comprising: pointing mark information storage means for storing pointing mark information indicative of a pointing mark; means (8) for controlling the display device (5) to display a graphical representation of the table and said pointing mark on the screen of the display device; location pointing means (8) for updating the pointing mark information in said pointing mark information storage means to direct a location of said pointing mark, characterised by line information storage means (11) for storing line information indicative of a plurality of lines in the graphical representation, said lines defining the boxes in which the table information is displayed; means for enabling an operator to generate a line identifying command; line identification means for identifying one or more of said lines pointed to by said pointing mark, based on said pointing mark information and said line identifying command; means for executing an insertion or deletion operation against the table information, in which the identified line or lines define an inserting or deleting position; means for updating the line information in said line information storage means in accordance with the insertion or deletion operation. A table editor as claimed in Claim 1, wherein the means for updating the line information is arranged such that, if a line identified by said line identification means is located between two consecutive rows, one or more new rows are inserted in response to said insertion command, and so that, if a line identified by said line identification means is located between two consecutive columns, one or more new columns are inserted in response to said insertion command. A table editor as claimed in Claim 2, wherein line information updating means is arranged to update the line information in said line information storage means so as to insert a specified number of rows or columns. A table editor as claimed in Claim 2 or claim 3 wherein said line information updating means is arranged to update the information is said line information storage means so as to insert rows or columns having specified sizes. A table editor as claimed in Claim 1 wherein the means for updating the line information is arranged such that, if two lines identified by said line identification means are located between two rows, one or more rows between said two lines are deleted in response to said deletion command, and so that, if the two lines identified by said line identification means are located between two columns, one or more columns between said two lines are deleted in response to said deletion command. A table editor as claimed in any preceding claim wherein said line information updating means is arranged to update the line information in said line information storage means so as to arrange existing rows or columns being inserted evenly within a frame having a predetermined size. A table editor as claimed in any preceding claim comprising a display device. A table editor as claimed in any preceding claim wherein said location pointing means is a mouse device.

Inventors: ISHIKAWA SHIGEKI, SIIO ITIRO -GOH MOAKURESUTO, ISHIKAWA, SHIGEKI, SIIO, ITIRO, 514-GOH MOAKURESUTO
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1990
Main classification: G06F17
IPC codes: G06F15, G06F17