CN102486693B - Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform - Google Patents

Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform Download PDF

Info

Publication number
CN102486693B
CN102486693B CN201010580743.2A CN201010580743A CN102486693B CN 102486693 B CN102486693 B CN 102486693B CN 201010580743 A CN201010580743 A CN 201010580743A CN 102486693 B CN102486693 B CN 102486693B
Authority
CN
China
Prior art keywords
event
user
response
sampled point
default
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.)
Active
Application number
CN201010580743.2A
Other languages
Chinese (zh)
Other versions
CN102486693A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010580743.2A priority Critical patent/CN102486693B/en
Publication of CN102486693A publication Critical patent/CN102486693A/en
Application granted granted Critical
Publication of CN102486693B publication Critical patent/CN102486693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for realizing an accelerated sliding effect on a java 2 micro edition (J2ME) platform, which comprises the following steps that: drawing operation of a user is sampled according to a preset sampling time interval to obtain position information and time information of a sampling point; if the drawing operation of the user is judged to be accelerated sliding according to the position information, a sliding speed when the user releases a touch screen is calculated according to the position information and the time information; a preset accelerated drawing event is responded every for a preset responding time interval after the user releases the touch screen, an operated interface is slowed down once at every time of the accelerated drawing event, so the sliding of the operated interface is gradually stopped at a calculated sliding speed. The invention also discloses a device for realizing the accelerated sliding on the J2ME platform. Due to the adoption of the method and the device, the accelerated sliding effect which cannot be realized by the present J2ME platform can be realized.

Description

