CN105117219A - User-defined drawing control realization method and system - Google Patents

User-defined drawing control realization method and system Download PDF

Info

Publication number
CN105117219A
CN105117219A CN201510498225.9A CN201510498225A CN105117219A CN 105117219 A CN105117219 A CN 105117219A CN 201510498225 A CN201510498225 A CN 201510498225A CN 105117219 A CN105117219 A CN 105117219A
Authority
CN
China
Prior art keywords
control
targeted graphical
taproot
call
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510498225.9A
Other languages
Chinese (zh)
Other versions
CN105117219B (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510498225.9A priority Critical patent/CN105117219B/en
Publication of CN105117219A publication Critical patent/CN105117219A/en
Application granted granted Critical
Publication of CN105117219B publication Critical patent/CN105117219B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application provides a user-defined drawing control realization method. At first, an ActionScript language based basic core control interface is directly called in a control library without the need for secondary rewriting of a drawing control; and then, basic methods and basic attributes of a basic core control are reconfigured and unwanted basic attributes and basic methods are removed. Therefore, the resources occupied by the control are reduced, the drawing control in the method is realized on the basis of the reconfigured basic core control, the resources occupied by the drawing control are reduced, and the control rendering efficiency is improved.

Description

A kind of implementation method of self-defined Graphics Control and system
Technical field
The application relates to field of computer technology, particularly a kind of implementation method of self-defined Graphics Control and system.
Background technology
Along with the development of technology, people more and more pay close attention to self-defined Graphics Control.
Existing control is all generally the method adopting secondary development, needs special developer to operate, more loaded down with trivial details, and includes the full content of basic control, and make control take resource large, drawing efficiency is low.
Therefore, how simple and effective self-definition design of carrying out graphical control, reduces the resource that control takies, and improving drawing efficiency is the current technical issues that need to address of those skilled in the art.
Summary of the invention
Technical problems to be solved in this application are to provide a kind of implementation method and system of self-defined Graphics Control, solve in prior art and need special developer to operate, more loaded down with trivial details, and include the full content of basic control, control is made to take resource large, the problem that drawing efficiency is low.
Its concrete scheme is as follows:
An implementation method for self-defined Graphics Control, the method comprises:
Call the taproot control based on ActionScript language;
The basic skills of described taproot control and base attribute are reconfigured, removes unwanted base attribute and basic skills;
Call drawing instrument, draw targeted graphical, and described targeted graphical is inserted in described taproot control;
The targeted graphical of described drafting is inputted, output interface configuration, form a complete Graphics Control.
Above-mentioned method, optionally, described in call drawing instrument, draw targeted graphical, comprising:
Call drawing instrument;
Initialization style configuration is carried out to described targeted graphical;
Drawing coordinate is confirmed according to described initialization style configuration;
Brush is moved in position according to coordinate, draws described targeted graphical.
Above-mentioned method, optionally, to be describedly inserted into targeted graphical in described taproot control, to comprise:
Check whether described targeted graphical has nested object;
When described targeted graphical has nested object, check level belonging to described targeted graphical, and described targeted graphical is nested in control corresponding to corresponding level.
Self-defined Graphics Control realize a system, this system comprises:
First call unit, for calling the taproot control based on ActionScript language;
Reconfiguring unit, for reconfiguring the basic skills of described taproot control and base attribute, removing unwanted base attribute and basic skills;
Second call unit, for calling drawing instrument, drawing targeted graphical, and being inserted into by described targeted graphical in described taproot control;
Interface configuration unit, for inputting the targeted graphical of described drafting, output interface configuration, forms a complete Graphics Control.
Above-mentioned system, optionally, described second call unit comprises:
3rd call unit, for calling drawing instrument;
Initial configuration unit, for carrying out initialization style configuration to described targeted graphical;
Confirm coordinate unit, for confirming drawing coordinate according to described initialization style configuration;
Image-drawing unit, moves brush for the position according to coordinate, draws described targeted graphical.
Above-mentioned system, optionally, described second call unit comprises:
Inspection unit, for checking whether described targeted graphical has nested object;
Nested cell, for when described targeted graphical has nested object, checks level belonging to described targeted graphical, and is nested in control corresponding to corresponding level by described targeted graphical.
In the implementation method of a kind of self-defined Graphics Control that the application provides, first, in widget library, directly call the taproot control interface based on ActionScript language; Do not need to carry out double-written to Graphics Control, then, the basic skills of described taproot control and base attribute are reconfigured, removes unwanted base attribute and basic skills; Decrease the resource that control takies, the basis of the taproot control after above-mentioned reconfiguring realizes the Graphics Control in the application, decrease the resource that Graphics Control takies, improve the efficiency that control is played up.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the implementation method embodiment of a kind of self-defined Graphics Control of the application;
Fig. 2 is the process flow diagram of another embodiment of implementation method of a kind of self-defined Graphics Control of the application;
Fig. 3 is the process flow diagram of another embodiment of implementation method of a kind of self-defined Graphics Control of the application;
Fig. 4 is the schematic diagram realizing system embodiment of a kind of self-defined Graphics Control of the application;
Fig. 5 is the schematic diagram of another embodiment of the system that realizes of a kind of self-defined Graphics Control of the application;
Fig. 6 is the schematic diagram of another embodiment of the system that realizes of a kind of self-defined Graphics Control of the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the application's protection.
Present applicant proposes a kind of method of the self-defined Graphics Control based on the realization of ActionScript script, the notable feature of the application is can a self-defined user control according to the demand of user, then use as using the mode of basic control, and the figure that various user thinks drafting can be drawn, refer to this rectangle or nested rectangle square-shaped patterns here.And the internal memory that takies of this control and cpu resource considerably less because unnecessary playing up all is eliminated, but also have no lack of the attractive in appearance of figure.
With reference to figure 1, show the process flow diagram of the implementation method embodiment of a kind of self-defined Graphics Control of the application, can comprise the following steps:
Step S101: call the taproot control based on ActionScript language.
There is taproot control in widget library, this control forms the basic control of self-defined control, self-defined control in the application be taproot control in widget library basis on realize, taproot control in the application is made up of Label control, major function is the elementary event and the attribute that inherit Label control, mainly applies the drawing practice of Label control.
Before carrying out self-defined control, need to call taproot control by the mode of calling interface, then on the basis of the taproot control called, realize self-defined control.
Step S102: the basic skills of described taproot control and base attribute are reconfigured, removes unwanted base attribute and basic skills.
After having called taproot control, need to process taproot control, reload base attribute and the basic skills of described taproot control, remove and the incoherent attribute of the demand of client and method, make, in described taproot control, only there is the attribute relevant to customer demand and method, like this, attribute and the method for control can be simplified, decrease the space that control takies, improve the speed that control is played up.
Step S103: call drawing instrument, draws targeted graphical, and is inserted in described taproot control by described targeted graphical.
After the base attribute of taproot control and basic skills have been loaded, call drawing instrument, draw the figure of control, the size and shape of taproot control can be changed by drawing instrument, this shape can be straight line also can be a large rectangle frame etc., then different colors and explanatory note are configured to the control figure of described drafting, and drawn control figure is inserted in taproot control.
Step S104: to input the targeted graphical of described drafting, output interface configuration, forms a complete Graphics Control.
Secondary encapsulation is carried out to drawn control figure, is provided as the control Interface design of standard, facilitate calling and debugging of follow-up user.
Final control has just become, and user can be used by the mode of the form of label and script, and the control result of use of standard is the same, and also higher than other control method rendering efficiency.
In the implementation method of a kind of self-defined Graphics Control that the application provides, first, in widget library, directly call the taproot control interface based on ActionScript language; Do not need to carry out double-written to Graphics Control, then, the basic skills of described taproot control and base attribute are reconfigured, removes unwanted base attribute and basic skills; Decrease the resource that control takies, the basis of the taproot control after above-mentioned reconfiguring realizes the Graphics Control in the application, decrease the resource that Graphics Control takies, improve the efficiency that control is played up.
With reference to figure 2, show the process flow diagram of another embodiment of implementation method of a kind of self-defined Graphics Control of the application, described in call drawing instrument, draw targeted graphical can comprise the following steps:
Step S201: call drawing instrument.
Step S202: initialization style configuration is carried out to described targeted graphical.
Step S203: confirm drawing coordinate according to described initialization style configuration.
Step S204: brush is moved in the position according to coordinate, draws described targeted graphical.
In the application, when drawing control figure, call the brush control tool of drawing, carry out initialization drawing, carry out initialization style configuration by the base attribute obtained in basic configuration module, style configuration loads pattern and the color of figure.
After all loadings complete, the coordinate starting to draw confirms, is to determine coordinate according to the shape of graphing, and brush is moved in the position according to coordinate, carries out enforcement and draws, and can carry out the explanation of word.
With reference to figure 3, show the process flow diagram of another embodiment of implementation method of a kind of self-defined Graphics Control of the application, describedly targeted graphical to be inserted in described taproot control, comprising:
Step S301: check whether described targeted graphical has nested object.
Step S302: when described targeted graphical has nested object, check level belonging to described targeted graphical, and described targeted graphical is nested in control corresponding to corresponding level.
After completing, whether the described targeted graphical of inspection has nested object, checks that the figure of drafting is that level, and he is put in corresponding control, and the view that finally formation one is brand-new, the view finally completed is exactly the figure that we will draw automatically.
After the user-defined Graphics Control of formation, can call control, use as using the mode of basic control, and the figure that various user thinks drafting can be drawn, in the process of graphing, provide the configuration of input parameter and the configuration of output parameter, and the configuration of configuration parameter, carry out drawing various rectangle or square and nested composite figure according to the configuration parameter that user provides, carry out effective Formatting Output.
Corresponding with the method that the implementation method embodiment 1 of a kind of self-defined Graphics Control of above-mentioned the application provides, see Fig. 4, what present invention also provides a kind of self-defined Graphics Control realizes system embodiment, and in the present embodiment, this system comprises:
First call unit 401, for calling the taproot control based on ActionScript language.
Reconfiguring unit 402, for reconfiguring the basic skills of described taproot control and base attribute, removing unwanted base attribute and basic skills.
Second call unit 403, for calling drawing instrument, drawing targeted graphical, and being inserted in described taproot control by described targeted graphical.
Interface configuration unit 404, for inputting the targeted graphical of described drafting, output interface configuration, forms a complete Graphics Control.
See Fig. 5, present invention also provides another embodiment of the system that realizes of a kind of self-defined Graphics Control, described second call unit 403 comprises:
3rd call unit 501, for calling drawing instrument.
Initial configuration unit 502, for carrying out initialization style configuration to described targeted graphical.
Coordinate confirmation unit 503, for confirming drawing coordinate according to described initialization style configuration.
Image-drawing unit 504, moves brush for the position according to coordinate, draws described targeted graphical.
See Fig. 6, present invention also provides another embodiment of the system that realizes of a kind of self-defined Graphics Control, described second call unit 403 comprises:
Inspection unit 601, for checking whether described targeted graphical has nested object.
Nested cell 602, for when described targeted graphical has nested object, checks level belonging to described targeted graphical, and is nested in control corresponding to corresponding level by described targeted graphical.
In sum, developer can not be used in and carry out second time exploitation, directly calls control interface and carries out, configure control property simultaneously, call drawing practice just, the configuration parameter just provided according to user carries out drawing various rectangle or square and nested composite figure.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
For convenience of description, various unit is divided into describe respectively with function when describing above device.Certainly, the function of each unit can be realized in same or multiple software and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realizes.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the application or embodiment.
Above the implementation method of a kind of self-defined Graphics Control that the application provides and system are described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (6)

1. an implementation method for self-defined Graphics Control, is characterized in that, the method comprises:
Call the taproot control based on ActionScript language;
The basic skills of described taproot control and base attribute are reconfigured, removes unwanted base attribute and basic skills;
Call drawing instrument, draw targeted graphical, and described targeted graphical is inserted in described taproot control;
The targeted graphical of described drafting is inputted, output interface configuration, form a complete Graphics Control.
2. method according to claim 1, is characterized in that, described in call drawing instrument, draw targeted graphical, comprising:
Call drawing instrument;
Initialization style configuration is carried out to described targeted graphical;
Drawing coordinate is confirmed according to described initialization style configuration;
Brush is moved in position according to coordinate, draws described targeted graphical.
3. method according to claim 1, is characterized in that, is describedly inserted into by targeted graphical in described taproot control, comprising:
Check whether described targeted graphical has nested object;
When described targeted graphical has nested object, check level belonging to described targeted graphical, and described targeted graphical is nested in control corresponding to corresponding level.
4. self-defined Graphics Control realize a system, it is characterized in that, this system comprises:
First call unit, for calling the taproot control based on ActionScript language;
Reconfiguring unit, for reconfiguring the basic skills of described taproot control and base attribute, removing unwanted base attribute and basic skills;
Second call unit, for calling drawing instrument, drawing targeted graphical, and being inserted into by described targeted graphical in described taproot control;
Interface configuration unit, for inputting the targeted graphical of described drafting, output interface configuration, forms a complete Graphics Control.
5. system according to claim 4, is characterized in that, described second call unit comprises:
3rd call unit, for calling drawing instrument;
Initial configuration unit, for carrying out initialization style configuration to described targeted graphical;
Confirm coordinate unit, for confirming drawing coordinate according to described initialization style configuration;
Image-drawing unit, moves brush for the position according to coordinate, draws described targeted graphical.
6. system according to claim 4, is characterized in that, described second call unit comprises:
Inspection unit, for checking whether described targeted graphical has nested object;
Nested cell, for when described targeted graphical has nested object, checks level belonging to described targeted graphical, and is nested in control corresponding to corresponding level by described targeted graphical.
CN201510498225.9A 2015-08-13 2015-08-13 A kind of method and system of customized Graphics Control Active CN105117219B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510498225.9A CN105117219B (en) 2015-08-13 2015-08-13 A kind of method and system of customized Graphics Control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510498225.9A CN105117219B (en) 2015-08-13 2015-08-13 A kind of method and system of customized Graphics Control

Publications (2)

Publication Number Publication Date
CN105117219A true CN105117219A (en) 2015-12-02
CN105117219B CN105117219B (en) 2019-05-28

Family

ID=54665221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510498225.9A Active CN105117219B (en) 2015-08-13 2015-08-13 A kind of method and system of customized Graphics Control

Country Status (1)

Country Link
CN (1) CN105117219B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293804A (en) * 2016-07-25 2017-01-04 深圳天珑无线科技有限公司 A kind for the treatment of method and apparatus of public control
CN106708504A (en) * 2016-11-15 2017-05-24 深圳市丰巨泰科电子有限公司 Personalized control method for generating APP through doodling

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646038A (en) * 2012-02-28 2012-08-22 广州市动景计算机科技有限公司 Control content display method, control content display device and mobile terminal
CN103023746A (en) * 2011-09-23 2013-04-03 北京神州泰岳软件股份有限公司 IM (Instant Messaging) system and drawing board implementation method based on same
CN103440127A (en) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 Software graphical interface drawing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023746A (en) * 2011-09-23 2013-04-03 北京神州泰岳软件股份有限公司 IM (Instant Messaging) system and drawing board implementation method based on same
CN102646038A (en) * 2012-02-28 2012-08-22 广州市动景计算机科技有限公司 Control content display method, control content display device and mobile terminal
CN103440127A (en) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 Software graphical interface drawing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卿湘涛 等: ""VB与Surfer制作自定义控件绘制多种色斑图的方法"", 《安徽农业科学》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293804A (en) * 2016-07-25 2017-01-04 深圳天珑无线科技有限公司 A kind for the treatment of method and apparatus of public control
CN106708504A (en) * 2016-11-15 2017-05-24 深圳市丰巨泰科电子有限公司 Personalized control method for generating APP through doodling

Also Published As

Publication number Publication date
CN105117219B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN102855178B (en) Method and device for generating Mock base during unit test
CN109358851A (en) Creation method, device and the computer readable storage medium of chart components
CN108597014B (en) Cross-platform rendering effect editing system based on visual programming
CN106293664A (en) Code generating method and device
CN102104510B (en) Data view processing method and system
CN104461573B (en) A kind of control process method of view level
CN105335389B (en) A kind of business method for visualizing and system
CN104407779A (en) Arrangement display method and device for graphical interface
CN103793226B (en) Pervasive application code framework fast-generating method and prototype system
CN104331315A (en) Analysis and generation method and system of json object of any level
CN104574461A (en) Graph modeling method and device
CN106055535A (en) Method and device for generating charts
CN108416149A (en) The real-time formative method of 3 d part unrelated CAD, terminal and storage medium
CN105117219A (en) User-defined drawing control realization method and system
CN109840201B (en) UI test method, device, electronic equipment and computer readable storage medium
CN108153572A (en) GIS display methods, device and system
CN105243013A (en) Software testing method and system
CN106528115A (en) Visualized interface development method and device
CN111985014B (en) Modeling method and system based on standard atlas
CN101776997A (en) Interface processing method and device
CN106708479A (en) Page rendering method and device
CN106648586B (en) Platform for VR creation based on web browser
CN109544701B (en) Method for displaying and editing three-dimensional model
CN115827809A (en) Method and device for generating Geographic Information System (GIS) application
CN109144624B (en) Method, storage medium, device and system for displaying unequal height lists in IOS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant