CN104360866A - Code generating method and code generator - Google Patents

Code generating method and code generator Download PDF

Info

Publication number
CN104360866A
CN104360866A CN201410718632.1A CN201410718632A CN104360866A CN 104360866 A CN104360866 A CN 104360866A CN 201410718632 A CN201410718632 A CN 201410718632A CN 104360866 A CN104360866 A CN 104360866A
Authority
CN
China
Prior art keywords
code
code generator
edit instruction
control
time shaft
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.)
Pending
Application number
CN201410718632.1A
Other languages
Chinese (zh)
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.)
Shenzhen Qianhai illusion Network Technology Co., Ltd.
Original Assignee
SHENZHEN QICAICHANGXIANG NETWORK TECHNOLOGY 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 SHENZHEN QICAICHANGXIANG NETWORK TECHNOLOGY Co Ltd filed Critical SHENZHEN QICAICHANGXIANG NETWORK TECHNOLOGY Co Ltd
Priority to CN201410718632.1A priority Critical patent/CN104360866A/en
Publication of CN104360866A publication Critical patent/CN104360866A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a code generating method and a code generator. A user can realize UI (User Interface) animation without editing or debugging codes. The code generator is used for generating a UI animation code according to a UI edition command, and the code is exported by judging whether a time shaft, on which a key frame is stored, reaches a preset condition or not. According to the embodiment of the invention, the method comprises the following steps: the code generator acquires the UI edition command; the code generator generates a corresponding code according to the UI edition command; the code generator extracts a corresponding UI control according to the UI edition command, and modifies the attribute of the UI control; the code generator stores the attribute of the UI control in the key frame; the code generator stores the key frame on the time shaft; the code generator judges whether the time shaft reaches the preset condition or not; if the time shaft reaches the preset condition, the code generator stores the code. The embedment of the invention further provides the code generator.

Description

