CN102043586A - Method and device for displaying background color in electronic form - Google Patents

Method and device for displaying background color in electronic form Download PDF

Info

Publication number
CN102043586A
CN102043586A CN2010105993120A CN201010599312A CN102043586A CN 102043586 A CN102043586 A CN 102043586A CN 2010105993120 A CN2010105993120 A CN 2010105993120A CN 201010599312 A CN201010599312 A CN 201010599312A CN 102043586 A CN102043586 A CN 102043586A
Authority
CN
China
Prior art keywords
cell
mouse
rectangular area
row
ordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010105993120A
Other languages
Chinese (zh)
Other versions
CN102043586B (en
Inventor
黄亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Evermore software Limited by Share Ltd
Original Assignee
Wuxi Evermore Software Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Evermore Software Inc filed Critical Wuxi Evermore Software Inc
Priority to CN2010105993120A priority Critical patent/CN102043586B/en
Publication of CN102043586A publication Critical patent/CN102043586A/en
Application granted granted Critical
Publication of CN102043586B publication Critical patent/CN102043586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a method and a device for displaying a background color in an electronic form, which relate to the field of electronic office, and are used for improving the highlight effect on cells in the electronic form. The method comprises the following steps of: determining a cell region selected by a user, and determining a first rectangular region to be cut, which is formed by cells in a row where the cell region is positioned, and a second rectangular region to be cut, which is formed by cells in a column where the cell region is positioned; determining a rectangular region to be filled, which is left after the overlapped region of the first rectangular region to be cut and second rectangular region to be cut is cut; and displaying the background color of cells in the rectangular region to be filled as a preset color different from the background color of other unselected cells. By the method and the device, the highlight effect on the cells in the electronic form can be effectively improved.

Description

Background colour display packing and device in the electrical form
Technical field
The present invention relates to the teleworking field, relate in particular to background colour display packing and device in a kind of electrical form.
Background technology
In present electrical form office software, for example among the Excel, when the user chooses certain cell of electrical form, meeting is to be different from other not colors of the background colour of selected cell lattice with the color change of the background colour of this cell, and overstriking, add the frame of black this cell, to highlight the cell of choosing.
When the user chooses in the electrical form a plurality of adjacent cell by pulling mouse, meeting is to be different from other not colors of the background colour of selected cell lattice with the color change of the background colour of the active cell in these a plurality of adjacent cells lattice, with the color change of the background colour of the non-active cell in these a plurality of adjacent cells lattice is to be different from not color of the background colour of selected cell lattice of the background colour of active cell and other, and the frame overstriking of the rectangular area that these a plurality of adjacent cells are constituted, add black, to highlight this rectangular area.The active cell here is generally the cell that mouse pulls mouse place when pressing mouse in the process, and other cells of choosing are non-active cell.
In realizing process of the present invention, the inventor finds to exist in the prior art following technical matters:
In the prior art, the cell of choosing is highlighted, its effect that highlights is relatively poor.
Summary of the invention
The embodiment of the invention provides background colour display packing and the device in a kind of electrical form, is used for improving the effect that the cell to electrical form highlights.
Background colour display packing in a kind of electrical form, this method comprises:
Determine the positional information in the cell zone that the user chooses;
According to the positional information in described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
According to the positional information of described rectangular area to be filled, the background colour of the cell in the described rectangular area to be filled is shown as the color different with the background colour of unchecked cell.
Background colour display device in a kind of electrical form, this device comprises:
Cell regional location determining unit, the positional information in the cell zone that is used for determining that the user chooses;
Treat cutting rectangular area determining unit, be used for the positional information according to described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Rectangular area to be filled determining unit, be used for treating that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
The background colour display unit is used for the positional information according to described rectangular area to be filled, and the background colour of the cell in the described rectangular area to be filled is shown as the color different with the background colour of unchecked cell.
Among the present invention, after determining the positional information in the cell zone that the user chooses, according to the positional information in described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted; Treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back; According to the positional information of described rectangular area to be filled, the background colour of the cell in the described rectangular area to be filled is shown as the color of the background colour that is different from other unchecked cells.Because comprising the cell zone of choosing with the user in the rectangular area of determining according to the present invention to be filled is in the cell of same row and is in the cell of same row with this cell zone, therefore, after the background colour of the cell in the rectangular area to be filled is shown as the color of the background colour that is different from other unchecked cells, promptly reached and to be in the cell of same row with the cell zone that the user chooses, and be shown as the purpose of the color of the background colour that is different from other unchecked cells with the background colour that this cell zone is in the cell of same row, effectively improved the effect that the cell in the electrical form is highlighted.
Description of drawings
The method flow synoptic diagram that Fig. 1 provides for the embodiment of the invention;
Fig. 2 A is the cell area schematic in the embodiment of the invention one;
Fig. 2 B is that treating in the embodiment of the invention one reduced the rectangular area synoptic diagram;
Fig. 2 C is the rectangular area to be filled synoptic diagram in the embodiment of the invention one;
Fig. 3 A is the cell area schematic in the embodiment of the invention two;
Fig. 3 B is that treating in the embodiment of the invention two reduced the rectangular area synoptic diagram;
Fig. 3 C is the rectangular area to be filled synoptic diagram in the embodiment of the invention two;
Fig. 4 A is the cell area schematic in the embodiment of the invention three;
Fig. 4 B is that treating in the embodiment of the invention three reduced the rectangular area synoptic diagram;
Fig. 4 C is the rectangular area to be filled synoptic diagram in the embodiment of the invention three;
Fig. 5 A is the cell area schematic in the embodiment of the invention four;
Fig. 5 B is that treating in the embodiment of the invention four reduced the rectangular area synoptic diagram;
Fig. 5 C is the rectangular area to be filled synoptic diagram in the embodiment of the invention four;
The apparatus structure synoptic diagram that Fig. 6 provides for the embodiment of the invention.
Embodiment
In order to improve the effect that the cell in the electrical form is highlighted, the embodiment of the invention provides the display packing of the background colour in a kind of electrical form, in this method, behind user's selected cell lattice zone, will be in the cell of same row and be shown as the color of the background colour that is different from other unchecked cells with this cell zone with the background colour that this cell zone is in the cell of same row.
Referring to Fig. 1, the background colour display packing in the electrical form that the embodiment of the invention provides specifically may further comprise the steps:
Step 10: the positional information of determining the cell zone that the user chooses;
Step 11: according to the positional information in described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Step 12: treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
Step 13:, the background colour of the cell in the described rectangular area to be filled is shown as the color of the background colour of the unchecked cell of the predefined user of being different from according to the positional information of described rectangular area to be filled.
In the step 10, when comprising a cell, determine that the specific implementation of the positional information in the cell zone that the user chooses can be as follows in the cell zone that the user chooses:
At first, obtain the mouse point coordinate of user when choosing the cell zone and the time press mouse, determine the row number of the cell that the user chooses and row number according to this mouse point coordinate;
Then, the row of the cell of choosing according to the user number and row number are determined the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
Certainly, the user also can choose the cell zone by keyboard, and at this moment, the position in the cell zone chosen is determined in the position of the key that can press according to the user.
Concrete, the row of the cell that above-mentioned definite user chooses number and row number, its specific implementation can comprise the steps A and step B:
The capable height that the ordinate in A, the mouse point coordinate when mouse is pressed and the N of electrical form are capable subtracts each other, and judges whether to subtract each other the result less than 0, if determine that then the row of the cell that the user chooses number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
The col width of the horizontal ordinate in B, the mouse point coordinate when mouse is pressed and the M of described electrical form row subtracts each other, and judges and whether subtracts each other the result less than 0, if determine that then the row of the cell that the user chooses number are M; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1.
Above-mentioned according to described row number and row number, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user, its specific implementation can be as follows:
At first, determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1:
Figure BDA0000039743470000051
Figure BDA0000039743470000052
The horizontal ordinate x of the left upper apex in the cell zone of then, the user being chosen 1, ordinate y 1And the row of described electrical form is high and the positional information in the cell zone that col width is chosen as the user.Certainly, also can be with the horizontal ordinate x on the summit, bottom right in cell zone 2, ordinate y 2And the row of described electrical form is high and the positional information in the cell zone that col width is chosen as the user, perhaps, and with the horizontal ordinate x of the left upper apex in cell zone 1, ordinate y 1And the horizontal ordinate x on the summit, bottom right in cell zone 2, ordinate y 2The positional information in the cell zone of choosing as the user, or the like, as long as this positional information can unique determining unit lattice zone.
In the step 10, when comprising a plurality of cell, determine that the specific implementation of the positional information in the cell zone that the user chooses can be as follows in described cell zone:
At first, obtain the first mouse point coordinate of user when choosing the cell zone and the time press mouse and the second mouse point coordinate when discharging mouse, the row of mouse point place cell number and be listed as number when determining that according to the first mouse point coordinate mouse is pressed; The row of mouse point place cell number and be listed as number when determining that according to the second mouse point coordinate mouse discharges;
Then, the row of mouse point place cell number and be listed as number when the row of mouse point place cell number and row number and mouse discharge when pressing according to mouse, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
Certainly, the user also can choose the cell zone by keyboard, and at this moment, the position in the cell zone chosen is determined in the position of the key that can press according to the user.
Concrete, the above-mentioned row number of mouse point place cell and row number when determining that according to the first mouse point coordinate mouse is pressed, the row of mouse point place cell number and be listed as number when determining that according to the second mouse point coordinate mouse discharges, its specific implementation can comprise the steps A-step D:
A, the N every trade height of ordinate in the first mouse point coordinate and electrical form is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse is pressed number is N less than 0; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the first mouse point coordinate and electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse is pressed number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1;
C, the capable height that the P of ordinate in the second mouse point coordinate and electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse discharges number is P; Otherwise, the value of P is added 1, and repeat this step C, wherein the initial value of P is 1;
D, the col width of the Q of horizontal ordinate in the second mouse point coordinate and electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse discharges number are Q less than 0; Otherwise, the value of Q is added 1, and repeat this step D, wherein the initial value of Q is 1.
Need to prove, the sequential relationship of not fixing between the above-mentioned steps A-step D, any execution sequence of steps A-step D is all in protection scope of the present invention.
Above-mentioned when the row number of mouse point place cell and row number and mouse discharge when pressing according to mouse mouse point place cell row number and be listed as number, determine the apex coordinate in the cell zone that the user chooses, its specific implementation can be as follows:
At first, determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1, and the horizontal ordinate x on the summit, bottom right in the cell zone chosen of user 2With ordinate y 2:
Figure BDA0000039743470000071
Figure BDA0000039743470000072
Figure BDA0000039743470000074
Wherein, a is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; C is the maximum column number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the maximum line number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse;
Then, with horizontal ordinate x 1, ordinate y 1, horizontal ordinate x 2With ordinate y 2The positional information in the cell zone of choosing as the user.Certainly, the also positional information in the cell zone that the horizontal ordinate on the horizontal ordinate on the upper right summit in cell zone and summit, lower-left can be chosen as the user, or the like, as long as this positional information can unique determining unit lattice zone.
In the step 11, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted that its specific implementation can be as follows:
Determine that first treats the horizontal ordinate x of the left upper apex of cutting rectangular area 3Be the horizontal ordinate of the left upper apex of the first column unit lattice of electrical form, ordinate y 3Ordinate for the left upper apex in described cell zone; First treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 4Be the horizontal ordinate on the summit, bottom right of last column unit lattice of electrical form, ordinate y 4Ordinate for the summit, bottom right in described cell zone;
Determine that second treats the horizontal ordinate x of the left upper apex of cutting rectangular area 5Be the horizontal ordinate of the left upper apex in described cell zone, ordinate y 5The ordinate of left upper apex for the first row cell of electrical form; Second treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 6Be the horizontal ordinate on the summit, bottom right in described cell zone, ordinate y 6Ordinate for the summit, bottom right of last column cell of electrical form.
Concrete, can calculate x according to following formula 3, x 4, y 5, y 6:
Figure BDA0000039743470000081
E is the row number of the upper left cell in cell zone;
F is the row number of the bottom-right cell lattice in cell zone, and g is the row number of last column unit lattice of electrical form;
Figure BDA0000039743470000083
H is the row number of the upper left cell in cell zone;
Figure BDA0000039743470000084
J is the row number of the bottom-right cell lattice in cell zone, and k is the row number of last column cell of electrical form.
In the step 12, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back that its specific implementation can be as follows:
Call rectangle difference set computing method function, treat that with first cutting rectangular area and second treats that the positional information of cutting rectangular area inputs to this rectangle difference set computing method function as input parameter;
After carrying out described rectangle difference set computing method function, the positional information of four rectangular areas of output is defined as rectangular area to be filled with these four rectangular areas.
Above-mentioned rectangle difference set computing method function is the method function that is used to be achieved as follows function in the programming language: according to the positional information of a plurality of rectangular areas of importing, determine polygon by this a plurality of rectangular area constituted, reduce overlapping region that will these a plurality of rectangular areas in this polygon, the positional information of the remaining rectangular area that output obtains.The instrument class methods SwingUtilities.computeDifference () that this rectangle difference set computing method function can be java etc.
In the step 13, the background colour of the cell in the rectangular area to be filled is shown as the color that sets in advance, its specific implementation can be as follows:
At first, obtain predefined colouring information;
Then, make up the free curve object, the positional information of described rectangular area to be filled is added to one by one in the free curve object of structure by object adding method function;
At last, call the pattern drawing method function, described free curve object is inputed to this pattern drawing method function as input parameter, the background colour of the cell in the described rectangular area to be filled is filled to the represented color of described colouring information by carrying out this pattern drawing method function.
Above-mentioned pattern drawing method function is the function that can realize the graphic plotting function, and the graphic plotting function comprises drawing to the enclosed region Fill Color of input, to the enclosed region of input and adds black, overstriking frame etc.The fill () method that this pattern drawing method function can be Graphics2D etc.
Preferable, if described cell zone comprises a cell, then after the background colour with the cell in the rectangular area to be filled is shown as predefined color, the background colour of the cell in the described cell zone can be shown as with described rectangular area to be filled in the different color of background colour of cell; And with the frame overstriking in described cell zone and widen.
If described cell zone comprises a plurality of cells, then after the background colour with the cell in the rectangular area to be filled is shown as predefined color, the background colour of active cell in the described cell zone can be shown as with described rectangular area to be filled in the different color of background colour of cell; The background colour of non-active cell in the described cell zone is shown as the different color of background colour with the background colour and the cell in the described rectangular area to be filled of described active cell; And the frame in described cell zone is shown as thin frame.The active cell here is generally the cell that mouse (or keyboard) pulls mouse (or keyboard) place when pressing mouse (or keyboard) in the process, and other cells of choosing are non-active cell.
Preferable, after the background colour with the cell in the rectangular area to be filled is shown as predefined color, and when definite user chooses the cell zone again, the background colour of all cells of current demonstration can be refreshed and be the initial background look.
Among the present invention, the cell zone that the user chooses can be for one or more.Each cell zone can comprise one or more cells.
The present invention will be described below in conjunction with specific embodiment:
Embodiment one:
The user chooses a cell zone in the present embodiment, and this cell zone is made of a cell, and is shown in Fig. 2 A, specific as follows:
Step 1: mouse or keyboard carry out the collection of drawing data when cell is chosen.
Mouse point coordinate when obtaining mouse and pressing by the high col width of row of the form that adds up, calculates the ranks number of the pairing cell of this mouse point coordinate.
Step 2: according to the ranks of selected cell number, calculate the coordinate data of this element lattice on view, this coordinate data is built into a rectangle (Rectangle) object.What the cell that calculating is expert at by this cell constituted first treats the cutting rectangular area and second treats the coordinate data of cutting rectangular area by what the cell of this cell zone column constituted, and first treats that cutting rectangular area and second treats that the cutting rectangular area is shown in Fig. 2 B.
Step 3: treat that with first cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four rectangular areas to be filled after this method, record is also preserved this four rectangular areas to be filled (Rantangle) object, and these four rectangular areas to be filled are shown in the shadow region among Fig. 2 C.
Step 4: the realization that background colour is drawn comprises:
The background colour of rendered object is set;
Make up the GeneralPath object, 4 Rantangle objects with step 3 record add among the GeneralPath by append () method one by one;
The fill () method of use Graphics2D is drawn out the background colour of 4 Rantangle;
The white background of the active cell that drafting is chosen;
Draw the thick frame of active cell black.
Embodiment two:
The user chooses two cell zones in the present embodiment, and each cell zone is made of a cell, and is as shown in Figure 3A, specific as follows:
Step 1: mouse or keyboard carry out the collection of drawing data when cell is chosen.
The multiselect region operation is pinned the ctrl key, and left mouse button is clicked two non-conterminous cells respectively.
When each left mouse button is pressed, obtain the mouse point coordinate,, calculate the ranks number of the pairing cell of each mouse point coordinate by the high col width of row of the form that adds up.
Step 2: according to the ranks of the pairing cell of each mouse point coordinate number, calculate the coordinate data of each cell on view, the coordinate data that obtains is built into a Rectangle object.Coordinate data for each cell of preserving in the Rectangle object, what the cell that calculating is expert at by this cell constituted first treats the cutting rectangular area and second treats the coordinate data of cutting rectangular area by what the cell of this cell zone column constituted, and first treats that cutting rectangular area and second treats that the cutting rectangular area is shown in Fig. 3 B.
Step 3: first of first cell correspondence is treated that cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four Rectangle to be filled after this method, write down and preserve these four Rectangle objects to be filled.
First of second cell correspondence treated that cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four Rectangle to be filled after this method, record is also preserved these four Rectangle objects to be filled, and Rectangle to be filled is shown in the shadow region among Fig. 3 C.
Step 4: the realization that background colour is drawn comprises:
The background colour of rendered object is set;
Make up the GeneralPath object, 8 Rantangle objects with step 3 is collected add among the GeneralPath by append () method one by one;
The fill () method of use Graphics2D is drawn out the background colour of 8 Rantangle;
Draw the background colour of non-active cell;
The white background of the active cell that drafting is chosen;
Draw the thin frame of black of active cell.
Embodiment three:
The user chooses a cell zone in the present embodiment, and this cell zone is made of a plurality of cells, and is shown in Fig. 4 A, specific as follows:
Step 1: mouse or keyboard carry out the collection of drawing data when cell is chosen.
When the adjacent cell of a slice is pressed and pulled out to mouse, mouse point coordinate when mouse point coordinate when obtaining mouse and pressing and mouse discharge, by the high col width of row of the form that adds up, calculate the ranks number of a plurality of cells selected between these two mouse points.Use the basicRange object representation, the ranks of mouse point place cell number when the ranks of mouse point place cell number and mouse discharge when wherein writing down mouse and pressing;
Step 2: according to the ranks of basicRange object record number, calculate the coordinate data of cell zone on view that the user chooses, this coordinate data is built into a Rectangle object.What the cell that calculating is expert at by this cell zone constituted first treats the cutting rectangular area and second treats the coordinate data of cutting rectangular area by what the cell of this cell zone column constituted, and first treats that cutting rectangular area and second treats that the cutting rectangular area is shown in Fig. 4 B.
Step 3: treat that with first cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four Rectangle to be filled after this method, record is also preserved these four Rectangle objects to be filled, and Rectangle to be filled is shown in the shadow region among Fig. 4 C.
Step 4: the realization that background colour is drawn comprises:
The background colour of rendered object is set;
Make up the GeneralPath object, 4 Rantangle objects with step 3 is collected add among the GeneralPath by append () method one by one;
The fill () method of use Graphics2D is drawn out the background colour of 4 Rantangle;
The background colour in the cell zone that drafting is chosen;
The white background of the active cell that drafting is chosen;
The thick frame of drawing unit lattice zone black.
Embodiment four:
The user chooses two cell zones in the present embodiment, and each cell zone is made of a plurality of cells, and is shown in Fig. 5 A, specific as follows:
Step 1: mouse or keyboard carry out the collection of drawing data when cell is chosen.
The multiselect region operation is pinned the ctrl key, and two non-conterminous a plurality of cells zones are clicked and pulled to left mouse button respectively.
When the adjacent cell of a slice is pressed and pulled out to each mouse, the mouse point coordinate when mouse point coordinate when obtaining mouse and pressing and mouse discharge; By the high col width of row of the form that adds up, calculate the ranks number of a plurality of cells selected between these two mouse points, and the ranks number of mouse point place cell when the ranks of record mouse mouse point place cell when pressing number and mouse release.
Step 2: the ranks number according to record, calculate each cell zone coordinate data on view, this coordinate data is built into a Rectangle object.For each cell zone, what the cell that calculating is expert at by this cell zone constituted first treats the cutting rectangular area and second treats the coordinate data of cutting rectangular area by what the cell of this cell zone column constituted, and first treats that cutting rectangular area and second treats that the cutting rectangular area is shown in Fig. 5 B.
Step 3: with first cell zone corresponding first treat that cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four Rectangle to be filled after this method, write down and preserve these four Rectangle objects to be filled.
With second cell zone corresponding first treat that cutting rectangular area and second treats the instrument class cut-out method SwingUtilities.computeDifference () of the coordinate data input java of cutting rectangular area, carry out the coordinate data that obtains four Rectangle to be filled after this method, record is also preserved these four Rectangle objects to be filled, and Rectangle to be filled is shown in the shadow region among Fig. 5 C.
Step 4: the realization that background colour is drawn comprises:
The background colour of rendered object is set;
Make up the GeneralPath object, 8 Rantangle objects with step 3 is collected add among the GeneralPath by append () method one by one;
The fill () method of use Graphics2D is drawn out the background colour of 8 Rantangle;
Draw the background colour of non-active cell;
The white background of the active cell that drafting is chosen;
Draw the thin frame of black of active cell.
Referring to Fig. 6, the embodiment of the invention also provides the display device of the background colour in a kind of electrical form, and this device comprises:
Cell regional location determining unit 30, the positional information in the cell zone that is used for determining that the user chooses;
Treat cutting rectangular area determining unit 31, be used for the positional information according to described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Rectangular area to be filled determining unit 32, be used for treating that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
Background colour display unit 33 is used for the positional information according to described rectangular area to be filled, and the background colour of the cell in the described rectangular area to be filled is shown as the color different with the background colour of unchecked cell.
Further, described cell regional location determining unit 30 is used for:
When described cell zone comprised a cell, the mouse point coordinate when obtaining mouse and pressing was determined the row number of the cell that the user chooses and row number according to this mouse point coordinate;
According to described row number and row number, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
Further, described cell regional location determining unit 30 is used for:
When described cell zone comprises a plurality of cell, the second mouse point coordinate when first mouse point coordinate when obtaining mouse and pressing and mouse discharge, the row of mouse point place cell number and be listed as number when determining that according to the first mouse point coordinate mouse is pressed; The row of mouse point place cell number and be listed as number when determining that according to the second mouse point coordinate mouse discharges;
The row of mouse point place cell number and be listed as number when the row of mouse point place cell number and row number and mouse discharge when pressing according to mouse, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
Further, described cell regional location determining unit 30 is used for: carry out following steps A, B:
A, the capable height that the N of ordinate in the described mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of the cell that the user chooses number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the described mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of the cell that the user chooses number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1.
Further, described cell regional location determining unit 30 is used for:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1:
Figure BDA0000039743470000151
Figure BDA0000039743470000152
With horizontal ordinate x 1, ordinate y 1And the row of described electrical form is high and the positional information in the cell zone that col width is chosen as the user.
Further, described cell regional location determining unit 30 is used for: carry out following steps A, B, C and D:
A, the capable height that the N of ordinate in the first mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse is pressed number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the first mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse is pressed number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1;
C, the capable height that the P of ordinate in the second mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse discharges number is P; Otherwise, the value of P is added 1, and repeat this step C, wherein the initial value of P is 1;
D, the col width of the Q of horizontal ordinate in the second mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse discharges number are Q less than 0; Otherwise, the value of Q is added 1, and repeat this step D, wherein the initial value of Q is 1.
Further, described cell regional location determining unit 30 is used for:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1, and the horizontal ordinate x on the summit, bottom right in the cell zone chosen of user 2With ordinate y 2:
Figure BDA0000039743470000161
Figure BDA0000039743470000162
Figure BDA0000039743470000163
Figure BDA0000039743470000164
Wherein, a is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; C is the maximum column number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the maximum line number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse;
With horizontal ordinate x 1, ordinate y 1, horizontal ordinate x 2With ordinate y 2The positional information in the cell zone of choosing as the user.
Further, the described cutting rectangular area determining unit 31 for the treatment of is used for:
Determine that first treats the horizontal ordinate x of the left upper apex of cutting rectangular area 3Be the horizontal ordinate of the left upper apex of the first column unit lattice of described electrical form, ordinate y 3Ordinate for the left upper apex in described cell zone; First treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 4Be the horizontal ordinate on the summit, bottom right of last column unit lattice of described electrical form, ordinate y 4Ordinate for the summit, bottom right in described cell zone;
Determine that second treats the horizontal ordinate x of the left upper apex of cutting rectangular area 5Be the horizontal ordinate of the left upper apex in described cell zone, ordinate y 5The ordinate of left upper apex for the first row cell of described electrical form; Second treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 6Be the horizontal ordinate on the summit, bottom right in described cell zone, ordinate y 6Ordinate for the summit, bottom right of last column cell of described electrical form.
Further, described rectangular area to be filled determining unit 32 is used for:
Call rectangle difference set computing method function, treat that with first cutting rectangular area and second treats that the positional information of cutting rectangular area inputs to this rectangle difference set computing method function as input parameter;
After carrying out described rectangle difference set computing method function, the positional information of four rectangular areas of output is defined as rectangular area to be filled with these four rectangular areas.
Further, described background colour display unit 33 is used for:
Obtain the predefined colouring information different with the background colour of unchecked cell;
Make up the free curve object, the positional information of described rectangular area to be filled is added in the described free curve object one by one by object adding method function;
Call the pattern drawing method function, described free curve object is inputed to this method function as input parameter, and the method function by carrying out this is filled to the represented color of described colouring information with the background colour of the cell in the described rectangular area to be filled.
Further, this device also comprises:
Highlight unit 34, when being used for comprising a cell in described cell zone, with the background colour of the cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell; With the frame overstriking in described cell zone and widen.
When described cell zone comprises a plurality of cell, with the background colour of active cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell; The background colour of non-active cell in the described cell zone is shown as the different color of background colour with the background colour and the cell in the described rectangular area to be filled of described active cell; Draw the thin frame in described cell zone.
Further, this device also comprises:
Background colour recovery unit 35, be used for after the background colour with the cell of described rectangular area to be filled is shown as predefined color, determine that the user chooses cell when zone again, the background colour of all cells of current demonstration is refreshed be the initial background look.
To sum up, beneficial effect of the present invention comprises:
In the scheme that the embodiment of the invention provides, after determining the positional information in the cell zone that the user chooses, according to the positional information in described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted; Treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back; According to the positional information of described rectangular area to be filled, the background colour of the cell in the described rectangular area to be filled is shown as the predefined color that is different from the background colour of other unchecked cells.Because comprising the cell zone of choosing with the user in the rectangular area of determining according to the present invention to be filled is in the cell of same row and is in the cell of same row with this cell zone, therefore, after the background colour of the cell in the rectangular area to be filled is shown as the color of the background colour that is different from other unchecked cells, promptly reached and to be in the cell of same row with the cell zone that the user chooses, and be shown as the effect of the color of the background colour that is different from other unchecked cells with the background colour that this cell zone is in the cell of same row, and then make the user can be clearer in electrical form directly perceived, find faster and the go together data of same column of selected cell, be convenient to reference and the comparison of user on particular data, can clearer demonstration utilization situation when the intersection utilization of formula.As seen, adopt the present invention, can effectively improve the effect that the cell in the electrical form is highlighted.
The present invention is that reference is described according to the process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block scheme and/or square frame and process flow diagram and/or the block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computing machine or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of carrying out on computing machine or other programmable devices is provided for being implemented in the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic creative notion of cicada, then can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (26)

1. the background colour display packing in the electrical form is characterized in that this method comprises:
Determine the positional information in the cell zone that the user chooses;
According to the positional information in described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
According to the positional information of described rectangular area to be filled, the background colour of the cell in the described rectangular area to be filled is shown as the color different with the background colour of unchecked cell.
2. the method for claim 1 is characterized in that, when comprising a cell in described cell zone, the positional information in the cell zone that described definite user chooses comprises:
Mouse point coordinate when obtaining mouse and pressing is determined the row number of the cell that the user chooses and row number according to this mouse point coordinate;
According to described row number and row number, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
3. the method for claim 1 is characterized in that, when comprising a plurality of cell in described cell zone, the positional information in the cell zone that described definite user chooses comprises:
The second mouse point coordinate when first mouse point coordinate when obtaining mouse and pressing and mouse discharge, the row of mouse point place cell number and be listed as number when determining that according to the first mouse point coordinate mouse is pressed; The row of mouse point place cell number and be listed as number when determining that according to the second mouse point coordinate mouse discharges;
The row of mouse point place cell number and be listed as number when the row of mouse point place cell number and row number and mouse discharge when pressing according to mouse, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
4. method as claimed in claim 2 is characterized in that, describedly determines that according to this mouse point coordinate the row number of the cell that the user chooses and row number comprise:
A, the capable height that the N of ordinate in the described mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of the cell that the user chooses number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the described mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of the cell that the user chooses number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1.
5. method as claimed in claim 2 is characterized in that, and is described according to described row number and row number, determines the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user comprises:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1:
Figure FDA0000039743460000022
With horizontal ordinate x 1, ordinate y 1And the row of described electrical form is high and the positional information in the cell zone that col width is chosen as the user.
6. method as claimed in claim 3 is characterized in that, the described row number of mouse point place cell and row number when determining that according to the first mouse point coordinate mouse is pressed; The row of mouse point place cell number and being listed as number comprises when determining that according to the second mouse point coordinate mouse discharges:
A, the capable height that the N of ordinate in the first mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse is pressed number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the first mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse is pressed number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1;
C, the capable height that the P of ordinate in the second mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse discharges number is P; Otherwise, the value of P is added 1, and repeat this step C, wherein the initial value of P is 1;
D, the col width of the Q of horizontal ordinate in the second mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse discharges number are Q less than 0; Otherwise, the value of Q is added 1, and repeat this step D, wherein the initial value of Q is 1.
7. method as claimed in claim 3, it is characterized in that, described when the row number of mouse point place cell and row number and mouse discharge when pressing according to mouse mouse point place cell row number and be listed as number, determine that the apex coordinate in the cell zone that the user chooses comprises:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1, and the horizontal ordinate x on the summit, bottom right in the cell zone chosen of user 2With ordinate y 2:
Figure FDA0000039743460000032
Figure FDA0000039743460000033
Figure FDA0000039743460000034
Wherein, a is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; C is the maximum column number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the maximum line number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse;
With horizontal ordinate x 1, ordinate y 1, horizontal ordinate x 2With ordinate y 2The positional information in the cell zone of choosing as the user.
8. as arbitrary described method among the claim 1-7, it is characterized in that, what described positional information according to described cell zone, the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats that the positional information of cutting rectangular area comprises by what the cell of described cell zone column constituted:
Determine that first treats the horizontal ordinate x of the left upper apex of cutting rectangular area 3Be the horizontal ordinate of the left upper apex of the first column unit lattice of described electrical form, ordinate y 3Ordinate for the left upper apex in described cell zone; First treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 4Be the horizontal ordinate on the summit, bottom right of last column unit lattice of described electrical form, ordinate y 4Ordinate for the summit, bottom right in described cell zone;
Determine that second treats the horizontal ordinate x of the left upper apex of cutting rectangular area 5Be the horizontal ordinate of the left upper apex in described cell zone, ordinate y 5The ordinate of left upper apex for the first row cell of described electrical form; Second treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 6Be the horizontal ordinate on the summit, bottom right in described cell zone, ordinate y 6Ordinate for the summit, bottom right of last column cell of described electrical form.
9. as arbitrary described method among the claim 1-7, it is characterized in that, describedly treat that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first the positional information that cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops remaining rectangular area to be filled, back comprises:
Call rectangle difference set computing method function, treat that with first cutting rectangular area and second treats that the positional information of cutting rectangular area inputs to this rectangle difference set computing method function as input parameter;
After carrying out described rectangle difference set computing method function, the positional information of four rectangular areas of output is defined as rectangular area to be filled with these four rectangular areas.
10. as arbitrary described method among the claim 1-7, it is characterized in that described positional information according to described rectangular area to be filled is shown as the color that sets in advance with the background colour of the cell in the described rectangular area to be filled and comprises:
Obtain the predefined colouring information different with the background colour of unchecked cell;
Make up the free curve object, the positional information of described rectangular area to be filled is added in the described free curve object one by one by object adding method function;
Call the pattern drawing method function, described free curve object is inputed to this method function as input parameter, and the method function by carrying out this is filled to the represented color of described colouring information with the background colour of the cell in the described rectangular area to be filled.
11. as arbitrary described method among the claim 1-7, it is characterized in that, if described cell zone comprises a cell, then after the background colour with the cell in the described rectangular area to be filled was shown as predefined color, this method further comprised:
With the background colour of the cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell;
With the frame overstriking in described cell zone and widen.
12. as arbitrary described method among the claim 1-7, it is characterized in that, if described cell zone comprises a plurality of cells, then after the background colour with the cell in the described rectangular area to be filled was shown as predefined color, this method further comprised:
With the background colour of active cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell;
The background colour of non-active cell in the described cell zone is shown as the different color of background colour with the background colour and the cell in the described rectangular area to be filled of described active cell;
Draw the thin frame in described cell zone.
13., it is characterized in that after the background colour with the cell in the described rectangular area to be filled was shown as predefined color, this method further comprised as arbitrary described method among the claim 1-7:
Determine that the user chooses cell when zone again, the background colour of all cells of current demonstration is refreshed be the initial background look.
14., it is characterized in that the cell zone that the user chooses is for one or more as arbitrary described method among the claim 1-7.
15. the background colour display device in the electrical form is characterized in that this device comprises:
Cell regional location determining unit, the positional information in the cell zone that is used for determining that the user chooses;
Treat cutting rectangular area determining unit, be used for the positional information according to described cell zone, what the cell of determining to be expert at by described cell zone constituted first treats the cutting rectangular area and second treats the positional information of cutting rectangular area by what the cell of described cell zone column constituted;
Rectangular area to be filled determining unit, be used for treating that according to first cutting rectangular area and second treats the positional information of cutting rectangular area, determine to treat that with first cutting rectangular area and second treats that the overlapping region of cutting rectangular area crops the positional information of remaining rectangular area to be filled, back;
The background colour display unit is used for the positional information according to described rectangular area to be filled, and the background colour of the cell in the described rectangular area to be filled is shown as the color different with the background colour of unchecked cell.
16. device as claimed in claim 15 is characterized in that, described cell regional location determining unit is used for:
When described cell zone comprised a cell, the mouse point coordinate when obtaining mouse and pressing was determined the row number of the cell that the user chooses and row number according to this mouse point coordinate;
According to described row number and row number, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
17. device as claimed in claim 15 is characterized in that, described cell regional location determining unit is used for:
When described cell zone comprises a plurality of cell, the second mouse point coordinate when first mouse point coordinate when obtaining mouse and pressing and mouse discharge, the row of mouse point place cell number and be listed as number when determining that according to the first mouse point coordinate mouse is pressed; The row of mouse point place cell number and be listed as number when determining that according to the second mouse point coordinate mouse discharges;
The row of mouse point place cell number and be listed as number when the row of mouse point place cell number and row number and mouse discharge when pressing according to mouse, determine the apex coordinate in the cell zone that the user chooses, and the positional information in the cell zone that this apex coordinate is chosen as the user.
18. device as claimed in claim 16 is characterized in that, described cell regional location determining unit is used to carry out following steps A, B:
A, the capable height that the N of ordinate in the described mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of the cell that the user chooses number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the described mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of the cell that the user chooses number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1.
19. device as claimed in claim 16 is characterized in that, described cell regional location determining unit is used for:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1:
Figure FDA0000039743460000071
Figure FDA0000039743460000072
With horizontal ordinate x 1, ordinate y 1And the row of described electrical form is high and the positional information in the cell zone that col width is chosen as the user.
20. device as claimed in claim 17 is characterized in that, described cell regional location determining unit is used to carry out following steps A, B, C and D:
A, the capable height that the N of ordinate in the first mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse is pressed number is N; Otherwise, the value of N is added 1, and repeat this steps A, wherein the initial value of N is 1;
B, the col width of the M of horizontal ordinate in the first mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse is pressed number are M less than 0; Otherwise, the value of M is added 1, and repeat this step B, wherein the initial value of M is 1;
C, the capable height that the P of ordinate in the second mouse point coordinate and described electrical form is capable subtract each other, and judge whether to subtract each other the result less than 0, if determine that then the row of mouse point place cell when mouse discharges number is P; Otherwise, the value of P is added 1, and repeat this step C, wherein the initial value of P is 1;
D, the col width of the Q of horizontal ordinate in the second mouse point coordinate and described electrical form row is subtracted each other, judge and whether subtract each other the result, if determine that then the row of mouse point place cell when mouse discharges number are Q less than 0; Otherwise, the value of Q is added 1, and repeat this step D, wherein the initial value of Q is 1.
21. device as claimed in claim 17 is characterized in that, described cell regional location determining unit is used for:
Determine the horizontal ordinate x of the left upper apex in the cell zone that the user chooses according to following formula 1With ordinate y 1, and the horizontal ordinate x on the summit, bottom right in the cell zone chosen of user 2With ordinate y 2:
Figure FDA0000039743460000081
Figure FDA0000039743460000082
Figure FDA0000039743460000084
Wherein, a is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the minimum row number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; C is the maximum column number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse; B is the maximum line number in the row number of the row of mouse mouse point place cell when pressing mouse point place cell when number discharging with mouse;
With horizontal ordinate x 1, ordinate y 1, horizontal ordinate x 2With ordinate y 2The positional information in the cell zone of choosing as the user.
22., it is characterized in that the described cutting rectangular area determining unit for the treatment of is used for as arbitrary described device among the claim 15-21:
Determine that first treats the horizontal ordinate x of the left upper apex of cutting rectangular area 3Be the horizontal ordinate of the left upper apex of the first column unit lattice of described electrical form, ordinate y 3Ordinate for the left upper apex in described cell zone; First treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 4Be the horizontal ordinate on the summit, bottom right of last column unit lattice of described electrical form, ordinate y 4Ordinate for the summit, bottom right in described cell zone;
Determine that second treats the horizontal ordinate x of the left upper apex of cutting rectangular area 5Be the horizontal ordinate of the left upper apex in described cell zone, ordinate y 5The ordinate of left upper apex for the first row cell of described electrical form; Second treats the horizontal ordinate x on the summit, bottom right of cutting rectangular area 6Be the horizontal ordinate on the summit, bottom right in described cell zone, ordinate y 6Ordinate for the summit, bottom right of last column cell of described electrical form.
23., it is characterized in that described rectangular area to be filled determining unit is used for as arbitrary described device among the claim 15-21:
Call rectangle difference set computing method function, treat that with first cutting rectangular area and second treats that the positional information of cutting rectangular area inputs to this rectangle difference set computing method function as input parameter;
After carrying out described rectangle difference set computing method function, the positional information of four rectangular areas of output is defined as rectangular area to be filled with these four rectangular areas.
24., it is characterized in that described background colour display unit is used for as arbitrary described device among the claim 15-21:
Obtain the predefined colouring information different with the background colour of unchecked cell;
Make up the free curve object, the positional information of described rectangular area to be filled is added in the described free curve object one by one by object adding method function;
Call the pattern drawing method function, described free curve object is inputed to this method function as input parameter, and the method function by carrying out this is filled to the represented color of described colouring information with the background colour of the cell in the described rectangular area to be filled.
25., it is characterized in that this device also comprises as arbitrary described device among the claim 15-21:
Highlight the unit, when being used for comprising a cell in described cell zone, with the background colour of the cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell; With the frame overstriking in described cell zone and widen;
When described cell zone comprises a plurality of cell, with the background colour of active cell in the described cell zone be shown as with described rectangular area to be filled in the different color of background colour of cell; The background colour of non-active cell in the described cell zone is shown as the different color of background colour with the background colour and the cell in the described rectangular area to be filled of described active cell; Draw the thin frame in described cell zone.
26., it is characterized in that this device also comprises as arbitrary described device among the claim 15-21:
The background colour recovery unit, be used for after the background colour with the cell of described rectangular area to be filled is shown as predefined color, determine that the user chooses cell when zone again, the background colour of all cells of current demonstration is refreshed be the initial background look.
CN2010105993120A 2010-12-21 2010-12-21 Method and device for displaying background color in electronic form Active CN102043586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105993120A CN102043586B (en) 2010-12-21 2010-12-21 Method and device for displaying background color in electronic form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105993120A CN102043586B (en) 2010-12-21 2010-12-21 Method and device for displaying background color in electronic form

Publications (2)

Publication Number Publication Date
CN102043586A true CN102043586A (en) 2011-05-04
CN102043586B CN102043586B (en) 2012-11-14

Family

ID=43909750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105993120A Active CN102043586B (en) 2010-12-21 2010-12-21 Method and device for displaying background color in electronic form

Country Status (1)

Country Link
CN (1) CN102043586B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970735A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Row-column highlighting method of target cell in webpage Table
CN105631008A (en) * 2015-12-28 2016-06-01 深圳市万普拉斯科技有限公司 Webpage display method and system
CN106502972A (en) * 2015-09-08 2017-03-15 北京国双科技有限公司 The methods of exhibiting and device of data mode
CN106557488A (en) * 2015-09-25 2017-04-05 北京奇虎科技有限公司 A kind of methods of exhibiting and device of available resources use state
CN108920145A (en) * 2018-05-08 2018-11-30 陕西法士特齿轮有限责任公司 A kind of UI table color lump moving method
CN110245336A (en) * 2018-03-08 2019-09-17 北大方正集团有限公司 Table method for drafting and device
CN112487769A (en) * 2019-08-23 2021-03-12 珠海金山办公软件有限公司 Cell background generation method and device
CN113448473A (en) * 2021-06-23 2021-09-28 深圳市润天智数字设备股份有限公司 Visual operation method and device for picture cutting area

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862527A (en) * 2006-06-09 2006-11-15 无锡永中科技有限公司 Method of line header and row header showing information in electronic table
US20070050697A1 (en) * 2005-08-23 2007-03-01 International Business Machines Corporation Integrated spreadsheet expanding table with collapsable columns
CN101299209A (en) * 2008-07-01 2008-11-05 金蝶软件(中国)有限公司 Method and device for high bright displaying form editing row

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070050697A1 (en) * 2005-08-23 2007-03-01 International Business Machines Corporation Integrated spreadsheet expanding table with collapsable columns
CN1862527A (en) * 2006-06-09 2006-11-15 无锡永中科技有限公司 Method of line header and row header showing information in electronic table
CN101299209A (en) * 2008-07-01 2008-11-05 金蝶软件(中国)有限公司 Method and device for high bright displaying form editing row

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970735A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Row-column highlighting method of target cell in webpage Table
CN106502972A (en) * 2015-09-08 2017-03-15 北京国双科技有限公司 The methods of exhibiting and device of data mode
CN106502972B (en) * 2015-09-08 2019-06-04 北京国双科技有限公司 The methods of exhibiting and device of data mode
CN106557488A (en) * 2015-09-25 2017-04-05 北京奇虎科技有限公司 A kind of methods of exhibiting and device of available resources use state
CN105631008A (en) * 2015-12-28 2016-06-01 深圳市万普拉斯科技有限公司 Webpage display method and system
CN105631008B (en) * 2015-12-28 2020-05-15 深圳市万普拉斯科技有限公司 Webpage display method and system
CN110245336A (en) * 2018-03-08 2019-09-17 北大方正集团有限公司 Table method for drafting and device
CN110245336B (en) * 2018-03-08 2021-12-03 北大方正集团有限公司 Table drawing method and device
CN108920145A (en) * 2018-05-08 2018-11-30 陕西法士特齿轮有限责任公司 A kind of UI table color lump moving method
CN108920145B (en) * 2018-05-08 2022-04-19 陕西法士特齿轮有限责任公司 UI table color block moving method
CN112487769A (en) * 2019-08-23 2021-03-12 珠海金山办公软件有限公司 Cell background generation method and device
CN113448473A (en) * 2021-06-23 2021-09-28 深圳市润天智数字设备股份有限公司 Visual operation method and device for picture cutting area
CN113448473B (en) * 2021-06-23 2023-10-27 深圳市润天智数字设备股份有限公司 Visual operation method and device for picture cropping area

Also Published As

Publication number Publication date
CN102043586B (en) 2012-11-14

Similar Documents

Publication Publication Date Title
CN102043586B (en) Method and device for displaying background color in electronic form
CN108228169B (en) Chart making method, device, equipment and medium based on eCharts tool
CN108279964B (en) Method and device for realizing covering layer rendering, intelligent equipment and storage medium
CN103067569B (en) Method and device of multi-window displaying of smart phone
CN105354022B (en) A kind of page layout document generating method and device
EP3309679A1 (en) Method, apparatus, and terminal device for determining color of interface control
CN102855648B (en) A kind of image processing method and device
CN109298909A (en) A kind of method, mobile terminal and computer readable storage medium that window is adjusted
CN109491722B (en) Histogram chart plug-in system based on WeChat applet and implementation method thereof
CN106468999A (en) A kind of screenshotss method and system
CN103631507B (en) Dummy keyboard providing method and device
CN113986076A (en) Icon display control method and device, electronic equipment and storage medium
CN109189301A (en) A kind of method and device of screenshot capture
CN114564263A (en) Page layout adjusting method and device
CN106843794A (en) A kind of multi-screen display method and system based on Android
CN103745174A (en) Safety keyboard working method
CN106201255A (en) A kind of information processing method and electronic equipment
CN106998489B (en) A kind of focus is crossed the border searching method and device
CN104881222B (en) Man-machine interaction method and device
CN106774971A (en) A kind of characters input method and device
KR20140142071A (en) Electronic apparatus and Method for making document thereof
CN110413167A (en) A kind of the screenshotss method and terminal device of terminal device
CN115794980A (en) Data display method, equipment, device and medium
US10635224B2 (en) Information input method and apparatus for touch screen
CN107577391A (en) The method, apparatus and terminal device of a kind of Cipher Processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 214000 Jiangsu Province, Wuxi City District Zhenze Wuxi Road No. 18 (National) fish Software Park building D block

Patentee after: Evermore software Limited by Share Ltd

Address before: 214135 Jiangsu province Wuxi Zhenze Wuxi national hi tech Industrial Development Zone No. 18 Wuxi Road (National) software park D District 5, 6 layers of Taurus

Patentee before: Wuxi Evermore Software Co., Ltd.