Summary of the invention
The fundamental purpose of the embodiment of the present invention is the cursor-moving method and the system that provide a kind of touch panel device.
The object of the embodiment of the present invention is achieved by following technical proposals:
A cursor-moving method for touch panel device, is characterized in that, comprising:
Obtain touch coordinate;
According to described touch coordinate, determine the display block that this touch coordinate is positioned at;
Judge whether cursor is positioned at the adjacent side of described display block;
If cursor not in the adjacent side of described display block, then carries out Bit andits control according to the position of touch coordinate to cursor;
If cursor is in the adjacent side of described display block, then judge whether described touch coordinate is arranged in the buffer area of the viewing area of described display block;
If described touch coordinate is positioned at buffer area, then Bit andits control is not carried out to cursor;
If described touch coordinate is not positioned at described buffer area, then cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
Described buffer area is arranged on the middle part of the viewing area of described display block.
Described buffer area is that equal proportion changes with the viewing area of display block.
Cursor is moved in the described position, viewing area being positioned at described display block according to touch coordinate, comprising:
When described touch coordinate is positioned at the left field of the viewing area of described display block, described cursor is moved to the left side of this display block;
When described touch coordinate is positioned at the right side area of the viewing area of described display block, described cursor is moved to the right side of this display block.
Cursor is moved in the described position, viewing area being positioned at described display block according to touch coordinate, comprising:
When described touch coordinate is positioned at the upper-side area of the viewing area of described display block, described cursor is moved to the upside of this display block;
When described touch coordinate is positioned at the underside area of the viewing area of described display block, described cursor is moved to the downside of this display block.
A cursor mobile system for touch panel device, is characterized in that, comprising: touch coordinate acquiring unit, display block determining unit, cursor position judging unit, buffer area judging unit, cursor movement control unit;
Described touch coordinate acquiring unit, for obtaining touch coordinate;
Described display block determining unit, for according to described touch coordinate, determines the display block that this touch coordinate is positioned at;
Described cursor position judging unit, for judging whether cursor is positioned at the adjacent side of described display block;
Described buffer area judging unit, at cursor when the adjacent side of described display block, judge whether described touch coordinate is arranged in the buffer area of the viewing area of described display block;
Described cursor movement control unit, at cursor not when the adjacent side of described display block, Bit andits control is carried out to cursor in the position according to touch coordinate; Cursor in the adjacent side of described display block and touch coordinate is arranged in the buffer area of the viewing area of described display block time, Bit andits control is not carried out to cursor; Cursor in the adjacent side of described display block and touch coordinate is not arranged in the buffer area of the viewing area of described display block time, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
In the judging unit of described buffer area, buffer area is arranged on the middle part of the viewing area of described display block.
In the judging unit of described buffer area, buffer area is that equal proportion changes with the viewing area of display block.
Cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate of described cursor movement control unit, comprising:
When described touch coordinate is positioned at the left field of the viewing area of described display block, described cursor is moved to the left side of this display block;
When described touch coordinate is positioned at the right side area of the viewing area of described display block, described cursor is moved to the right side of this display block.
Cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate of described cursor movement control unit, comprising:
When described touch coordinate is positioned at the upper-side area of the viewing area of described display block, described cursor is moved to the upside of this display block;
When described touch coordinate is positioned at the underside area of the viewing area of described display block, described cursor is moved to the downside of this display block.
Pass through the embodiment of the present invention, obtain the touch coordinate of user at equipment after, be not only be positioned at according to touch coordinate the position, viewing area showing block to move cursor, and also need to judge whether touch coordinate is located at the buffer area delimited in described viewing area, and judge whether to carry out Bit andits control to cursor with this.Because the method and system mark this buffer area in the viewing area of display block, make user to be forbidden because touching location and cursor is rocked in the adjacent side of display block, there is good experience effect.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with embodiment and accompanying drawing, the present invention is described in further details.At this, exemplary embodiment of the present invention and illustrating for explaining the present invention, but not as a limitation of the invention.
In screen display, often can show some message units needing to take fixed display area on screen, as word, picture etc.These message units, due to content display requirement own, only allow cursor to show at its viewing area boundary, and do not allow to show within the scope of cursor viewing area shared by it.As, for passage, cursor can only show between its word, and does not allow to show in the viewing area wherein shared by certain word.For this message unit needing to take fixed display area on screen, the present invention is called display block.
For the display requirement of this display block, the movement rule of cursor normally determines display position of cursor according to the position of touch coordinate in regional extent shown by display block of user.
Such as, current have passage content to be 0123456789.Wherein, the width of each word be 10 (in fact, the character that the width of each word is different or word can be different, conveniently describe here, supposes all the same), overall width is 100, and namely always coordinate range is 0-99.Wherein: the scope of 0 is 0-9,1 be 10-19,2 be 20-19 ..., 9 be 90-99.
When carrying out cursor and moving, can determine according to the position of the touch coordinate of user in regional extent shown by display block the position that cursor shows.When the position of touch coordinate is when the centre position of certain character is to the left, cursor is then presented at the front of this character.If the position of touch coordinate is when the centre position of certain character is to the right, cursor is presented at the back of this character.
Such as: current touch coordinate is 13, be then in the indication range of character 1.The indication range of character 1 is 10-19, and 13 in the left-of-center position of scope 10-19.So cursor is between character 0 and character 1.In like manner, if touch coordinate is 18.18 in the center-right position of scope 10-19, so cursor moves on between 1 and 2.
But, have a problem like this, people cursor move at once need character position time, need slow translational speed, accurately locate.So likely there will be touch coordinate is 14 for a moment, is 15 for a moment.Because cursor in 14 can between 0 character and 1 character, and can be between 1 and 2 when 15.Like this, cursor will be caused repeatedly to rock at the coordinate of character 1, and Consumer's Experience is poor.
Embodiment one
Fig. 1 is the process flow diagram of the cursor-moving method of touch panel device.Based on above-mentioned cursor-moving method, as shown in the figure, the cursor-moving method of the touch panel device that the embodiment of the present invention provides, comprising:
S1, obtains touch coordinate;
Touch coordinate and user touch position coordinates on the touchscreen, can be obtained by touch-screen in perception.
S2, according to described touch coordinate, determines the display block that this touch coordinate is positioned at;
As previously mentioned, each display block has separately independently viewing area.What can determine within its indication range being positioned at display block according to touch coordinate.
S3, judges whether cursor is positioned at the adjacent side of described display block;
Concrete, different according to the type of display block, its adjacent side scope also may be different.Such as, the adjacent side scope of word, character type display block comprise on the left of it, right side and downside etc.
S4, if cursor is not in the adjacent side of described display block, then cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate;
If cursor is not in the adjacent side of described display block, then illustrate that cursor not yet moves near the display block that should be positioned at, and therefore should carry out Bit andits control based on the position of touch coordinate to cursor.
S5, if cursor is in the adjacent side of described display block, then judges whether described touch coordinate is arranged in the buffer area of the viewing area of described display block;
Herein, buffer area is the one piece of setting regions marked from the viewing area of display block, to cushion the problem that aforementioned cursor rocks in the adjacent side of display block.The scope of this buffer area should not exceed the viewing area of display block.In general, buffer area should be arranged on the middle part of the viewing area of described display block.
S6, if described touch coordinate is arranged in the buffer area of the viewing area of described display block, does not then carry out Bit andits control to cursor;
If the touch coordinate of user is in this buffer area, then no matter touch coordinate is specifically positioned at what position showing block viewing area, does not carry out Bit andits control to cursor.
S7, if described touch coordinate is not arranged in the buffer area of the viewing area of described display block, then cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
If the touch coordinate of user is not in this buffer area, then adopt the algorithm identical with abovementioned steps S4, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
The method that the embodiment of the present invention provides, obtain the touch coordinate of user at equipment after, be not only be positioned at according to touch coordinate the position, viewing area showing block to move cursor, and also need to judge whether touch coordinate is located at the buffer area delimited in described viewing area.If touch coordinate is positioned at this buffer area, then no matter touch coordinate is specifically positioned at what position showing block viewing area, does not carry out Bit andits control to cursor, until touch coordinate shifts out this buffer area, and ability and then mobile cursor.By said method, owing to marking above-mentioned buffer area in the viewing area of display block, make user to be forbidden because touching location and cursor is rocked in the adjacent side of display block, there is good experience effect.
For aforementioned exemplary, the viewing area of 1 is coordinate 10-19.We delimit wherein coordinate 13-16 is buffer area.When the touch coordinate of user is 14, if now cursor has been positioned at character about 1, namely between character 0 and 1, or between character 1 and 2.Because the touch coordinate 14 of user is positioned at buffer area, therefore no matter now cursor is between 0 and 1 or between 1 and 2, does not carry out Bit andits control to cursor.People touch location and are inaccurate, and now the touch coordinate of people may be shaken in 13-16 regional extent, but owing to being provided with this buffer area, therefore cursor position all can not carry out displacement, till touch coordinate exceeds this buffer area.Visible, the embodiment of the present invention solves the problem that aforementioned cursor rocks well.
Embodiment two
In the present embodiment, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate in described step S4 and S7, comprising:
When described touch coordinate is positioned at the left field of the viewing area of described display block, described cursor is moved to the left side of this display block;
When described touch coordinate is positioned at the right side area of the viewing area of described display block, described cursor is moved to the right side of this display block.
Cursor movement rule given by the present embodiment, the cursor being generally applicable to the word class content as aforementioned exemplary moves.Equipment is positioned at left field or the right side area of the viewing area of display block according to touch coordinate, decide left side or right side that cursor moves to this display block.
Embodiment three
In the present embodiment, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate in described step S4 and S7, comprising:
When described touch coordinate is positioned at the upper-side area of the viewing area of described display block, described cursor is moved to the upside of this display block;
When described touch coordinate is positioned at the underside area of the viewing area of described display block, described cursor is moved to the downside of this display block.
Cursor movement rule given by the present embodiment, the cursor being generally applicable to the word class content as aforementioned exemplary moves.Equipment is positioned at upper-side area or the underside area of the viewing area of display block according to touch coordinate, decide upside or downside that cursor moves to this display block.
Embodiment four
The scope of described buffer area can be fixing, also can be the dynamic change with the display viewing area scope of block.In the present embodiment, described buffer area is that equal proportion changes with the viewing area of display block.Broaden if namely show the viewing area of block, then buffer area scope also thereupon equal proportion widen; If display block viewing area uprise, then buffer area scope also thereupon equal proportion increase.Vice versa, if display block viewing area narrow, then buffer area scope also thereupon equal proportion narrow; If the viewing area of display block becomes short, then also equal proportion change is short thereupon for buffer area scope.Thus form the dynamic change of buffer area and viewing area.
Embodiment five
Fig. 2 is the structural representation of the cursor mobile system of touch panel device.As shown in the figure, the cursor mobile system of the touch panel device that the embodiment of the present invention provides, comprising: touch coordinate acquiring unit 1, display block determining unit 2, cursor position judging unit 3, buffer area judging unit 4, cursor movement control unit 5.
Described touch coordinate acquiring unit 1, for obtaining touch coordinate;
Described display block determining unit 2, for according to described touch coordinate, determines the display block that this touch coordinate is positioned at;
As previously mentioned, each display block has separately independently viewing area.What can determine within its indication range being positioned at display block according to touch coordinate.
Described cursor position judging unit 3, for judging whether cursor is positioned at the adjacent side of described display block;
Concrete, different according to the type of display block, its adjacent side scope also may be different.Such as, the adjacent side scope of word, character type display block comprise on the left of it, right side and downside etc.
Described buffer area judging unit 4, at cursor when the adjacent side of described display block, judge whether described touch coordinate is arranged in the buffer area of the viewing area of described display block;
Herein, buffer area is the one piece of setting regions marked from the viewing area of display block, to cushion the problem that aforementioned cursor rocks in the adjacent side of display block.The scope of this buffer area should not exceed the viewing area of display block.In general, buffer area should be arranged on the middle part of the viewing area of described display block.
Described cursor movement control unit 5, at cursor not when the adjacent side of described display block, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate; Cursor in the adjacent side of described display block and touch coordinate is arranged in the buffer area of the viewing area of described display block time, Bit andits control is not carried out to cursor; Cursor in the adjacent side of described display block and touch coordinate is not arranged in the buffer area of the viewing area of described display block time, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
If cursor is not in the adjacent side of described display block, then illustrate that cursor not yet moves near the display block that should be positioned at, and therefore should carry out Bit andits control based on the position of touch coordinate to cursor.If cursor in the adjacent side of described display block and the touch coordinate of user in this buffer area, then no matter touch coordinate is specifically positioned at what position of display block viewing area, does not carry out Bit andits control to cursor.If cursor in the adjacent side of described display block and the touch coordinate of user not in this buffer area, then adopt algorithm as hereinbefore, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate.
The system that the embodiment of the present invention provides, obtain the touch coordinate of user at equipment after, be not only be positioned at according to touch coordinate the position, viewing area showing block to move cursor, and also need to judge whether touch coordinate is located at the buffer area delimited in described viewing area.If touch coordinate is positioned at this buffer area, then no matter touch coordinate is specifically positioned at what position showing block viewing area, does not carry out Bit andits control to cursor, until touch coordinate shifts out this buffer area, and ability and then mobile cursor.By said system, owing to marking above-mentioned buffer area in the viewing area of display block, make user to be forbidden because touching location and cursor is rocked in the adjacent side of display block, there is good experience effect.
Embodiment six
In the present embodiment, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate of described cursor movement control unit 5, comprising:
When described touch coordinate is positioned at the left field of the viewing area of described display block, described cursor is moved to the left side of this display block;
When described touch coordinate is positioned at the right side area of the viewing area of described display block, described cursor is moved to the right side of this display block.
Cursor movement rule given by the present embodiment, the cursor being generally applicable to the word class content as aforementioned exemplary moves.Equipment is positioned at left field or the right side area of the viewing area of display block according to touch coordinate, decide left side or right side that cursor moves to this display block.
Embodiment seven
In the present embodiment, cursor is moved in the position, viewing area being positioned at described display block according to touch coordinate of described cursor movement control unit 5, comprising:
When described touch coordinate is positioned at the upper-side area of the viewing area of described display block, described cursor is moved to the upside of this display block;
When described touch coordinate is positioned at the underside area of the viewing area of described display block, described cursor is moved to the downside of this display block.
Cursor movement rule given by the present embodiment, the cursor being generally applicable to the word class content as aforementioned exemplary moves.Equipment is positioned at upper-side area or the underside area of the viewing area of display block according to touch coordinate, decide upside or downside that cursor moves to this display block.
Embodiment eight
In described buffer area judging unit 4, the scope of buffer area can be fixing, also can be the dynamic change with the display viewing area scope of block.In the present embodiment, described buffer area is that equal proportion changes with the viewing area of display block.Broaden if namely show the viewing area of block, then buffer area scope also thereupon equal proportion widen; If display block viewing area uprise, then buffer area scope also thereupon equal proportion increase.Vice versa, if display block viewing area narrow, then buffer area scope also thereupon equal proportion narrow; If the viewing area of display block becomes short, then also equal proportion change is short thereupon for buffer area scope.Thus form the dynamic change of buffer area and viewing area.
Embodiment nine
Move the needs of control according to actual cursor, the placement position of described buffer area in the viewing area of display block also can be thereupon different.Example explanation is carried out below with regard to 3 layout type possible to several buffer area by reference to the accompanying drawings:
1, Fig. 3 (a) is buffer area first layout.In figure, dash area is buffer area, and the scope that outside frame is drawn a circle to approve is the viewing area of display block.Visible, the transverse width of buffer area is less than viewing area, and vertical height is then identical with viewing area.The buffer area of this layout structure is mainly used in the movement in a lateral direction of adjustment cursor.
2, Fig. 3 (b) is buffer area second layout.In figure, dash area is buffer area, and the scope that outside frame is drawn a circle to approve is the viewing area of display block.Visible, the vertical height of buffer area is less than viewing area, and transverse width is then identical with viewing area.The buffer area of this layout structure is mainly used in the movement in a vertical direction of adjustment cursor.
3, Fig. 3 (c) is buffer area the 3rd layout.In figure, dash area is buffer area, and the scope that outside frame is drawn a circle to approve is the viewing area of display block.Visible, the transverse width of buffer area is less than viewing area, and vertical height is also less than viewing area, and namely buffer area is the region being positioned at viewing area central part.The buffer area of this layout structure, namely for adjusting cursor movement in a lateral direction, also may be used for the movement in a vertical direction of adjustment cursor.
The layout type of above buffer area, only for exemplarily illustrating, is not limited to protection scope of the present invention, moves the needs of control according to actual cursor, can have multiple different buffer area layout type.
In sum, a kind of cursor-moving method and system of touch panel device is embodiments provided.The method and system are after equipment obtains the touch coordinate of user, be not only be positioned at according to touch coordinate the position, viewing area showing block to move cursor, and also need to judge whether touch coordinate is located at the buffer area delimited in described viewing area, and judge whether to carry out Bit andits control to cursor with this.Owing to marking this buffer area in the viewing area of display block, make user to be forbidden because touching location and cursor is rocked in the adjacent side of display block, there is good experience effect.Persons skilled in the art under this design philosophy do any not creative transformation, all should be considered as within protection scope of the present invention.