Specific embodiment
The specific embodiment of interface button application method and system of the invention is described in detail with reference to the accompanying drawing.
Refering to what is shown in Fig. 1, Fig. 1 is the interface button application method flow chart of one embodiment, include the following steps:
Step S10 creates multiple buttons on the interface of client in advance, establishes the tune between the button and client
With relationship, and establishes button pond and store the button;Wherein, the button pond is the container for storing button.
In this step, a certain number of buttons have been pre-created, the calling established between these buttons and client is closed
System allows client according to demand using these buttons, and the button pond by establishing storage button, realizes to button
Centralized control and management button behavior.
In one embodiment, the process of step S10 can specifically include as follows:
Step S101, according to the button demand at interface, the button of dynamic creation respective numbers on the interface of client.?
This, the button quantity according to needed for button client on interface, the sufficient amount of button of dynamic creation is made for its business
With.In the present embodiment, the button client is the occasion that client life cycle needs to use button in button pond.
The button is set hidden state by step S102.Specifically, after button creation is completed, all by them
It stashes, i.e., invisible on interface, such client other parts do not know their presence, make in specific business needs
Reallocate away when with button for button client traffic carry out using.
The button is added in button pond by step S103.In the present embodiment, the function in the button pond can determine
Justice is the container for the button that can be distributed according to need and recycle at any time.
The efficient utilization of the controllability and interface resources of button can be improved in the scheme of above-described embodiment.
Step S20 receives the button application that button client executes business processing, according to the button application from the button
It select button and is distributed to the button client in pond;Wherein, the button client is the occasion that client uses button.
In this step, due to having set call relation between button and client, client can be according to demand
Apply for that these buttons are carried out using requesting to obtain by button application when the specific business of button client is needed using button
Button pond button, from button pond distribute button for the business carry out using.
In one embodiment, the process of step S20 can specifically include as follows:
Step S201, according to the button application from button pond select button.
Step S202 binds the ID number of the selected button with corresponding business;Specifically, each button
With an ID number, by binding the ID number of button and specific business, the button is can be used in related service.
The button is set display state by step S203;Here, button can wait user to execute the business
User's operation.
The technical solution of above-described embodiment realizes the binding of button ID number and the specific business of button client in button pond,
Specific business is allowed to use push button function as needed.Accordingly even when also can when the use to button is compared more frequently
Ensure that client performance is reliable.
Step S30 obtains the user's operation executed in client to the button, the user's operation is transmitted to described
Button client executes corresponding business processing.
In this step, for mainly realization user's operation to the transmitting between business, user can be on the client to button
Operation is executed, these operations are obtained by button from the background, and these operations are notified to give button client, button visitor with real time information
Family can execute corresponding business processing.
In one embodiment, the process of step S30 can specifically include as follows:
Step S301 obtains the user's operation of button;Wherein, the user's operation is that user is right on the interface of client
The operation that corresponding service executes.
The events such as user's operation mentioned here may include: to click, mouse-over, and mouse is removed or double-clicked.
Step S302 generates notification message according to the user's operation.
The notification message is sent to the button client by step S303, is grasped according to the user in the notification message
Make the business processing of the execution button client.
The scheme of above-described embodiment is having button by the user's operation real-time informing occurred on button to user
When user's operation, coherent signal message is sent to notify dependent event to corresponding button client, executes corresponding service processing, it is real
Show the on-demand acquisition of button and uses function.
As one embodiment, in order to which the button guaranteed in button pond can be reused, step S30 is further also wrapped
It includes: after the button client completing button use, discharging the button and be added to it again in the button pond.
The scheme of above-described embodiment can be recycled after button release, in time to improve the utilization rate of interface resources.
Furthermore, it is contemplated that generally requiring to move button in interface button application, display is hidden, and obtains button position
The processing logic such as set, and currently used technology generally adds function button in button area, and for this button on interface
Other controls do corresponding processing logic and then need to examine mutually if there is multiple buttons then need repeatedly to carry out above-mentioned processing logic
Consider each presence of multiple buttons, the complexity of button management can be obviously increased in this way.
Accordingly, another embodiment as interface button application method of the invention, refering to what is shown in Fig. 2, the method
Can also include:
Step S40 is distributing button to the button client, is executed according to button of the client to the distribution
Processing logic repaints the button on the interface.
It, can be to all buttons on interface based on the centralized control and management button behavior to button in this step
Position carries out rearranging drafting.
In one embodiment, the process of step S40 can specifically include as follows:
Processing is hidden in step S401, the display executed according to button of the client to the distribution, to the shape of the button
State adjusts accordingly.
Button in display state is repainted pressing on client end interface according to the layout of setting by step S402
Button region;Here, button can compactly be shown in button area according to the priority that user specifies.
Step S403 adjusts the size of the button area, and other display areas on control button region and interface are not
Generate overlapping.
Refering to what is shown in Fig. 3, Fig. 3 is an exemplary interfacial effect display diagram, as shown in figure 3-1, k1 in figure, k2 are button
Around need the button area according to shown in B and dynamic adjusts the control of position, position can be according to the size of button area
Dynamic adjusts, the centralized displaying region (button area) for the button that B is occupied by all button clients, three from right to left in figure
Button is respectively b1, b2 and b3 button, the right margin of entire button area is using the right margin of frame red in scheming as boundary, if will
B1 button is hidden, then the display effect of button area is as shown in figure 3-2, it can be seen that and b3 button and b2 button move right,
And the control k1 and k2 beside button area also move right.
After hiding b1 button, it can be determined that there are two the buttons of display, and it is originally on the right side that b2 button, which is,
Side, so, b2 button is moved right to the right hand edge of button area, and b3 button is also moved right.At this time due to only
There are two button, so button area has also been smaller, then adjust be looped around originally the control k1 and k2 on the button area left side also to
It moves right.
Further, there is a dot b3-1 on b3 button, the display logic of dot b3-1 must be that dot needs to show always
Show on b3 button, b1 button is visible before adjustment in front, and the position of dot b3-1 is correct, but in b1 button
After being hidden, b3 button moves right, and informs the information that button position changes by way of message occupy b3 at this time
The button client of button, after button client receives this message, by adjusting the position of dot b3-1, so as to realize dot
B3-1 is always positioned at the function above b3 button.
Refering to what is shown in Fig. 4, Fig. 4 is the button management system realized based on interface button application method of the present invention an of example
Unite architecture diagram, including button pond, press control and button client.
(1) press control is mainly responsible for two control functions:
First, it is responsible for the distribution and recycling of the button in control button pond, the real time information of user's operation and button is logical
Know and gives button client.It, will be by specifically, request for utilization of the accept button client to button, and after button client's release button
Button is add backed to again in button pond, while after button Customer Acquisition button, and the user's operation occurred on button is notified
To user, when there is button that user's operation occurs, coherent signal message is sent to notify dependent event to corresponding button client.
Second, it is responsible for control button redrawing at interface, distributes to all button visitors specifically, drawing out on interface
The button at family, and when the button that button client obtains oneself shows or hides, all be in can be shown into state
Button press the layout that client specifies again and be shown in button area, while the size of button area is adjusted, to avoid button area
Domain is Chong Die with the generation of other display areas of client end interface.
Refering to what is shown in Fig. 5, Fig. 5 is the processing logic chart of an exemplary press control, it is specific as follows:
S51, accept button client apply for the request of button;
S52, judges whether button pond has available buttons, if executing s53, otherwise executes s54;
S53 refuses the request of button client;
S54 replies button client and button is distributed to button client, while the button client waited and user are to button
Operation;If user operates button, s55 is executed, if button client operates button, executes s56;
User's operation is notified the button client belonging to operation button by s55;
S56 carries out rearranging drafting to position of all buttons on interface.
(2) for button client, it is only necessary to which on-demand application button industry of going forward side by side is make sure use, and by button after the completion of use
It is released to press control.
Refering to what is shown in Fig. 6, Fig. 6 is the processing logic chart of an exemplary button client, it is specific as follows:
S61, to press control application button;
S62, judges whether application succeeds, if so, executing s64, otherwise executes s63;
S63 terminates this application process;
S64 executes business operation process using the button of application, and waits the notification message of button manager;If no longer
It needs to execute s65 using button, if receiving notification message, executes s66,
S65, release button;
S66 judges whether to need to handle the notification message;If so, executing s67, s64 is otherwise returned;
S67 executes the respective handling in notification message.
Refering to what is shown in Fig. 7, Fig. 7 is the interface button application system structural schematic diagram of one embodiment, comprising:
Creation module 10 establishes the button and client for creating multiple buttons on the interface of client in advance
Between call relation, and establish button pond and store the button;Wherein, the button pond is the container for storing button;
Distribution module 20, for receive button client execute business processing button application, according to the button application from
It select button and is distributed to the button client in the button pond;Wherein, the button client is that client use is pressed
The occasion of button;
Execution module 30 passes the user's operation for obtaining the user's operation executed in client to the button
It transports to the button client and executes corresponding business processing.
In one embodiment, the execution module 30 can be also used for after the button client completing button use,
It discharges the button and is added to it again in the button pond.
As one embodiment, the creation module 10 can be further used for:
According to the button demand at interface, the button of dynamic creation respective numbers on the interface of client;
Hidden state is set by the button;
The button is added in button pond.
As one embodiment, the distribution module 20 can be further used for:
According to the button application from button pond select button;
The ID number of the selected button is bound with corresponding business;
Display state is set by the button.
As one embodiment, the execution module 30 can be further used for:
Obtain the user's operation of button;Wherein, the user's operation be user on the interface of client to corresponding service
The operation of execution;
Notification message is generated according to the user's operation;
The notification message is sent to the button client, according to the user's operation execution in the notification message
The business processing of button client.
In one embodiment, the user's operation includes: to click, mouse-over, and mouse is removed or double-clicked.
In one embodiment, refering to what is shown in Fig. 8, the interface button application system structure that Fig. 8 is another embodiment is shown
It is intended to, interface button application system of the invention can also include:
Drafting module 40 presses the distribution according to client for distributing button to the button client
The processing logic that button executes repaints the button on the interface.
In one embodiment, the drafting module 40 can be further used for:
Display, the hiding processing executed according to button of the client to the distribution, carries out phase to the state of the button
It should adjust;
The button in display state is repainted into the button area on client end interface according to the layout of setting;
The size of the button area is adjusted, control button region does not generate Chong Die with other display areas on interface.
Interface button application system of the invention and interface button application method of the invention correspond, at above-mentioned interface
Technical characteristic and its advantages that the embodiment of button application method illustrates are suitable for the implementation of interface button application system
In example, hereby give notice that.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.