The field of the invention relates to the display of objects, particularly linguistic and other communicative symbols, in a table cell, and specifically, to display objects, capable of being edited, in a divided table cell.
Tables are used extensively in today""s computing environment. The uses of tables include organizing topics under categories, creating financial reports, organizing employee records, as well as many other ways where it is desirable to manage or represent related data. Because of the many uses of tables, word processing, spreadsheet, database, and desktop publishing applications have all provided functional support for the use of tables.
As the use of tables proliferate, the demands for more sophisticated table support in the applications while making them easier to use has increased. Examples of these increased demands include simpler table creation and manipulation, the display of borders around the table and the individual cells within the table and providing calculation functions on the cells within the table. These increased demands are present for tables wherever they are found: in word processing, spreadsheet, database, and desktop publishing applications. Effective presentation of data is the goal.
One demand that has risen is to create a divided cell in a table. For example, diagonally divided cells are most commonly used in a table to block off specific cells of the table signifying that no entries may exist for that cell. However, other needs for divided cells also exist. These needs include incorporating objects in a divided cell. Objects comprise linguistic and other communicative symbols, including alphanumeric characters, graphic symbols, or any representation in a table cell. FIGS. 1a and 1b illustrate two examples of other uses of a divided cell. FIG. 1a illustrates a calendar wherein the divided cell 3, in this case a diagonally divided cell, is used to represent two days of the month within a single cell. FIG. 1b illustrates a table with row and column headings wherein the divided cell 7, also a diagonally divided cell, depicts category headings for the table""s rows and columns. Note that in both of these examples, text objects are displayed on both sides of the diagonal. Having text objects on both sides creates a need such that the user can enter text on both sides as well as edit the existing text on both sides of the diagonal.
To address this need, one existing implementation includes drawing a line to divide the cell diagonally in either direction (i.e., from the Northwest corner of the cell to the Southeast, or from the Northeast corner to the Southwest) as well as drawing an xe2x80x9cXxe2x80x9d over the cell. However, in this implementation, the drawing of the diagonal line renders the cell uneditable. This drawback also creates an inconsistency from a user interface standpoint. The cell with a diagonal drawing creates an inconsistency because it is an anomaly within the table.
Unlike the other cells in the table, no data may be placed in the cell and it is uneditable.
Other implementations that attempt to get around this uneditability of a divided cell with a diagonal include creating a separate text object that floats above the diagonal cell on the display. However, in this implementation, the text object is distinct from the table structure providing unwanted side effects.
For example, whenever the table cell is resized or the format of the cell is changed, a separate editing step is required to modify the xe2x80x9cfloatedxe2x80x9d text object so that it conforms with the rest of the table.
And yet another implementation includes restricting the text to a fixed-pitch grid and drawing lines through the breaks in the letters. However, this also requires multiple editing steps when parameters of the cell are changed. In addition, this solution does not work when the font in the text is one of the commonly used proportional spaced fonts. Accordingly, there is a need in the art to generate a divided cell, which provides editing on both sides of the division and minimizes the steps required when editing objects in the cell and manipulating the parameters of the cell.
The present invention meets the needs described above by providing a method for generating a divided cell and displaying objects in the divided cell in such a manner as to allow for efficient editing of the objects. Objects comprise alphanumeric characters, graphic symbols or any representation in a table cell. For purposes of discussion, however, the present invention is described in terms of characters in a cell, but will apply to any object that may be placed in a cell.
A divided cell is generated by creating a new cell and displaying the new cell on top of a cell in the display. Each cell contains constraints. Characters contained in each cell are laid out such that no character in each cell is displayed in an area defined by a constraint.
The divided cell is generated by first selecting a cell in the table. The divided cell will be displayed at this cell location. The method of selecting the cell can be any method recognized by the application, including navigating to the cell using a keyboard entry device or clicking on the cell with a mouse input device. After the cell is selected, a new cell is generated.
The new cell is structurally and functionally similar to the existing cell. The new cell is created using whatever cell creation mechanism is supported by the table and the application.
After the new cell is created, constraints are developed for each of the cells. Characteristics of the constraints include: 1) the constraint for the cell prevents any of the characters contained in that cell from being displayed in the area defined by the constraint; and 2) the constraint area defined for one cell contains the displayable area for the other cell. After generating the constraints for both cells, any characters that are currently contained in both cells or that are entered into the cells are arranged such that they do not intersect any of the area defined by the constraints in the respective cells.
After the object layout is completed, the new cell is displayed over the existing cell along with a divider. The display now contains a divided cell, made up of two cells and a divider.
Each cell in the divided cell will function like any other cell in the table. Each cell can be formatted, edited independently or collectively, in the same manner as any other cell in the table.
This editing can be performed by selecting the side of the divided cell the user desires to edit. The user selects the desired side of the divided cell by either 1) clicking on the side of the divided cell the user wishes to edit or reformat using a mouse input device or 2) navigating to the desired side of the divided cell using arrow and/or tab keys on a keyboard input device.
The display address of the two cells that make up the divided cell is the same because it occupies the same location in the display. However, to distinguish between the two cells, additional parameters are stored with each cell to keep them distinct. These parameters include whether the cell is part of a divided cell, how the cell is divided, and which part of the division constitutes the displayable area for that cell.
When either of the cells that make up the divided cell is edited, the constraint is recalculated, if necessary. Then the cell that is edited reapplies the constraint and modifies the display based on the edited characters.
To perform the object layout in the cell with a constraint, a first test rectangle is defined. The test rectangle has a width that is the width of the cell and a height that is based on the height of the tallest character from the set of characters that fit within the width of the first test rectangle. The test rectangle represents a line in the cell that will contain characters. The constraint in the cell is then applied to the first test rectangle. The section of the first test rectangle that intersects the area of the cell constraint is removed. It is preferable that the removed section be rectangular. The removal of the section intersecting the constraint modifies the width of the first test rectangle. A second test rectangle is generated to reflect the width of the modified first test rectangle while using the height of the first test rectangle.
If a height based on the tallest character from the set of characters that fit within the width of the second test rectangle is less than the height of the first test rectangle, then the another set of test rectangles may be calculated to provide a more proportional match between the height space allocation in the cell with the height of the character set of that fits within the width of the test rectangle.
After determining the final height and width of a test rectangle, the characters that fit into the width of this test rectangle are displayed on a line of the cell within the area defined by the final test rectangle. The object layout procedure is reiterated for as many lines in the cell as necessary to display the characters until all the characters are displayed or the procedure runs out of display area. In the case where the procedure runs out of display area, characters that do not fit into the display area remain in an overflow buffer and are not visible in the diagonal cell.
It should be recognized that text in a table is not always drawn horizontally, left to right. For example, Chinese vertical text is drawn vertically night to left, and bidirectional Hebrew or Arabic text is drawn horizontally, sometimes left to right, sometimes right to left. While the description of the present invention focuses on objects displayed horizontally, it is also considered within the scope of the present invention to display objects that are not typically displayed horizontally, left to right (i.e., vertical Chinese text or bidirectional Hebrew or Arabic text). It is further considered within the scope to display objects in the diagonal cell using different display schemes, such as displaying horizontal text in one side of the diagonal cell and displaying vertical text in the other side.
In addition, those skilled in the art will also recognize that the vertical position of the first line space is an arbitrary decision. This decision can be made to suit the needs of table display features such as centering or bottoming the location of text in a cell, or xe2x80x9cleftingxe2x80x9d or xe2x80x9crightingxe2x80x9d vertical text in a cell.
USPTO Backgrounds
USPTO Backgrounds