Detailed Description
The following detailed description is directed to embodiments of the present method and system for copying/cutting and pasting data.
Fig. 1 is a schematic flow chart of an embodiment of a method for copying/cutting and pasting data according to the present invention, which includes the steps of:
step S101: acquiring multiple copies of data cached in an additional copying/cutting mode;
the purpose of additional copy/cut is to automatically merge data copied/cut a plurality of times, and the current copy/cut data and the last copy/cut data may be additionally merged. The data copied/cut each time is used as one copy of data, and after the data is copied/cut for multiple times, multiple copies of data exist, and the multiple copies of data are cached simultaneously.
In one embodiment, the data may be text data or picture data. Such as cutting text data, cutting picture data, etc. Before the step S101, the method may further include:
the method comprises the steps of obtaining text data or picture data to be copied/cut, adding the text data or the picture data to the text data or the picture data cached by a clipboard, and caching a plurality of pieces of text data or picture data obtained after adding, wherein the clipboard is used for caching the text data or the picture data copied/cut for many times.
This embodiment specifically introduces an adding manner, that is, all copied/cut data are cached in the clipboard, when a copy/cut instruction is received again, current copied/cut data are determined according to a data area selected by a user, the current data are added to the last cached data, and then are merged and stored, and then the merged and stored data are used as all paste data. In this way, additional copy data and additional cut data can be realized. In the copying or cutting process, the text data and the picture data can exist simultaneously, and certainly, the copying or cutting can also exist simultaneously. For example, when a text data copying instruction is received, the text data to be copied is cached in a clipboard, then when additional copied picture data is received, the picture data to be copied is cached in the clipboard, then when additional cut picture data is received, the cut data is cached in the clipboard, and finally when a paste instruction is received, the combined multiple data is pasted as one data.
Further, an "add copy" button and an "add cut" button may be generated in the display menu by calling a function in the background. The additional function may be triggered by a trigger button.
Furthermore, a function can be called in the background, and a button for pasting the current operation content and a button for pasting all the operation contents are generated in the display menu. Therefore, the data cached in the current operation can be pasted through the first trigger instruction (the instruction generated by triggering the pasting of the current operation content), and the data to be pasted can be pasted to the target position through the second trigger instruction (the instruction generated by triggering the pasting of all the operation content).
Step S102: creating a visual window with an editing function;
the visualization window may be a pop-up window having a function of editing data. For example, the visualization window may have an editing function for text. Such as changing the font, color, size, modification, etc. of the text. Step S101 and step S102 have no sequence, and may be performed simultaneously, or a visualization window having a function of editing data may be created in advance before step S101.
Step S103: displaying all data on the visual window, and editing the data content on the visual window according to the editing operation instruction of a user;
and displaying the data on a visual window, wherein the visual window can be displayed on an interface where the data is copied/cut.
In one embodiment, the data content can be edited by using the whole data as an object, that is, corresponding editing processing can be performed by using one data as a unit, so that the editing efficiency can be greatly improved. That is, step S103 may include:
the visualization window comprises a plurality of text boxes, and each data is displayed on the text box corresponding to the visualization window;
setting an editing button for a text box where each piece of data is located;
acquiring an instruction of a user for triggering the editing button;
and calling a corresponding editing processing program according to the instruction, and editing the text box corresponding to the editing button.
Each part of data is displayed on a text box as a whole, and the number of the text boxes is determined according to the number of the parts of the data, namely, the number of the text boxes is determined according to the number of the parts of the data. When each piece of data is edited, only the text box where the piece of data is located needs to be processed.
For example, the edit button is a delete button;
the step of calling a corresponding editing processing program according to the instruction and editing the text box corresponding to the editing button comprises the following steps: and calling a corresponding deleting program according to the instruction, and deleting the text box corresponding to the deleting button.
In this way, deletion of the entire data can be achieved. Especially for the data which is wrongly copied/cut, the data can be quickly deleted by adopting the method. For example, as shown in fig. 2, it is a schematic diagram of a first embodiment of a visualization window. Wherein the text box may or may not be visible. Fig. 2 is a visual example.
For example, the edit button is an up/down move button;
the step of calling a corresponding editing processing program according to the instruction and editing the text box corresponding to the editing button comprises the following steps: and calling a corresponding moving program according to the instruction, and moving the text box corresponding to the up/down moving button up/down.
In this way, sorting of the entire data may be achieved. When the additionally copied/cut data is more, each data can be sorted differently, so that the editing efficiency is greatly improved. In subsequent pasting, no further editing is required. Particularly, when the target positions are more, quick pasting at different target positions can be realized only by editing in the visual window. For example, as shown in fig. 3, a schematic diagram of a second embodiment of the visualization window may be shown.
As another example, the edit button is an enlarge button;
the step of calling a corresponding editing processing program according to the instruction and editing the text box corresponding to the editing button comprises the following steps: and calling a corresponding amplification program according to the instruction, and amplifying the text box corresponding to the amplification button.
In this way, amplification of the entire data can be achieved. In order to not obstruct the view of the interface that is being viewed originally, the visualization window is often set to be a relatively small window, but in order to clearly see additional content, the zoom-in button can be clicked when viewing is needed. For example, as shown in fig. 3, a schematic diagram of a third embodiment of the visualization window may be shown.
After the visualization window is set to be a relatively small window, data may be displayed on the visualization window in a scroll display manner in order to clearly see the additional content. The scrolling display may be a moving display, such as moving the display data upward, and the display page is not very large, i.e. all data can be displayed by moving. While the display is automatically moved, a progress dragging button can be arranged, and manual viewing is achieved by receiving a user dragging instruction. For example, when the terminal is a mobile phone, since the screen is relatively small, in general, an interface occupies the whole screen, and then a visualization window can be set to be directly displayed at a corner above the interface, for example, at the upper right corner, and data is displayed in a scrolling manner, so that specific content of the data can be viewed, and the visualization window cannot be very large.
Step S104: pasting the edited data to the target position.
By the method for copying/cutting and pasting data, a plurality of copies of the copied/cut data can be obtained at the same time by obtaining the plurality of copies of the data cached in the mode of additional copying/cutting. After the visual window with the editing function is created, all data are displayed on the visual window, the visual display of the additionally copied/cut data can be realized, a user can conveniently check whether the data are erroneously added or are omitted to be added, the data are prevented from being modified after being pasted, and the operation efficiency is improved. And editing the data content on the visual window according to the editing operation instruction of the user, and pasting the edited data to the target position. Therefore, the additional data is processed before pasting, and the copying/cutting and pasting efficiency is greatly improved.
In order to improve convenience of user operation, the creating of the visualization window with the editing function includes:
creating a visual window with an editing function, and setting state control buttons of the visual window, wherein the state control buttons comprise at least one of a window enlargement control button, a window reduction control button, a window closing control button, a window hiding control button and a window locking/unlocking movement button;
the state control button is a trigger button for controlling the state of the visual window according to a user trigger instruction.
The present embodiment may perform corresponding control on the state of the visualization window according to the state control button triggered by the user. And realizing the amplification processing, the reduction processing, the closing processing, the hiding processing and the like of the visual window. For example, whether the visual window can be moved or not can be controlled by a lock/unlock window move button. Other buttons may of course be included to effect control of the status of the visualization window. Such as control of the visibility of the visualization window, control of the color of the visualization window, etc.
The scheme also provides a specific application example for explanation. For example, the scheme is applied to mobile phones with versions above android 3.0. The following steps may be included:
a simple Android program is created.
And writing a class inherited to the system Text View, such as an Add Copy Text View control, so as to realize the function of additional Copy.
A visualization window with editing capabilities is created and associated with the cache.
Calling a system set Text Is selected (true) method in the construction method of Add Copy Text View, and setting the control to be Selectable.
The system set Custom Selection Action Mode Callback (Action Mode. Callback Action Mode Callback) method is called in the construction method of Add Copy Text View. In an Action Mode (Menu) method of Action Mode, callback (), a Menu display item of "additional copy" is added. An "add copy" function implementation method is added to the Action Mode Item Clicked (Menu Item) method of Action Mode.
The Add Copy Text View control is used in the main program to set the Text into the Add Copy Text View control.
And when the 'additional copy' is triggered subsequently, the function of additional copy is realized, and the multiple data acquired after the addition are displayed on a visual window for the user to edit.
According to the above method, the present invention further provides a system for copying/cutting and pasting data, as shown in fig. 5, which is a schematic structural diagram of an embodiment of the system for copying/cutting and pasting data according to the present invention, and includes: adata acquisition module 510, a visualization window creation module 520, adata display module 530, adata editing module 540, and adata pasting module 550.
Adata obtaining module 510, configured to obtain multiple copies of data cached in an additional copy/cut manner;
the purpose of additional copy/cut is to automatically merge data copied/cut a plurality of times, and the current copy/cut data and the last copy/cut data may be additionally merged. The data copied/cut each time is used as one copy of data, and after the data is copied/cut for multiple times, multiple copies of data exist, and the multiple copies of data are cached simultaneously.
In one embodiment, the data may be text data or picture data. Such as cutting text data, cutting picture data, etc. The system further comprises:
and the additional copying/cutting module is used for acquiring text data or picture data to be copied/cut, adding the text data or the picture data to the text data or the picture data cached by the cutting board, and caching a plurality of pieces of text data or picture data obtained after adding, wherein the cutting board is used for caching the text data or the picture data which are copied/cut for many times.
The present embodiment specifically introduces an adding manner, where an additional copy/cut module caches all copied/cut data in a cutting board, determines current copied/cut data according to a data area selected by a user when a copy/cut instruction is received again, adds the current data to data cached last time, merges and stores the current data, and then uses the merged and stored data as all paste data. In this way, additional copy data and additional cut data can be realized. In the copying or cutting process, the text data and the picture data can exist simultaneously, and certainly, the copying or cutting can also exist simultaneously. For example, the additional copy/cut module first caches the text data to be copied in the clipboard when receiving the instruction to copy the text data, then caches the picture data to be copied in the clipboard when receiving the additional copy picture data, then caches the cut data in the clipboard when receiving the additional cut picture data, and finally pastes the merged multiple data as one data when receiving the paste instruction.
Further, the system can comprise a menu control module, and the menu control module can generate an additional copy button and an additional cut button in the display menu through a background calling function. The additional function may be triggered by a trigger button.
Furthermore, the menu control module can also generate a button for pasting the current operation content and a button for pasting all the operation contents in the display menu through a background calling function. Therefore, the data cached in the current operation can be pasted through the first trigger instruction (the instruction generated by triggering the pasting of the current operation content), and the data to be pasted can be pasted to the target position through the second trigger instruction (the instruction generated by triggering the pasting of all the operation content).
A visualization window creating module 520, configured to create a visualization window with an editing function;
the visualization window may be a pop-up window having a function of editing data. For example, the visualization window may have an editing function for textual content. Such as changing the font, color, size, modification, etc. of the text.
Adata display module 530, configured to display each piece of data on the visualization window;
and displaying the data on a visual window, wherein the visual window can be displayed on an interface where the data is copied/cut.
Thedata editing module 540 is configured to edit data content on the visualization window according to an editing operation instruction of a user;
the data content may be edited, such as the font, color, size, etc. described above.
In another embodiment, the editing of the data content may be performed by using the whole data as an object, that is, corresponding editing processing may be performed by using one data as a unit, so that the editing efficiency may be greatly improved. Namely: the visualization window includes a plurality of text boxes,
the data display module is used for displaying each piece of data on the text box corresponding to the visual window;
the data editing module comprises:
the editing button creating module is used for respectively setting editing buttons for the text boxes where each piece of data is located;
the instruction acquisition module is used for acquiring an instruction of triggering the editing button by a user;
and the data editing processing module is used for calling a corresponding editing processing program according to the instruction and editing the text box corresponding to the editing button.
Each part of data is displayed on a text box as a whole, and the number of the text boxes is determined according to the number of the parts of the data, namely, the number of the text boxes is determined according to the number of the parts of the data. When each piece of data is edited, only the text box where the piece of data is located needs to be processed.
For example, the edit button is a delete button;
the data editing processing module is used for calling a corresponding deleting program according to the instruction and deleting the text box corresponding to the deleting button;
in this way, the data editing processing module can delete the whole data. Especially for the data which is wrongly copied/cut, the data can be quickly deleted by adopting the method. For example, as shown in fig. 2, it is a schematic diagram of a first embodiment of a visualization window.
As another example, the edit button is an up/down move button;
the data editing processing module is used for calling a corresponding moving program according to the instruction and moving the text box corresponding to the up/down moving button up/down;
in this way, the data editing and processing module can realize the sorting of the whole data. When the additionally copied/cut data is more, each data can be sorted differently, so that the editing efficiency is greatly improved. In subsequent pasting, no further editing is required. Particularly, when the target positions are more, the quick pasting of different target positions can be realized only by editing in the visual window. For example, as shown in fig. 3, a schematic diagram of a second embodiment of the visualization window may be shown.
As another example, the edit button is an enlarge button;
and the data editing processing module is used for calling a corresponding amplification program according to the instruction and amplifying the text box corresponding to the amplification button.
In this way, the data editing processing module can realize the amplification of the whole data. In order to not obstruct the view of the interface that is being viewed originally, the visualization window is often set to be a relatively small window, but in order to clearly see additional content, the zoom-in button can be clicked when viewing is needed. For example, as shown in fig. 3, a schematic diagram of a third embodiment of the visualization window may be shown.
After the visualization window is set to be a relatively small window, in order to clearly see the additional content, the data display module is further configured to display each piece of data on the visualization window in a scrolling manner. The scrolling display may be a moving display, such as moving the display data upward, and the display page is not very large, i.e. all data can be displayed by moving. While the display is automatically moved, a progress dragging button can be arranged, and manual viewing is achieved by receiving a user dragging instruction. For example, when the terminal is a mobile phone, since the screen is relatively small, in general, an interface occupies the whole screen, and then a visualization window can be set to be directly displayed at a corner above the interface, for example, at the upper right corner, and data is displayed in a scrolling manner, so that specific content of the data can be viewed, and the visualization window cannot be very large.
And adata pasting module 550, configured to paste the edited data to the target location.
With the above system for copying/cutting and pasting data, multiple copies of data cached in the additional copying/cutting manner can be obtained simultaneously by thedata obtaining module 510. The visualization window creating module 520 creates a visualization window with an editing function, and thedata display module 530 displays all data on the visualization window, so that the visualization display of the additionally copied/cut data can be realized, a user can conveniently check whether the data is erroneously added or is omitted to be added, the data is prevented from being modified after being pasted, and the operation efficiency is improved. Thedata editing module 540 edits the data content on the visualization window according to the editing operation instruction of the user, and then thedata pasting module 550 pastes the edited data to the target position. Therefore, the additional data is processed before pasting, and the copying/cutting and pasting efficiency is greatly improved.
To improve convenience of user operation, the visualization window creating module 520 is configured to:
creating a visual window with an editing function, and setting state control buttons of the visual window, wherein the state control buttons comprise at least one of a window enlargement control button, a window reduction control button, a window closing control button, a window hiding control button and a window locking/unlocking movement button;
the state control button is a trigger button for controlling the state of the visual window according to a user trigger instruction.
The present embodiment may perform corresponding control on the state of the visualization window according to the state control button triggered by the user. And realizing the amplification processing, the reduction processing, the closing processing, the hiding processing and the like of the visual window. For example, whether the visual window can be moved or not can be controlled by a lock/unlock window move button. Other buttons may of course be included to effect control of the status of the visualization window. Such as control of the visibility of the visualization window, control of the color of the visualization window, etc.
It will be understood by those skilled in the art that all or part of the processes of the method for implementing the embodiments of the present invention described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. Therefore, according to the embodiment of the present invention, the present invention further provides a storage medium containing a computer-readable program, and when the computer-readable program in the storage medium is executed, the method of copying/cutting and pasting data of the present invention in any one of the above modes can be implemented.
The method of the embodiment of the invention as described above may be installed on the corresponding machine device in the form of software, and when the software runs, the above-described processes of copying/cutting and pasting data are completed by controlling the relevant processing device. Accordingly, the system for copying/cutting and pasting data may be installed on a corresponding terminal device, or may be a corresponding terminal device itself, where the terminal device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal digital assistant), and a vehicle-mounted computer.
Accordingly, based on the above scheme of the present invention, the present invention further provides a terminal device, which may be any one of a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a vehicle-mounted computer, and the like.
Accordingly, in the following, taking one of the terminal devices as an example, a partial structural block diagram of the terminal device is shown in fig. 6. Referring to fig. 6, the terminal device includes:memory 610,input unit 620,display unit 630,processor 640,communication module 650, and the like. Those skilled in the art will appreciate that the structure shown in fig. 6 is only a block diagram of a part of the structure related to the embodiment of the present invention, and does not constitute a limitation to the terminal device applied in the embodiment of the present invention, and a specific terminal device may include more or less components than those shown in the figure, or combine some components, or arrange different components.
The respective constituent elements of the terminal device will be specifically described below with reference to fig. 6.
Thememory 610 may be used to store software programs and modules, and theprocessor 640 may execute various functional applications and data processing related to the terminal device by operating the software programs and modules stored in thememory 610. Thememory 610 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal device, and the like. Further, thememory 610 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Theinput unit 620 may be used to receive input numbers, characters, or other information, and generate key signal inputs related to user settings and function control of the terminal device.
Specifically, taking a terminal device as a mobile phone as an example, theinput unit 620 may include a touch panel and other input devices. The touch panel, also called a touch screen, may collect touch operations of a user (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 640, and can receive and execute commands sent by theprocessor 640. In addition, the touch panel may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Theinput unit 620 may include other input devices in addition to the touch panel. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Thedisplay unit 630 may be used to display information input by the user or information provided to the user, and various menus. TheDisplay unit 630 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The terminal device can communicate with the server through thecommunication module 650, thecommunication module 650 can be implemented in any possible manner, for example, a WiFi module, bluetooth communication, optical fiber communication, etc., and the communication between the terminal device and the server is implemented through thecommunication module 650, so that the terminal device can send related information to the server and receive related information returned by the server.
Theprocessor 640 is a control center of the terminal device, connects various parts of the entire terminal device using various interfaces and lines, and performs various functions and data processing of the terminal device by running or executing software programs and/or modules stored in thememory 610 and calling data stored in thememory 610, thereby performing overall monitoring of the terminal device. Optionally,processor 640 may include one or more processing units.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.