A kind of code generating method and code generator
Technical field
The present invention relates to computer realm, particularly relate to a kind of code generating method and code generator.
Background technology
At present, a lot of mobile terminal game development companies all set up man-machine interface UI (User Interface) design team, being used for the animation effect of raising business and interface beautifies, thus attract the eyeball of user, designer needs to edit corresponding code and realizes UI animation by UI control, UI animation principle is that program code changes convergent-divergent, rotation, coordinate displacement, the hiding display of UI control according to the frame frequency of game running and adds the change of retouching limit etc. attribute, when after the change of UI control property, user just can see a series of UI animation effect.
The main process realizing UI animation in prior art is: UI designer edit code, run the attribute that this code changes UI control, the attribute change result of UI control is illustrated in interface, and designer carries out the debugging of code again according to the animation effect at interface, to reach the animation effect of demand.
But, after designer's edit code runs, also the animation effect of the result run and demand to be contrasted, repeatedly debug to make animation effect reach expection to code, such editor and repeatedly debugging code make the cycle of whole design lengthen, and cause work efficiency not high.
Summary of the invention
Embodiments provide a kind of code generating method and code generator, user can be made not need editor and debugging code to realize UI animation, whether code generator generates UI animation code according to UI edit instruction, and met the requirements by the time shaft judging to store key frame and derive code.
In view of this, first aspect present invention provides a kind of code generating method, comprising:
Code generator obtains man-machine interface UI edit instruction;
Described code generator generates corresponding code according to described UI edit instruction;
Described code generator extracts corresponding UI control according to described UI edit instruction, and revises the attribute of described UI control;
Described code generator stores the attribute of described UI control in key frame;
Described code generator stores described key frame to time shaft;
Described code generator judges whether described time shaft reaches prerequisite;
If described time shaft reaches prerequisite, then described code generator stores described code.
In conjunction with first aspect present invention, in the first embodiment of first aspect present invention, described code generator obtains man-machine interface UI edit instruction and comprises:
Code generator receives the operation information of visualization interface;
Described code generator generates corresponding UI edit instruction according to described operation information.
In conjunction with first aspect present invention, in the second embodiment of first aspect present invention, described code generator obtains man-machine interface UI edit instruction and comprises:
Code generator receives the UI edit instruction that other equipment sends.
In conjunction with first aspect present invention, in the 3rd embodiment of first aspect present invention, described code generator stores described code and comprises:
Described code generator by described code storage in its data storehouse.
In conjunction with first aspect present invention, in the 4th embodiment of first aspect present invention, described code generator stores described code and comprises:
Described code generator by described code storage in External memory equipment.
In conjunction with the 4th embodiment of the first embodiment of first aspect present invention, first aspect present invention, the second embodiment of first aspect present invention, the 3rd embodiment of first aspect present invention and first aspect present invention, in 5th embodiment of first aspect present invention, described method also comprises:
If described time shaft does not reach prerequisite, then described code generator performs other operations.
Second aspect present invention provides a kind of code generator, comprising:
Acquisition module, for obtaining UI edit instruction;
Generation module, generates corresponding code for the described UI edit instruction got according to described acquisition module;
Processing module, the UI edit instruction for getting according to described acquisition module extracts corresponding UI control, and revises the attribute of described UI control;
First memory module, for storing the attribute of the described UI control of described processing module amendment in key frame;
Second memory module, for storing described key frame to time shaft;
Judge module, for judging whether described time shaft reaches prerequisite;
3rd memory module, for judging that when judge module time shaft stores described code when reaching prerequisite.
In conjunction with second aspect present invention, in the first embodiment of second aspect present invention, described acquisition module comprises:
First receiving element, for receiving the operation information of visualization interface;
Generation unit, generates corresponding UI edit instruction for the described operation information received according to described first receiving element.
In conjunction with second aspect present invention, in the second embodiment of second aspect present invention, described acquisition module comprises:
Second receiving element, for receiving the UI edit instruction that other equipment sends.
In conjunction with second aspect present invention, in the 3rd embodiment of second aspect present invention, described 3rd memory module comprises:
First storage unit, for the described code storage that generated by described generation module in its data storehouse.
In conjunction with second aspect present invention, in the 4th embodiment of second aspect present invention, described 3rd memory module comprises:
Second storage unit, for the described code storage that generated by described generation module in External memory equipment.
In conjunction with the first embodiment, the second embodiment of second aspect present invention, the 3rd embodiment of second aspect present invention, the 4th embodiment of second aspect present invention of second aspect present invention, second aspect present invention, in 5th embodiment of second aspect present invention, also comprise:
Execution module, for performing other operations.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore, user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Accompanying drawing explanation
Fig. 1 is an embodiment schematic diagram of a kind of code generating method in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of a kind of code generating method in the embodiment of the present invention;
Fig. 3 is another embodiment schematic diagram of a kind of code generating method in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of a kind of code generating method in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram of a kind of code generating method in the embodiment of the present invention;
Fig. 6 is an embodiment schematic diagram of a kind of code generator in the embodiment of the present invention;
Fig. 7 is another embodiment schematic diagram of a kind of code generator in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram of a kind of code generator in the embodiment of the present invention;
Fig. 9 is another embodiment schematic diagram of a kind of code generator in the embodiment of the present invention.
Embodiment
Embodiments provide a kind of code generating method and code generator, user can be made not need editor and debugging code to realize UI animation, code generator generates UI animation code according to UI edit instruction, and whether reaches prerequisite by the time shaft judging to store key frame and derive code.
Refer to Fig. 1, in the embodiment of the present invention, an a kind of embodiment of code generating method comprises:
101, code generator obtains UI edit instruction;
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction.
102, code generator generates corresponding code according to UI edit instruction;
In the embodiment of the present invention, after code generator gets UI edit instruction, generate corresponding code according to UI edit instruction.
103, code generator extracts corresponding UI control according to UI edit instruction, and revises the attribute of this UI control;
In the embodiment of the present invention, after code is grown up to be a useful person and got UI edit instruction, extract corresponding UI control according to UI edit instruction, and the attribute of the UI control extracted is modified.
104, code generator stores the attribute of UI control in key frame;
In the embodiment of the present invention, the attribute of the UI control that code generator memory modify is complete is in key frame.
105, code generator stores key frame to time shaft;
In the embodiment of the present invention, the key frame of the attribute having UI control is stored in time shaft by code generator.
106, code generator judges whether time shaft reaches prerequisite;
In the embodiment of the present invention, code generator judges whether the time shaft storing key frame arrives prerequisite, if so, then performs step 107.
107, code generator storage code.
In the embodiment of the present invention, when time shaft arrives prerequisite, code generator storage code.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
It should be noted that, the mode that code generator obtains UI edit instruction can be that code generator obtains UI edit instruction according to the operation information of visualization interface, also can for code generator receive other equipment send UI edit instruction, code generator can also obtain UI edit instruction by other means, does not limit herein.
Respectively code generator is described in detail according to the operation information acquisition UI edit instruction of visualization interface with from other equipment acquisition UI edit instruction two kinds of modes below.
One, code generator obtains UI edit instruction according to the operation information of visualization interface;
Refer to Fig. 2, in the embodiment of the present invention, another embodiment of a kind of code generating method comprises:
201, code generator receives the operation information of visualization interface;
In the embodiment of the present invention, when user starts UI design, in visualization interface input operation information, operation information is sent to code generator.
202, code generator generates corresponding UI edit instruction according to operation information;
In the embodiment of the present invention, code generator generates corresponding UI edit instruction according to the operation information received.
203, code generator generates corresponding code according to UI edit instruction;
In the embodiment of the present invention, code generator generates corresponding code according to UI edit instruction after generating UI edit instruction according to operation information.
204, code generator extracts corresponding UI control according to UI edit instruction, and revises the attribute of this UI control;
In the embodiment of the present invention, code generator extracts the UI control that UI edit instruction relates to, and modifies to the attribute of the UI control extracted after generating UI edit instruction according to operation information from widget library.
205, code generator stores the attribute of UI control in key frame;
In the embodiment of the present invention, after the attribute of the UI control extracted is modified, code generator stores the attribute of UI control in key frame.
206, code generator stores key frame to time shaft;
In the embodiment of the present invention, the key frame having UI control property is stored in time shaft by code generator.
207, code generator judges whether time shaft reaches prerequisite;
In the embodiment of the present invention, code generator judges whether the time shaft storing key frame arrives prerequisite, if so, then performs step 208, if not, then performs step 209.
208, code generator storage code;
In the embodiment of the present invention, when time shaft arrives prerequisite, code generator storage code.
209, code generator performs other operations.
In the embodiment of the present invention, when time shaft does not arrive prerequisite, code generator performs other operations.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, code generator obtains UI edit instruction according to the operation information of visualization interface, makes scheme more concrete.
Again, when time shaft does not arrive prerequisite, code generator performs other operations, improves the reliability of scheme.
Two, code generator obtains UI edit instruction from other equipment.
Refer to Fig. 3, in the embodiment of the present invention, another embodiment of a kind of code generating method comprises:
301, code generator obtains the UI edit instruction that other equipment sends;
In the embodiment of the present invention, when user starts UI design, code generator receives the UI edit instruction that other equipment are sent to.
302, code generator generates corresponding code according to UI edit instruction;
In the embodiment of the present invention, code generator generates corresponding code according to UI edit instruction after generating UI edit instruction according to operation information.
303, code generator extracts corresponding UI control according to UI edit instruction, and revises the attribute of this UI control;
In the embodiment of the present invention, code generator according to the UI control that UI edit instruction relates to, extracts corresponding UI control, and modifies to the attribute of the UI control extracted after generating UI edit instruction according to operation information from widget library.
304, code generator stores the attribute of UI control in key frame;
In the embodiment of the present invention, after the attribute of the UI control extracted is modified, code generator stores the attribute of UI control in key frame.
305, code generator stores key frame to time shaft;
In the embodiment of the present invention, the key frame having UI control property is stored in time shaft by code generator.
306, code generator judges whether time shaft reaches prerequisite;
In the embodiment of the present invention, code generator judges whether the time shaft storing key frame arrives prerequisite, if so, then performs step 307, if not, then performs step 308.
307, code generator storage code;
In the embodiment of the present invention, when time shaft arrives prerequisite, code generator storage code.
308, code generator performs other operations.
In the embodiment of the present invention, when time shaft does not reach prerequisite, code generator performs other operations.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, code generator obtains UI edit instruction from other equipment, makes scheme more concrete.
Again, when time shaft does not arrive prerequisite, code generator performs other operations, improves the reliability of scheme.
It should be noted that, the mode of code generator storage code can be also can be by code storage in its data storehouse by code storage in External memory equipment, and code generator can also storage code by other means, does not limit herein.
Respectively code storage is described in detail respectively by code generator in its data storehouse and by code storage two kinds of modes in External memory equipment below.
(1), code generator by code storage in its data storehouse;
Refer to Fig. 4, in the embodiment of the present invention, another embodiment of a kind of code generating method comprises:
401, code generator obtains UI edit instruction;
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction.
402, code generator generates corresponding code according to UI edit instruction;
In the embodiment of the present invention, code generator generates corresponding code according to UI edit instruction after generating UI edit instruction according to operation information.
403, code generator extracts corresponding UI control according to UI edit instruction, and revises the attribute of this UI control;
In the embodiment of the present invention, code generator according to the UI control that UI edit instruction relates to, extracts corresponding UI control, and modifies to the attribute of the UI control extracted after generating UI edit instruction according to operation information from widget library.
404, code generator stores the attribute of UI control in key frame;
In the embodiment of the present invention, after the attribute of the UI control extracted is modified, code generator stores the attribute of UI control in key frame.
405, code generator stores key frame to time shaft;
In the embodiment of the present invention, the key frame having UI control property is stored in time shaft by code generator.
406, code generator judges whether time shaft reaches prerequisite;
In the embodiment of the present invention, code generator judges whether the time shaft storing key frame arrives prerequisite, if so, then performs step 407, if not, then performs step 408.
407, code generator by code storage in its data storehouse;
In the embodiment of the present invention, when time shaft arrive prerequisite time, code generator by code storage in its data storehouse.
408, code generator performs other operations.
In the embodiment of the present invention, when time shaft does not reach prerequisite, code generator performs other operations.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, code storage in its data storehouse, is improved the feasibility of scheme by code generator.
Again, when time shaft does not arrive prerequisite, code generator performs other operations, improves the reliability of scheme.
(2), code generator by code storage in External memory equipment.
Refer to Fig. 5, in the embodiment of the present invention, another embodiment of a kind of code generating method comprises:
501, code generator obtains UI edit instruction;
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction.
502, code generator generates corresponding code according to UI edit instruction;
In the embodiment of the present invention, code generator generates corresponding code according to UI edit instruction after generating UI edit instruction according to operation information.
503, code generator extracts corresponding UI control according to UI edit instruction, and revises the attribute of this UI control;
In the embodiment of the present invention, code generator according to the UI control that UI edit instruction relates to, extracts corresponding UI control, and modifies to the attribute of the UI control extracted after generating UI edit instruction according to operation information from widget library.
504, code generator stores the attribute of UI control in key frame;
In the embodiment of the present invention, after the attribute of the UI control extracted is modified, code generator stores the attribute of UI control in key frame.
505, code generator stores key frame to time shaft;
In the embodiment of the present invention, the key frame having UI control property is stored in time shaft by code generator.
506, code generator judges whether time shaft reaches prerequisite;
In the embodiment of the present invention, code generator judges whether the time shaft storing key frame arrives prerequisite, if so, then performs step 507, if not, then performs step 508.
507, code generator by code storage in External memory equipment;
In the embodiment of the present invention, when time shaft arrive prerequisite time, code generator by code storage in External memory equipment.
508, code generator performs other operations.
In the embodiment of the present invention, when time shaft does not reach prerequisite, code generator performs other operations.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, code storage in its data storehouse, is improved the feasibility of scheme by code generator.
Again, when time shaft does not arrive prerequisite, code generator performs other operations, improves the reliability of scheme.
For ease of understanding, with a concrete application scenarios, a kind of code generating method is described in detail below, concrete:
Certain user carries out the design of UI animation on visualization interface, this design 1 pictures realizes the animation effect that Variable rate becomes large, animation time is 1 second, picture to end become large 2 times, key frame every 0.25 second stored in a time shaft, code generator generates UI edit instruction according to this operation information, from widget library, control " Animation " is transferred according to UI edit instruction, parameter " fromXScale [float] " in the attribute " ScaleAnimation " of control, when " fromYScale [float] " represents that animation is initial, flexible size on picture transverse and longitudinal coordinate, non-telescope, value is 1.0, then just start " fromXScale [float]=1.0 " in attribute, " fromYScale [float]=1.0 ",
0.25 second time, by the parameter modification in the attribute of " ScaleAnimation " control be " fromXScale [float]=1.25 ", " fromYScale [float]=1.25 ", store the attribute of UI control this moment in key frame " 01 ", by in key frame " 01 " access time axle, 0.5 second time, by the parameter modification in the attribute of " ScaleAnimation " control be " fromXScale [float]=1.50 ", " fromYScale [float]=1.50 ", store the attribute of UI control this moment in key frame " 02 ", by in key frame " 02 " access time axle, 0.75 second time, by the parameter modification in the attribute of " ScaleAnimation " control be " fromXScale [float]=1.75 ", " fromYScale [float]=1.75 ", store the attribute of UI control this moment in key frame " 03 ", by in key frame " 03 " access time axle, 1 second time, by the parameter modification in the attribute of " ScaleAnimation " control be " fromXScale [float]=2.0 ", " fromYScale [float]=2.0 ", store the attribute of UI control this moment in key frame " 04 ", by in key frame " 04 " access time axle,
In UI animation operating process, code generator generates corresponding code according to UI edit instruction, at the end of UI animation, key frame " 01 " in time shaft, " 02 ", the attribute of UI control is have recorded respectively in " 03 " " 04 ", play this time shaft and can check the animation effect that this UI designs, if the UI animation that time shaft is play reaches the standard pre-set " realize with 1 pictures the animation effect that Variable rate becomes large, animation time is 1 second, picture to end become large 2 times ", then code generator by code storage in its data storehouse or External memory equipment, if UI animation does not reach the standard pre-set, then not storage code.
In the embodiment of the present invention, when user starts UI design, code generator obtains UI edit instruction, code generator generates corresponding code according to UI edit instruction, code generator extracts corresponding UI control according to UI edit instruction, and revise the attribute of UI control, code generator stores the attribute of UI control in key frame, this key frame is stored to time shaft, judge whether time shaft reaches prerequisite, if time shaft reaches prerequisite, code generator storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Refer to Fig. 6, in the embodiment of the present invention, an a kind of embodiment of code generator comprises:
Acquisition module 601, for obtaining UI edit instruction;
Generation module 602, generates corresponding code for the UI edit instruction got according to acquisition module 601;
Processing module 603, the UI edit instruction for getting according to acquisition module 601 extracts corresponding UI control, and revises the attribute of UI control;
First memory module 604, for storing the attribute of the amended UI control of described processing module 603 in key frame;
Second memory module 605, for storing key frame to time shaft;
Judge module 606, for judging whether time shaft reaches prerequisite;
3rd memory module 607, for storage code.
In the embodiment of the present invention, when user starts UI design, acquisition module 601 obtains UI edit instruction, the UI edit instruction that generation module 602 gets according to acquisition module 601 generates corresponding code, processing module 603 extracts corresponding UI control according to the UI edit instruction that acquisition module 601 gets, and revise the attribute of UI control, first memory module 604 stores the attribute of UI control in key frame, this key frame is stored to time shaft by the second memory module 605, judge module 606 judges whether time shaft reaches prerequisite, if time shaft reaches prerequisite, 3rd memory module 607 storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Refer to Fig. 7, in the embodiment of the present invention, another embodiment of a kind of code generator comprises:
Acquisition module 701, for obtaining UI edit instruction;
Generation module 702, generates corresponding code for the UI edit instruction got according to acquisition module 801;
Processing module 703, the UI edit instruction for getting according to acquisition module 801 extracts corresponding UI control, and revises the attribute of UI control;
First memory module 704, for storing the attribute of the amended UI control of described processing module 703 in key frame;
Second memory module 705, for storing key frame to time shaft;
Judge module 706, for judging whether time shaft reaches prerequisite;
3rd memory module 707, for storage code;
Execution module 708, for performing other operations.
In the embodiment of the present invention, acquisition module 701 comprises:
First receiving element 7011, for receiving the operation information of visualization interface;
Generation unit 7012, generates corresponding UI edit instruction for the operation information received according to the first receiving element 7011;
Or,
Second receiving element 7013, for receiving the UI edit instruction that other equipment sends.
In the embodiment of the present invention, when user starts UI design, the first receiving element 7011 in acquisition module 701 receives the operation information of visualization interface, the operation information that generation unit 7012 receives according to the first receiving element 7011 generates corresponding UI edit instruction, the UI edit instruction generating code that generation module 702 generates according to generation unit 7012, processing module 703 extracts corresponding UI control according to the UI edit instruction that generation unit 7012 generates, and revise the attribute of UI control, first memory module 704 stores the attribute of UI control in key frame, this key frame is stored to time shaft by the second memory module 705, judge module 706 judges whether time shaft reaches prerequisite, if time shaft reaches prerequisite, 3rd memory module 707 storage code, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, the variation that acquisition module 701 obtains UI edit instruction makes scheme more flexible.
Again, when judge module 706 judged result whether time, execution module 708 performs other operations, improves the reliability of scheme.
Refer to Fig. 8, in the embodiment of the present invention, another embodiment of a kind of code generator comprises:
Acquisition module 801, for obtaining UI edit instruction;
Generation module 802, generates corresponding code for the UI edit instruction got according to acquisition module 801;
Processing module 803, the UI edit instruction for getting according to acquisition module 801 extracts corresponding UI control, and revises the attribute of UI control;
First memory module 804, for storing the attribute of the amended UI control of described processing module 803 in key frame;
Second memory module 805, for storing key frame to time shaft;
Judge module 806, for judging whether time shaft reaches prerequisite;
3rd memory module 807, for storage code;
Execution module 808, for performing other operations.
In the embodiment of the present invention, the 3rd memory module 807 comprises:
First storage unit 8071, for the code storage that generated by generation module 802 in its data storehouse;
Or,
Second storage unit 8072, for the code storage that generated by generation module 802 in External memory equipment.
In the embodiment of the present invention, when user starts UI design, acquisition module 801 obtains UI edit instruction, the UI edit instruction generating code that generation module 802 obtains according to acquisition module 801, processing module 803 extracts corresponding UI control according to the UI edit instruction that acquisition module 801 obtains, and revise the attribute of UI control, first memory module 804 stores the attribute of UI control in key frame, this key frame is stored to time shaft by the second memory module 805, judge module 806 judges whether time shaft reaches prerequisite, if time shaft reaches prerequisite, the first storage unit 8071 or the second storage unit 8072 storage code in 3rd memory module 807, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, the mode variation of the 3rd memory module 807 storage code makes scheme convenient
Again, when judge module 806 judged result whether time, execution module 808 performs other operations, improves the reliability of scheme.
Refer to Fig. 9, in the embodiment of the present invention, another embodiment of a kind of code generator comprises:
Acquisition module 901, for obtaining UI edit instruction;
Generation module 902, generates corresponding code for the UI edit instruction got according to acquisition module 901;
Processing module 903, the UI edit instruction for getting according to acquisition module 901 extracts corresponding UI control, and revises the attribute of UI control;
First memory module 904, for storing the attribute of the amended UI control of described processing module 903 in key frame;
Second memory module 905, for storing key frame to time shaft;
Judge module 906, for judging whether time shaft reaches prerequisite;
3rd memory module 907, for storage code;
Execution module 908, for performing other operations.
In the embodiment of the present invention, acquisition module 901 comprises:
First receiving element 9011, for receiving the operation information of visualization interface;
Generation unit 9012, generates corresponding UI edit instruction for the operation information received according to the first receiving element 9011;
Or,
Second receiving element 9013, for receiving the UI edit instruction that other equipment sends.
In the embodiment of the present invention, the 3rd memory module 907 comprises:
First storage unit 9071, for the code storage that generated by generation module 902 in its data storehouse;
Or,
Second storage unit 9072, for the code storage that generated by generation module 902 in External memory equipment.
In the embodiment of the present invention, when user starts UI design, the first receiving element 9011 in acquisition module 901 receives the operation information of visualization interface, the operation information that generation unit 9012 receives according to the first receiving element 9011 generates corresponding UI edit instruction, the UI edit instruction generating code that generation module 902 generates according to generation unit 9012, processing module 903 extracts corresponding UI control according to the UI edit instruction that generation unit 9012 generates, and revise the attribute of UI control, first memory module 904 stores the attribute of UI control in key frame, this key frame is stored to time shaft by the second memory module 905, judge module 906 judges whether time shaft reaches prerequisite, if time shaft reaches prerequisite, the first storage unit 9071 or the second storage unit 9072 storage code in 3rd memory module 907, this code runs can realize UI animation, therefore user does not need editor and debugging code to realize UI animation, improve the efficiency of UI design.
Secondly, the variation that acquisition module 901 obtains UI edit instruction makes scheme more flexible.
Again, the mode variation of the 3rd memory module 907 storage code makes scheme convenient.
In addition, when judge module 906 judged result whether time, trigger execution module 908, improve the reliability of scheme.
Be described in detail with the reciprocal process of a specific implementation to unit each in embodiment of the present invention code generator below:
Certain user carries out the design of UI animation on visualization interface, this design 1 pictures realizes the animation effect that Variable rate becomes large, animation time is 1 second, picture to 1 second terminate become large 2 times, key frame every 0.25 second stored in a time shaft, picture is " scene.jpg ", this picture is added at interface, the first receiving element 9011 in acquisition module 901 receives the operation information of visualization interface, the operation information that generation unit 9012 receives according to the first receiving element 9011 generates UI edit instruction, processing module 903 transfers control " Animation " according to UI edit instruction from widget library, parameter " fromXScale [float] " in the attribute " ScaleAnimation " of control, when " fromYScale [float] " represents that animation is initial, flexible size on picture transverse and longitudinal coordinate, non-telescope, value is 1.0, then just having started parameter in attribute is " fromXScale [float]=1.0 ", " fromYScale [float]=1.0 ",
0.25 second time, parameter modification in the attribute of " ScaleAnimation " control is " fromXScale [float]=1.25 " by processing module 903, " fromYScale [float]=1.25 ", first memory module 904 stores the attribute of UI control this moment in key frame " 01 ", second memory module 905 is by key frame " 01 " access time axle, 0.5 second time, parameter modification in the attribute of " ScaleAnimation " control is " fromXScale [float]=1.50 " by processing module 903, " fromYScale [float]=1.50 ", first memory module 904 stores the attribute of UI control this moment in key frame " 02 ", second memory module 905 is by key frame " 02 " access time axle, 0.75 second time, parameter modification in the attribute of " ScaleAnimation " control is " fromXScale [float]=1.75 " by processing module 903, " fromYScale [float]=1.75 ", first memory module 904 stores the attribute of UI control this moment in key frame " 03 ", second memory module 905 is by key frame " 03 " access time axle, 1 second time, parameter modification in the attribute of " ScaleAnimation " control is " fromXScale [float]=2.0 " by processing module 903, " fromYScale [float]=2.0 ", first memory module 904 stores the attribute of UI control this moment in key frame " 04 ", second memory module 905 is by key frame " 04 " access time axle,
In UI animation operating process, generation module 902 is according to UI edit instruction generating code, at the end of UI animation, key frame " 01 " in time shaft, " 02 ", the attribute of UI control is have recorded respectively in " 03 " " 04 ", play this time shaft and can check the animation effect that this UI designs, if the UI animation that time shaft is play reaches the standard pre-set " realize with 1 pictures the animation effect that Variable rate becomes large, animation time is 1 second, picture to end become large 2 times ", then the judged result of judge module 906 is yes, the first storage unit 9071 then in the 3rd memory module 907 or the second storage unit 9072 store the code that generation module 902 generates, the judged result of judge module 906 is no, then trigger execution module 908.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.
The above, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (12)