On J2ME platform, realize the method and the device that accelerate sliding effect
Technical field
The present invention relates to J2ME technical field, particularly on J2ME platform, realize the method and the device that accelerate sliding effect.
Background technology
Touch screen operates because it is operational simple and convenient, has become the main direction of studying of mobile phone operation mode from now on, is adopting on the touch-screen mobile phone and iPhone mobile phone of Android platform at present, has all realized the effect of accelerating slip.
So-called acceleration slided, being user does not unclamp pressing after touch screen, and on touch screen, slide after a segment distance and unclamp again with certain acceleration, now, touch screen responds this operation, make interface accelerate to slide with user's slide, and after user unclamps touch screen, simulate inertia phenomena, make interface continue slip one segment distance and stop gradually.Accelerating to slide requires system can respond to user to carry out on touch screen the acceleration of drag operation, thereby and slides according to this acceleration segment distance inertia that is virtually reality like reality that continues to slide after user looses one's grip.
Longer for content in interface, user need to see the situation of bottom content as early as possible, accelerate to slide can effectively help user with speed faster by interface movement to bottom, and obtain operating experience more true to nature.
And existing be Set Top Box, the Java language platform that the embedded consumer-elcetronics devices of mobile phone and PDA and so on provides, comprise in the touch-screen mobile phone of J2ME (Java 2Micro Edition) platform of virtual machine and series of standards Java API, because J2ME platform is very simple for the API design of touch control operation, only define and pressed, pull, unclamp this 3 Action Events, the event of pressing responds in the time pressing touch screen, the event of unclamping responds in the time unclamping touch screen, the event that pulls is being pressed after touch screen, when mobile on touch screen surface, respond according to certain time interval.Therefore, existing J2ME platform can only be realized short in judging and realize with common drag operation to user, as user is pressing after touch screen, do not move on touch screen surface, then unclamp, be judged as common short in operation, if and user is pressing after touch screen, move on touch screen surface, and then unclamp, be judged as common drag operation.
The existing J2ME platform of support deficiency just because of to(for) touch control operation, make existing J2ME platform cannot be to user the acceleration of the drag operation on touch screen respond to, cannot judge user and carry out common drag operation or accelerate drag operation, also just cannot realize the touch-control effect that the acceleration in similar Android platform and iPhone system is slided.In addition, J2ME platform can not distinguish at present long by with short operation of pressing, cannot for long by with short by carrying out different responses.
Summary of the invention
The embodiment of the present invention provides a kind of method of accelerating sliding effect that realizes on J2ME platform, can on J2ME platform, realize the touch-control effect of accelerating slip.
The embodiment of the present invention provides a kind of device that accelerates sliding effect of realizing on J2ME platform, can on J2ME platform, realize the touch-control effect of accelerating slip.
For achieving the above object, technical scheme of the present invention is specifically achieved in that
On J2ME platform, realize a method of accelerating sliding effect, the method comprises:
With the sampling time interval of being scheduled to, user's drag operation is sampled, obtain positional information and the temporal information of sampled point;
If the drag operation of judging user according to described positional information is to accelerate to slide, the sliding speed while utilizing described positional information and temporal information to calculate user to unclamp touch screen;
Unclamp after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, and order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
Preferably, describedly with the sampling time interval of being scheduled to, user's drag operation is sampled, comprising:
In user's drag operation process, from event is pressed in response, every a default sampling time interval, respond one and pull event, until event is unclamped in response, each response point is a sampled point.
Preferably, described in obtain positional information and the temporal information of sampled point, comprising:
System time carry the coordinate of sampled point on touch screen and sampled point response events in the method that the event of sampled point response is adjusted back time.
Preferably, the drag operation of judging user according to described positional information is to accelerate to slide, and comprising:
From first sampled point, if the coordinate difference that pulls direction user between adjacent two sampled points increases progressively, the drag operation of judging user is to accelerate to slide.
Preferably, the sliding speed while utilizing described positional information and temporal information calculating user to unclamp touch screen, comprising:
Get latter two sampled point pulls direction coordinate difference user divided by the difference of the system time of latter two sampled point, the sliding speed must arrive family and unclamp touch screen time.
Preferably, described default acceleration pulls event and comprises:
In the base class Component being inherited by operation interface UI class, one of interpolation can overloaded method pointerSpeedDragged (int detaX, int detaY);
Wherein, parameter d etaX represents: side-play amount when each the method is adjusted back by UI drafting thread in screen X-direction, parameter d etaY represents: side-play amount when each the method is adjusted back by UI drafting thread in screen Y direction.
Preferably, described order is once slowed down and is comprised by operation interface:
Preset a deceleration parameter deCrease, utilize UI to draw thread, to the speed that pulls the calculating computing of slowing down.
Preferably, the method further comprises: in the time that event is pressed in one of response, carry out timing by default timer, in the time that timer reaches default threshold value, response pulls event and unclamp event, and what judge that user carries out is long by operation, responds default length by event.
Preferably, described default length comprises by event:
Self-defining method p ointerLongPressed (int x, y), wherein, parameter x represents the x axial coordinate of long response point position of pressing to int, parameter y represents the y axial coordinate of long response point position of pressing.
On J2ME platform, realize a device that accelerates sliding effect, this device comprises:
Sampling module, samples to user's drag operation for the sampling time interval to be scheduled to, and obtains positional information and the temporal information of sampled point;
Speed calculation module, if be to accelerate to slide for judge user's drag operation according to described positional information, the sliding speed while utilizing described positional information and temporal information calculating user to unclamp touch screen;
Inertia simulation module, for unclamping after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
Preferably, described sampling module comprises:
Sampling unit, for user's drag operation process, from event is pressed in response, every a default sampling time interval, responds one and pulls event, until event is unclamped in response, each response point is a sampled point.
Message unit, the system time when carry the coordinate of sampled point on touch screen and sampled point response events in the method that the event of sampled point response is adjusted back.
Preferably, described speed calculation module comprises:
Judging unit, for from first sampled point, if the coordinate difference that pulls direction user between adjacent two sampled points increases progressively, the drag operation of judging user is to accelerate to slide.
Computing unit, the sliding speed while unclamping touch screen for getting latter two sampled point pulls direction coordinate difference user divided by the difference of the system time of latter two sampled point, must arriving family.
Preferably, this device further comprises:
Long by module, in the time that event is pressed in one of response, carry out timing by default timer, in the time that timer reaches default threshold value, if response pulls event and unclamps event, what judge that user carries out is long by operation, responds default length by event.
As seen from the above technical solutions, this method and apparatus that accelerates sliding effect of realizing on J2ME platform of the present invention, make full use of the function of existing J2ME platform, realize and accelerated to slide and long touch-control effect of pressing by self-defining simple event, make up the deficiency that existing J2ME platform is supported touch control operation, made the J2ME platform also can be to experiencing with the good touch control operation of user.
Brief description of the drawings
Fig. 1 is that the embodiment of the present invention realizes the method flow diagram that accelerates sliding effect on J2ME platform;
Fig. 2 is that embodiment of the present invention acceleration sliding effect is realized principle schematic;
Fig. 3 is that the embodiment of the present invention realizes the apparatus structure schematic diagram that accelerates sliding effect on J2ME platform;
Fig. 4 is embodiment of the present invention sampling module structural representation;
Fig. 5 is embodiment of the present invention speed calculation module structural representation.
Embodiment
For making object of the present invention, technical scheme and advantage clearer, referring to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
The present invention utilizes defined callback events on J2ME platform, according to the mode that pulls event every one of certain time interval response to user the drag operation on touch screen sample, as sampled point, and obtain positional information and the temporal information of sampled point, according to the relation between the positional information of these sampled points and temporal information, whether the operation of judging user is to accelerate to slide, if, the speed that pulls while utilizing the positional information of sampled point and temporal information to calculate user to loose one's grip, and every certain time interval, this is pulled to speed and carry out deceleration-operation one time, simulating by the common drag operation that multiple gradual is slowed down the inertia that accelerates to slide slides, realize the touch-control effect of accelerating slip.
Concrete grammar as shown in Figure 1, comprises the steps:
Step 101, samples to user's drag operation with the sampling time interval of being scheduled to, and obtains positional information and the temporal information of sampled point.
In the standard A PI of existing J2ME definition, in javax.microedition.lcdui.Canvas class definition three callback events, respectively:
Press event, and Protected void pointerPressed (int x, int is y); In the time pressing touch screen, one of system responses is pressed event, wherein contains the positional information of response point, i.e. coordinate (x, y).
Unclamp event, and Protected void pointerReleased (int x, int is y); In the time unclamping touch screen, one of system responses is unclamped event, wherein contains the positional information of response point, i.e. coordinate (x, y).
Pull event, and Protected void pointerDragged (int x, int is y); If when pressing touch screen and sliding on touch screen, system pulls event every one of certain time interval response, wherein contains the positional information of response point, i.e. coordinate (x, y).
For short, by operation, existing J2ME platform can respond one and press event and one and unclamp event; For drag operation, respond one press event, several pull event and one and unclamp event.
This step is carried out in the process of drag operation user in fact exactly, utilizes the response mode of existing J2ME platform for above-mentioned callback events, obtains response point, i.e. the positional information of sampled point and temporal information in the time that callback events is responded.Positional information can be the coordinate of sampled point on touch screen, temporal information can be the current system time at sampled point response callback events, the coordinate of sampled point utilizes existing callback events to obtain, and the application programming interfaces (API) that can provide by J2ME platform in the current time of sampled point response callback events obtain.
The process of concrete sampling as shown in Figure 2, the position of the circle 1 in Fig. 2 is the reference position that user presses touch screen, user pulls according to a certain direction afterwards, finally loose one's grip in the position of circle 4, finish drag operation, the position of its centre circle 2 and circle 3 is to press after event in circle 1 position response, according to certain time interval, response pulls the position of event, and circle 4 positions are the positions that event is unclamped in response.
Sampling in this step is carried out at a certain time interval, when user's drag operation starts, start from enclosing 1, sampling process starts with certain hour interval, encloses 2, encloses 3, through two sampling time intervals before the upper once sampling time arrives, if user's drag operation finishes, enclose 4, sampling has just no longer been carried out, and this process obtains positional information and the temporal information of 4 sampled points altogether.The time interval of sampling determines the number of times of sampling, its concrete numerical value can be determined as required, for example determine according to the hardware performance of the performance of virtual machine, J2ME platform mobile phone, what performance was high can be with shorter time interval sampling, thereby increase the number of times of sampling, accuracy while calculating sliding speed in raising subsequent step, performance is not good, can sacrifice the accuracy while calculating sliding speed in subsequent step, with longer time interval sampling, reduce the number of times of sampling, to adapt to the processing power of mobile phone hardware or virtual machine.
Step 102, if the drag operation of judging user according to the positional information obtaining and temporal information is to accelerate to slide, the sliding speed while utilizing the positional information that obtains and temporal information to calculate user to unclamp touch screen.
Accelerate the judgement principle of slide: obtained after the positional information and temporal information of multiple sampled points of user's drag operation from starting to loosing one's grip, whether the operation that can judge user according to these information is to accelerate to slide, because carry out at the same time between sampled point, therefore can calculate the position difference size between neighbouring sample point, if started to loosing one's grip from user's drag operation, position difference between neighbouring sample point increases progressively, the drag operation that can judge user is acceleration, if difference is successively decreased, can judge user's drag operation deceleration carries out, and what increase progressively is faster, illustrate that acceleration is larger, that successively decreases is faster, and retarded velocity is also larger.
While specifically judgement, if the distance calculating between neighbouring sample point is to increase progressively relation, be judged as acceleration slide, other situation is all judged as common drag operation.Taking Fig. 2 as example, start from enclosing 1, to circle, end is unclamped at 4 places, whole process, virtual machine has responded 4 events, obtain positional information and the temporal information of 4 sampled points, the positional information of circle 1 and temporal information are by pointerPressed (int x, int y) the response of method obtains, the positional information of circle 2 and circle 3 and temporal information are by pointerDragged (int x, int y) the response of method obtains, the positional information of circle 4 and temporal information are by pointerReleased (int x, int y) the response of method obtains, calculate respectively circle 1 and circle 2, circle 2 and circle 3, distance A between the coordinate of circle 3 and circle 4 these positions, B, C, because C is greater than B, B is greater than A, therefore can judge the operation that user pulls is an operation that acceleration pulls.
If be judged as acceleration drag operation, the sliding speed of relative touch screen also will continue to calculate user and unclamp touch screen according to the positional information of sampled point and temporal information time, otherwise process according to existing disposal route, repeat no more here.
Calculating the concrete grammar of sliding speed can be: get positional information and the temporal information of last 2 sampled points, calculate the alternate position spike of last 2 sampled points in glide direction, then divided by mistiming of these last 2 sampled points.Also taking Fig. 2 as example, get coordinate and the time of circle 3 and 4 two sampled points of circle, by the distance C between circle 3 and circle 4 divided by circle 3 and the mistiming of enclosing 4.
Step 103, unclamp after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
After user's hand, i.e. response is unclamped after event, do not stop immediately the slip at interface, continue taking sliding speed as initial velocity to slide but control operated interface, and every certain time interval response once default acceleration pull event, pull event by this acceleration and by default deceleration parameter, the sliding speed calculating is slowed down, make operated interface stop gradually sliding.Wherein, it is the Canvas drafting class by inheriting J2ME platform bottom that existing UI draws thread, realize existing 3 sampling callback method (pointerPressed (int x, int y), p ointerReleased (int x, int y), p ointerDragged (int x, int realization y), therefore the programming idea that the present invention can resemble object by face pulls event default acceleration and is encapsulated in UI and draws thread the inside, is realized and is accelerated sliding effect by this event of timing heavy duty.
Particularly, can be in the base class Component the inside of all interfaces class institute inherit, adding one can overloaded method pointerSpeedDragged (int detaX, int detaY), parameter d etaX represents: side-play amount when each the method is adjusted back by UI drafting thread in screen X-direction, parameter d etaY represents: side-play amount when each the method is adjusted back by UI drafting thread in screen Y direction, these 2 numerical value are drawn thread by UI and provided in the time that response the method is adjusted back.UI draws a regularly pointerSpeedDragged event of response of thread, by UI bed interface, pointerSpeedDragged event is realized, the initial graphical pointv coordinate at interface is added to these X, after side-play amount in Y-direction, refresh screen drawing, can demonstrate the animation effect that continues slip after loosing one's grip.
Particularly, detaX and the detaY computing method in UI drafting thread are as follows: according to the sample coordinate of the sampled point of last 2 secondary responses and time, the speed that pulls SPEED (speedX when calculating drag operation and finishing in glide direction, speedY), the dynamics of slide is larger, and this speed is larger.Taking Fig. 2 as example, get the coordinate of the coordinate of the circle 4 while loosing one's grip and the circle 3 of the last sampling, calculate the coordinate difference in glide direction, then divided by mistiming of these 2 sampled points, can obtain pulling speed SPEED.In addition, also need to preset a deceleration parameter deCrease, utilize UI to draw thread, regularly (time) to the speed that the pulls SPEED the calculating computing of slowing down, for example false code can be as follows:
Public?void?run(){
While(true){
Sleep (time); // every time of time
If (SPEED > 0) if // there is speed
SPEED-=deCrease; // Speed Reduction
Decompose x, the speed in y direction;
DetaX=speedX*time; The side-play amount of //x direction
DetaY=speedY*time; The side-play amount of //y direction
Component. pointerSpeedDragged(detaX, detaY); // readjustment
}
}
}
Certainly, concrete deceleration parameter free setting as required, if need the slip damping that performance is larger, what deceleration parameter can arrange is larger, otherwise can be by less deceleration parameter setting.
Said method utilization repeatedly responds the event that pulls of J2ME definition and positional information and temporal information perfection when pulling event response have solved the judgement pulling accelerating, and after user looses one's grip by calculating the pull speed of user while unclamping touch screen, and by default deceleration parameter, this is pulled to speed and carry out timing deceleration-operation, simulate the effect that inertia slides, realized the acceleration sliding effect of only realizing at present in Android platform and iPhone system.
In addition, realizing on the basis of acceleration sliding effect, the present invention has also further provided long by the implementation method of effect, one timer is set, in the time that event is pressed in one of generation, logical default timer carries out timing, before event is unclamped in generation, if and do not produce one and pull event, and when the timing of timer reaches default threshold value, what judge that user carries out is long by operation, respond a self-defining length by event, for example can a self-defined method pointerLongPressed (int x, int y), wherein parameter x represents the x coordinate of the long response position of pressing, parameter y represents the y coordinate of the long response position of pressing, response is long by after event, can on growing by the response position coordinate of event, carry out the self-defining interactive operations such as popup menu.
By said method, can be to user short in distinguishing by operation with long, and realize different subsequent actions according to different operations, realized the length of not supporting in existing J2ME platform by operation.
The present invention also provides a kind of device that accelerates slip of realizing at J2ME platform, and as shown in Figure 3, this device comprises:
Sampling module 301, samples to user's drag operation for the sampling time interval to be scheduled to, and obtains positional information and the temporal information of sampled point;
Speed calculation module 302, if be to accelerate to slide for judge user's drag operation according to described positional information, the sliding speed while utilizing described positional information and temporal information calculating user to unclamp touch screen;
Inertia simulation module 303, for unclamping after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
Preferably, as shown in Figure 4, described sampling module 301 comprises:
Sampling unit 401, for user's drag operation process, from event is pressed in response, every a default sampling time interval, responds one and pulls event, until event is unclamped in response, each response point is a sampled point.
Message unit 402, the system time when carry the coordinate of sampled point on touch screen and sampled point response events in the method that the event of sampled point response is adjusted back.
Preferably, as shown in Figure 5, described speed calculation module 302 comprises:
Judging unit 501, for from first sampled point, if the coordinate difference that pulls direction user between adjacent two sampled points increases progressively, the drag operation of judging user is to accelerate to slide.
Computing unit 502, the sliding speed while unclamping touch screen for getting latter two sampled point pulls direction coordinate difference user divided by the difference of the system time of latter two sampled point, must arriving family.
In addition, if will realize long judgement and response of pressing, this device can further include:
Long by module, in the time that event is pressed in one of response, carry out timing by default timer, in the time that timer reaches default threshold value, if response pulls event and unclamps event, what judge that user carries out is long by operation, responds default length by event.
Said apparatus can realize the judgement of acceleration slide of the present invention and loose one's grip after deceleration scheme, wherein in each module concrete function realize can reference method embodiment, no longer describe in detail here.
From the above embodiments, this method and apparatus that accelerates sliding effect of realizing on J2ME platform of the present invention, make full use of the function of existing J2ME platform, realize and accelerated to slide and long touch-control effect of pressing by self-defining simple event, make up the deficiency that existing J2ME platform is supported touch control operation, made the J2ME platform also can be to experiencing with the good touch control operation of user.