1. a code generating method, is characterized in that, comprising:
Code generator obtains man-machine interface UI edit instruction;
Described code generator generates corresponding code according to described UI edit instruction;
Described code generator extracts corresponding UI control according to described UI edit instruction, and revises the attribute of described UI control;
Described code generator stores the attribute of described UI control in key frame;
Described code generator stores described key frame to time shaft;
Described code generator judges whether described time shaft reaches prerequisite;
If described time shaft reaches prerequisite, then described code generator stores described code.
2. code generating method according to claim 1, is characterized in that, described code generator obtains man-machine interface UI edit instruction and comprises:
Code generator receives the operation information of visualization interface;
Described code generator generates corresponding UI edit instruction according to described operation information.
3. code generating method according to claim 1, is characterized in that, described code generator obtains man-machine interface UI edit instruction and comprises:
Code generator receives the UI edit instruction that other equipment sends.
4. code generating method according to claim 1, is characterized in that, described code generator stores described code and comprises:
Described code generator by described code storage in its data storehouse.
5. code generating method according to claim 1, is characterized in that, described code generator stores described code and comprises:
Described code generator by described code storage in External memory equipment.
6. code generating method according to any one of claim 1 to 5, is characterized in that, described method also comprises:
If described time shaft does not reach prerequisite, then described code generator performs other operations.
7. a code generator, is characterized in that, comprising:
Acquisition module, for obtaining UI edit instruction;
Generation module, generates corresponding code for the described UI edit instruction got according to described acquisition module;
Processing module, the UI edit instruction for getting according to described acquisition module extracts corresponding UI control, and revises the attribute of described UI control;
First memory module, for storing the attribute of the amended described UI control of described processing module in key frame;
Second memory module, for storing described key frame to time shaft;
Judge module, for judging whether described time shaft reaches prerequisite;
3rd memory module, for storing described code.
8. code generator according to claim 7, is characterized in that, described acquisition module comprises:
First receiving element, for receiving the operation information of visualization interface;
Generation unit, generates corresponding UI edit instruction for the described operation information received according to described first receiving element.
9. code generator according to claim 7, is characterized in that, described acquisition module comprises:
Second receiving element, for receiving the UI edit instruction that other equipment sends.
10. code generator according to claim 7, is characterized in that, described 3rd memory module comprises:
First storage unit, for the described code storage that generated by described generation module in its data storehouse.
11. code generators according to claim 7, is characterized in that, described 3rd memory module comprises:
Second storage unit, for the described code storage that generated by described generation module in External memory equipment.
12. code generators according to any one of claim 7 to 11, is characterized in that, also comprise:
Execution module, for performing other operations.
CN201410718632.1A 2014-12-01 2014-12-01 Code generating method and code generator Pending CN104360866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410718632.1A CN104360866A (en) 2014-12-01 2014-12-01 Code generating method and code generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410718632.1A CN104360866A (en) 2014-12-01 2014-12-01 Code generating method and code generator

Publications (1)

Publication Number Publication Date
CN104360866A true CN104360866A (en) 2015-02-18

Family

ID=52528130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410718632.1A Pending CN104360866A (en) 2014-12-01 2014-12-01 Code generating method and code generator

Country Status (1)

Country Link
CN (1) CN104360866A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780672A (en) * 2017-01-16 2017-05-31 北京恒华伟业科技股份有限公司 A kind of browser, animation editor Play System and method
CN111966428A (en) * 2020-08-21 2020-11-20 支付宝(杭州)信息技术有限公司 Page processing method and device and page backtracking method and device
WO2023279914A1 (en) * 2021-07-09 2023-01-12 北京字跳网络技术有限公司 Control editing method and apparatus, device, readable storage medium, and product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101859245A (en) * 2009-04-09 2010-10-13 北大方正集团有限公司 Method and device for generating user interface
CN102004647A (en) * 2010-12-24 2011-04-06 青岛海信信芯科技有限公司 Implementation method and device for on-screen display (OSD) application framework as well as multimedia terminal
CN103677819A (en) * 2013-12-05 2014-03-26 深圳中兴网信科技有限公司 Method and device for achieving code forward engineering based on OSGI
CN104090767A (en) * 2014-07-18 2014-10-08 上海斐讯数据通信技术有限公司 Parameterized user interface development tool and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101859245A (en) * 2009-04-09 2010-10-13 北大方正集团有限公司 Method and device for generating user interface
CN102004647A (en) * 2010-12-24 2011-04-06 青岛海信信芯科技有限公司 Implementation method and device for on-screen display (OSD) application framework as well as multimedia terminal
CN103677819A (en) * 2013-12-05 2014-03-26 深圳中兴网信科技有限公司 Method and device for achieving code forward engineering based on OSGI
CN104090767A (en) * 2014-07-18 2014-10-08 上海斐讯数据通信技术有限公司 Parameterized user interface development tool and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ADMIN: "超实用!可视化CSS3动画生成神器Stylie", 《HTTP://WWW.GZTYWL.CN/VIEW.ASP?ID=25》 *
匿名: ""Stylie. A graphical CSS animation tool."", 《HTTPS://WEB.ARCHIVE.ORG/WEB/20130913160206/HTTP://JEREMYCKAHN.GITHUB.IO:80/STYLIE/》 *
匿名: "CSS3 Keyframes Animation Generator", 《HTTPS://WEB.ARCHIVE.ORG/WEB/20130822065812/HTTP://CSSANIMATE.COM/》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780672A (en) * 2017-01-16 2017-05-31 北京恒华伟业科技股份有限公司 A kind of browser, animation editor Play System and method
CN111966428A (en) * 2020-08-21 2020-11-20 支付宝(杭州)信息技术有限公司 Page processing method and device and page backtracking method and device
CN111966428B (en) * 2020-08-21 2022-07-15 支付宝(杭州)信息技术有限公司 Page processing method and device and page backtracking method and device
WO2023279914A1 (en) * 2021-07-09 2023-01-12 北京字跳网络技术有限公司 Control editing method and apparatus, device, readable storage medium, and product