Claims (13)

1. realize at J2ME platform a method of accelerating slip, it is characterized in that, the method comprises:
Utilize the event that pulls in defined callback events on J2ME platform, pull the mode of event with one of the sampling time interval response of being scheduled to, user's drag operation is sampled, obtain positional information and the temporal information of sampled point;
If the drag operation of judging user according to described positional information is to accelerate to slide, the sliding speed while utilizing described positional information and temporal information to calculate user to unclamp touch screen;
Unclamp after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, and order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
2. the method for accelerating slip that realizes at J2ME platform as claimed in claim 1, is characterized in that, on described J2ME platform, defined callback events comprises the event of pressing and unclamps event;
Describedly with the sampling time interval of being scheduled to, user's drag operation is sampled, comprising:
In user's drag operation process, from event is pressed in response, every a default sampling time interval, respond one and pull event, until event is unclamped in response, each response point is a sampled point.
3. as claimed in claim 1ly realize at J2ME platform the method for sliding accelerated, it is characterized in that, described in obtain positional information and the temporal information of sampled point, comprising:
System time carry the coordinate of sampled point on touch screen and sampled point response events in the method that the event of sampled point response is adjusted back time.
4. the method for accelerating slip that realizes at J2ME platform as claimed in claim 3, is characterized in that, the drag operation of judging user according to described positional information is to accelerate to slide, and comprising:
From first sampled point, if the coordinate difference that pulls direction user between adjacent two sampled points increases progressively, the drag operation of judging user is to accelerate to slide.
5. the method for accelerating slip that realizes at J2ME platform as claimed in claim 4, is characterized in that, the sliding speed while utilizing described positional information and temporal information calculating user to unclamp touch screen, comprising:
Get latter two sampled point pulls direction coordinate difference user divided by the difference of the system time of latter two sampled point, the sliding speed must arrive family and unclamp touch screen time.
6. the method for accelerating slip that realizes at J2ME platform as claimed in claim 1, is characterized in that, described default acceleration pulls event and comprises:
In the base class Component being inherited by operation interface UI class, one of interpolation can overloaded method pointerSpeedDragged (int detaX, int detaY);
Wherein, parameter d etaX represents: side-play amount when each the method is adjusted back by UI drafting thread in screen X-direction, parameter d etaY represents: side-play amount when each the method is adjusted back by UI drafting thread in screen Y direction.
7. the method for accelerating slip that realizes at J2ME platform as claimed in claim 1, is characterized in that, described order is once slowed down and comprised by operation interface:
Preset a deceleration parameter deCrease, utilize UI to draw thread, to the speed that pulls the calculating computing of slowing down.
8. the method for accelerating slip that realizes at J2ME platform as claimed in claim 2, it is characterized in that, the method further comprises: in the time that event is pressed in one of response, carry out timing by default timer, in the time that timer reaches default threshold value, response pulls event and unclamp event, and what judge that user carries out is long by operation, responds default length by event.
9. the method for accelerating slip that realizes at J2ME platform as claimed in claim 8, is characterized in that, described default length comprises by event:
Self-defining method pointerLongPressed (int x, y), wherein, parameter x represents the x axial coordinate of long response point position of pressing to int, parameter y represents the y axial coordinate of long response point position of pressing.
10. realize at J2ME platform a device that accelerates slip, it is characterized in that, this device comprises:
Sampling module, for utilizing the event that pulls of defined callback events on J2ME platform, pulls the mode of event with one of the sampling time interval response of being scheduled to, user's drag operation is sampled, and obtains positional information and the temporal information of sampled point;
Speed calculation module, if be to accelerate to slide for judge user's drag operation according to described positional information, the sliding speed while utilizing described positional information and temporal information calculating user to unclamp touch screen;
Inertia simulation module, for unclamping after touch screen user, pull event every default acceleration of default response time Gap response, every response once accelerates to pull event, order is once slowed down by operation interface, makes to be started to stop gradually sliding with the sliding speed calculating by operation interface.
11. devices that accelerate slip of realizing at J2ME platform as claimed in claim 10, is characterized in that, described sampling module comprises:
Sampling unit, for user's drag operation process, the event of pressing from responding described J2ME platform in defined callback events starts, every a default sampling time interval, respond one and pull event, until respond the event of unclamping in defined callback events on described J2ME platform, each response point is a sampled point;
Message unit, the system time when carry the coordinate of sampled point on touch screen and sampled point response events in the method that the event of sampled point response is adjusted back.
12. devices that accelerate slip of realizing at J2ME platform as claimed in claim 10, is characterized in that, described speed calculation module comprises:
Judging unit, for from first sampled point, if the coordinate difference that pulls direction user between adjacent two sampled points increases progressively, the drag operation of judging user is to accelerate to slide;
Computing unit, the sliding speed while unclamping touch screen for getting latter two sampled point pulls direction coordinate difference user divided by the difference of the system time of latter two sampled point, must arriving family.
13. devices that accelerate slip of realizing at J2ME platform as claimed in claim 10, is characterized in that, this device further comprises:
Long by module, in the time that event is pressed in one of response, carry out timing by default timer, in the time that timer reaches default threshold value, if response pulls event and unclamps event, what judge that user carries out is long by operation, responds default length by event.
CN201010580743.2A 2010-12-06 2010-12-06 Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform Active CN102486693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010580743.2A CN102486693B (en) 2010-12-06 2010-12-06 Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010580743.2A CN102486693B (en) 2010-12-06 2010-12-06 Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform

Publications (2)

Publication Number Publication Date
CN102486693A CN102486693A (en) 2012-06-06
CN102486693B true CN102486693B (en) 2014-09-03

Family

ID=46152195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010580743.2A Active CN102486693B (en) 2010-12-06 2010-12-06 Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform

Country Status (1)

Country Link
CN (1) CN102486693B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204881A (en) * 2014-06-25 2015-12-30 中兴通讯股份有限公司 Method and device for operating J2me application program on Android system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0880091B1 (en) * 1997-05-21 2004-12-01 Nokia Corporation A method and an arrangement for scrolling information presented on a display of a mobile station
CN101599001A (en) * 2009-07-13 2009-12-09 青岛海信移动通信技术股份有限公司 Update method for touch-screen display interface and multimedia electronic equipment
CN101751195A (en) * 2009-12-30 2010-06-23 中兴通讯股份有限公司 Method and device for controlling move event on resistive touch screen

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0880091B1 (en) * 1997-05-21 2004-12-01 Nokia Corporation A method and an arrangement for scrolling information presented on a display of a mobile station
CN101599001A (en) * 2009-07-13 2009-12-09 青岛海信移动通信技术股份有限公司 Update method for touch-screen display interface and multimedia electronic equipment
CN101751195A (en) * 2009-12-30 2010-06-23 中兴通讯股份有限公司 Method and device for controlling move event on resistive touch screen