Similar Documents

Publication Publication Date Title
CN102436498B (en) Report form generating method and relative device
CN105739983B (en) Shell script editing device and its implementation
CN102449598A (en) Package design and generation
CN111984235B (en) Customizable front-end low-code development system and method
CN105100462A (en) Short message system having custom theme edition function
CN102122502B (en) Method and related device for displaying three-dimensional (3D) font
CN107122175B (en) Interface creating method and device
CN107807821A (en) The implementation method and terminal of animation pop-up
CN104834530A (en) Method for developing POS application program and cloud server
CN109445775B (en) One-key active embedded code method, device and computer readable storage medium
CN104267962A (en) Interface UI (user interface) control configuration method based on description
CN115268886A (en) Method, designer, equipment and medium for realizing data visualization page by zero code
CN103425632A (en) Serializing method, device and processor
CN106027785A (en) Voice processing method and terminal
CN104636165A (en) Mobile device starting method and device
CN104407779A (en) Arrangement display method and device for graphical interface
CN109471580B (en) Visual 3D courseware editor and courseware editing method
CN106055535B (en) Chart generation method and device
CN104360866A (en) Code generating method and code generator
CN112685025A (en) Method and system for quickly building front-end page
CN104484058A (en) Instant expression image outputting method and instant expression image outputting device
CN101944017B (en) Method and device for producing Widget
CN102779045B (en) A kind of interface creating method, interface editor and electronic equipment
CN114741071A (en) Application construction method and device
CN114130017A (en) Game engine-based interface deployment method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161017

Address after: Unit B2-B5 16 building 518000 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Applicant after: Shenzhen 7road Technology Co.,Ltd.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District Keyuan Road branch science park A building 18 unit 3

Applicant before: SHENZHEN QICAICHANGXIANG NETWORK TECHNOLOGY CO., LTD.

CB02 Change of applicant information

Address after: Nanshan District Keyuan Road Shenzhen city Guangdong province 518057 No. 15 Kexing Science Park Building 2 unit A 17

Applicant after: Shenzhen 7road Technology Co.,Ltd.

Address before: Unit B2-B5 16 building 518000 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Applicant before: Shenzhen 7road Technology Co.,Ltd.

COR Change of bibliographic data
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180427

Address after: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen Qianhai illusion Network Technology Co., Ltd.

Address before: 518057, 17 unit, 2 unit, A building, Kexing Science Park, 15 Keyuan Road, Nanshan District, Shenzhen, Guangdong.

Applicant before: Shenzhen 7road Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150218