Also Published As

Publication number Publication date
CN102486693A (en) 2012-06-06

Similar Documents

Publication Publication Date Title
CN104898952B (en) A kind of terminal split screen implementation method and terminal
AU2011276797B2 (en) Method and device for window object inertial movement
CN102981768B (en) A kind of method and system realizing floated overall situation button at touch screen terminal interface
US20130212541A1 (en) Method, a device and a system for receiving user input
CN104102417B (en) Electronic device and method for displaying playlist thereof
CN104252303A (en) Method and system for operating games based on pressure sensitive information
CN107273130A (en) Method, device and the terminal for accelerating interface to draw
JP2013175180A (en) Device and method for changing application
CN103593136A (en) Touch terminal, and one-hand operation method and device of large-screen touch terminal
KR20140137509A (en) Operating Method of Notification Screen And Electronic Device supporting the same
CN103197911A (en) Method, system and device for providing speech input
CN107436700B (en) Data processing method and device
CN102662505A (en) Simulation touch input apparatus, and apparatus and method for configurating simulation touch input
JP2013530587A5 (en)
CN103186321A (en) Method and device for controlling menu on screen
CN102081500A (en) Display control method, device and system
CN102799348A (en) Method and device for icon edition on terminal adopting touch screen
CN104503577A (en) Method and device for controlling mobile terminal through wearable device
CN103888605A (en) Information processing method and electronic device
CN103856798A (en) Operation method and electronic equipment
CN102566867B (en) The processing method and processing device of mouse drawn wave
CN104571839A (en) Terminal and processing method and device thereof
CN105549762B (en) A kind of suspension key moving method and device
CN102855064A (en) Method for rapidly displaying functional control help document of application program
CN102486693B (en) Method and device for realizing accelerated sliding effect on java 2 micro edition (J2ME) platform

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