Configuration software interface optimization method, system and equipment based on Swing JLayeradPane and medium
By using Swing JLayeredPane to optimize the interface in the configuration software, design the background layer, control layer and foreground layer, and dynamically adjust its layout, the problem that traditional interface layout methods cannot cope with complex user needs is solved, and interface casing effect and component interaction are achieved Improvement.
Patent Information
- Application Number
- CN202411093419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-10
AI Technical Summary
Traditional interface layout methods cannot effectively respond to complex user needs, resulting in inconvenient and confusion in interface operation, and the inability to smoothly switch between interface layers.
Using the configuration software interface optimization method based on Swing JLayeredPane, by creating JLayeredPane objects, designing the background layer, control layer and foreground layer, and dynamically adjusting them, receiving user operation instructions to adjust the size and position of the layer, realizing the stacking effect and flexible component management.
It improves user experience and software performance, meets complex user needs, realizes flexible layout and stacking effects of interface elements, and enhances display and interactive logic control between components.
Smart Images

Figure CN119105753A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the sub-field of user interface design and software development in the field of computer science and technology, and relates to a configuration software interface optimization method, system, device and medium based on Swing JLayeredPane. Background Art
[0002] In configuration software development, layout management and dynamic adjustment of the user interface is one of the key requirements. The traditional interface layout method cannot effectively respond to complex user needs and cannot smoothly switch between various layers in the interface, resulting in inconvenient operation and confusing interface. Therefore, a new interface optimization technology is needed to improve these problems. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a configuration software interface optimization method, system, device and medium based on SwingJLayeredPane, which can meet complex user needs.
[0004] In order to achieve the above object, the present invention adopts the following technical scheme:
[0005] In one aspect, the present invention provides a configuration software interface optimization method based on Swing JLayeredPane, comprising:
[0006] Create a JLayeredPane object;
[0007] Design background layer;
[0008] Design the control layer;
[0009] Design the foreground layer;
[0010] Dynamically adjust the layout of the background layer, control layer and foreground layer.
[0011] The configuration software interface optimization method based on Swing JLayeredPane described in the present invention is further improved in that:
[0012] Furthermore, it also includes:
[0013] Receive user operation instructions;
[0014] The sizes and positions of the background layer, the control layer and the foreground layer are adjusted according to the user's operation instructions.
[0015] Furthermore, the process of creating a JLayeredPane object is as follows:
[0016] Initializes a JLayeredPane component, which is used for hierarchical management of interface elements.
[0017] Furthermore, the process of designing the background layer is as follows:
[0018] Gets a background image, adds the background image to a JLayeredPane, and sets the layer of the background image.
[0019] Furthermore, the process of designing the control layer is:
[0020] Select the required controls, set the position, size, and level for each control, and then add each control to the JLayeredPane.
[0021] Furthermore, the process of designing the foreground layer is:
[0022] Get a number of foreground elements, including labels and text boxes, set the position, size and level for each foreground element, and then add each foreground element to the JLayeredPane.
[0023] In a second aspect of the present invention, the present invention provides a configuration software interface optimization system based on Swing JLayeredPane, comprising:
[0024] Create a module for creating JLayeredPane objects;
[0025] The first design module is used to design the background layer;
[0026] The second design module is used to design the control layer;
[0027] The third design module is used to design the foreground layer;
[0028] The dynamic layout module is used to dynamically adjust the layout of the background layer, control layer and foreground layer.
[0029] The configuration software interface optimization system based on Swing JLayeredPane described in the present invention is further improved in that:
[0030] Furthermore, it also includes:
[0031] A receiving module, used for receiving operation instructions from users;
[0032] The adjustment module is used to adjust the size and position of the background layer, the control layer and the foreground layer according to the user's operation instruction.
[0033] In a third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the Swing JLayeredPane-based configuration software interface optimization method when executing the computer program.
[0034] In a fourth aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the configuration software interface optimization method based on Swing JLayeredPane are implemented.
[0035] The present invention has the following beneficial effects:
[0036] The Swing JLayeredPane-based configuration software interface optimization method, system, device and medium described in the present invention, when in specific operation, designs the background layer, control layer and foreground layer based on the JLayeredPane component, can flexibly layout the interface elements, achieve the cascading effect, and better control the display and interaction logic between components, thereby improving the user experience and software performance and meeting complex user needs.
[0037] Furthermore, the present invention sets the position, size and level for each control, and then adds the control to the JLayeredPane, so the design flexibility is relatively strong.
[0038] Furthermore, the position, size and level are set for each foreground element, and then each foreground element is added to the JLayeredPane, which makes the design more flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0040] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0043] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0044] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.
[0045] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0046] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, not all embodiments, and is not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concepts disclosed in the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0048] The accompanying drawings show schematic diagrams of structures according to embodiments disclosed in the present invention. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0049] As is known to all, Swing is a development toolkit for developing Java application user interfaces. Based on the Abstract Window Toolkit (AWT), it enables cross-platform applications to use any pluggable look and feel. Swing developers can use Swing's rich, flexible features and modular components to create elegant user interfaces with very little code. All packages in the toolkit are named after Swing, such as javax.swing.javax.swing.event.
[0050] Configuration software, also known as configuration monitoring system software, is a software specifically used for data acquisition and process control. It is a software platform and development environment for the first level of the monitoring layer of the automatic control system. Through flexible configuration methods, it provides users with a general-purpose hierarchical software tool for quickly building the monitoring function of industrial automatic control systems. Configuration software is widely used in many fields such as machinery, automobiles, petroleum, chemicals, papermaking, water treatment, and process control. Its main features include powerful functions, simple and easy to learn, support for various industrial control equipment and common communication protocols, and usually also provide distributed data management and network functions. Real-time database, real-time control, SCADA (data acquisition and monitoring control system), communication and networking, open data interface, and extensive support for I / O devices are the main functions of configuration software.
[0051] Embodiment 1
[0052] refer to Figure 1 The configuration software interface optimization method based on Swing JLayeredPane of the present invention comprises the following steps:
[0053] 1) Create a JLayeredPane object;
[0054] The process of step 1) is: initializing the JLayeredPane component, and the JLayeredPane component is used for hierarchical management of interface elements.
[0055] 2) Design the background layer;
[0056] The process of step 2) is: select or design a background image, add the background image to the JLayeredPane, and set a suitable layer.
[0057] 3) Design the control layer;
[0058] The process of step 3) is: select the required controls, set the position, size and level for each control, and then add the controls to the JLayeredPane.
[0059] For example, the controls are buttons, switches, etc. The present invention sets the position, size and level of each button and switch, and adds each button and switch to the JLayeredPane.
[0060] 4) Design the foreground layer;
[0061] The process of step 4) is: select or design foreground elements, set the position, size and level for each foreground element, and then add each foreground element to the JLayeredPane.
[0062] For example, the foreground elements include labels and text boxes. The present invention designs the positions, sizes and levels of the labels and text boxes, and then adds the labels and text boxes to the JLayeredPane.
[0063] 5) Dynamic layout adjustment;
[0064] The process of step 5) is: according to user operations or changes in window size, the positions and sizes of the background layer, control layer, foreground layer and internal components of each layer are adjusted in real time to maintain the hierarchical relationship of the interface elements and ensure that the interface is clear and orderly.
[0065] 6) Interaction optimization;
[0066] According to the user's operation on the component, the size of a layer, graphics and drawing can be adjusted.
[0067] It should be noted that the present invention utilizes the JLayeredPane component in the Java Swing library to improve the user interface design efficiency and responsiveness of the configuration software in the industrial automation system, and realizes the hierarchical management of complex graphical user interface elements. Through this technology, developers can flexibly layout interface elements, realize the cascading effect, and better control the display and interaction logic between components, thereby improving user experience and software performance. After adopting the present invention, the interface of the configuration software becomes clearer and more orderly, and the user can dynamically adjust the interface layout according to their needs, and the control can adapt to different screens and resolutions, which improves the aesthetics of the interface and the convenience of operation. At the same time, the optimized interactive response mechanism also improves the user satisfaction.
[0068] Embodiment 2
[0069] The configuration software interface optimization system based on Swing JLayeredPane of the present invention comprises:
[0070] Create a module for creating JLayeredPane objects;
[0071] The first design module is used to design the background layer;
[0072] The second design module is used to design the control layer;
[0073] The third design module is used to design the foreground layer;
[0074] Dynamic layout module, used to dynamically adjust the layout of the background layer, control layer and foreground layer;
[0075] A receiving module, used for receiving operation instructions from users;
[0076] The adjustment module is used to adjust the size and position of the background layer, the control layer and the foreground layer according to the user's operation instruction.
[0077] The configuration software interface optimization method based on Swing JLayeredPane is characterized in that the process of creating the JLayeredPane object is:
[0078] Initializes a JLayeredPane component, which is used for hierarchical management of interface elements.
[0079] As an implementation mode of the present invention, the process of designing the background layer is as follows:
[0080] Gets a background image, adds the background image to a JLayeredPane, and sets the layer of the background image.
[0081] As an implementation mode of the present invention, the process of designing the control layer is:
[0082] Select the required controls, set the position, size, and level for each control, and then add each control to the JLayeredPane.
[0083] As an implementation mode of the present invention, the process of designing the foreground layer is:
[0084] Get a number of foreground elements, including labels and text boxes, set the position, size and level for each foreground element, and then add each foreground element to the JLayeredPane.
[0085] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0086] Embodiment 3
[0087] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the configuration software interface optimization method based on Swing JLayeredPane are implemented, for example, including: creating a JLayeredPane object; designing a background layer; designing a control layer; designing a foreground layer; dynamically adjusting the layout of the background layer, the control layer and the foreground layer; receiving a user's operation instruction; adjusting the size and position of the background layer, the control layer and the foreground layer according to the user's operation instruction; the process of creating the JLayeredPane object is: initializing JLayeredPane component, the JLayeredPane component is used for hierarchical management of interface elements; the process of designing the background layer is: obtaining a background image, adding the background image to the JLayeredPane, and setting the level of the background image; the process of designing the control layer is: selecting the required controls, setting the position, size and level for each control, and then adding each control to the JLayeredPane; the process of designing the foreground layer is: obtaining a number of foreground elements, the foreground elements include labels and text boxes, setting the position, size and level for each foreground element, and then adding each foreground element to the JLayeredPane. Wherein, the memory may include a memory, such as a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk memory, etc.; the processor, the network interface, and the memory are interconnected through an internal bus, and the internal bus can be an industrial standard architecture bus, a peripheral component interconnection standard bus, an extended industrial standard architecture bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory is used to store programs, and specifically, the program can include program code, and the program code includes computer operation instructions. The memory may include memory and nonvolatile memory and provides instructions and data to the processor.
[0088] Embodiment 4
[0089] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the Swing-based The steps of the configuration software interface optimization method of JLayeredPane, for example, include: creating a JLayeredPane object; designing a background layer; designing a control layer; designing a foreground layer; dynamically adjusting the layout of the background layer, the control layer and the foreground layer; receiving a user's operation instruction; adjusting the size and position of the background layer, the control layer and the foreground layer according to the user's operation instruction; the process of creating the JLayeredPane object is: initializing the JLayeredPane component, and the JLayeredPane component is used for hierarchical management of interface elements; the process of designing the background layer is: obtaining a background image, adding the background image to the JLayeredPane, and setting the level of the background image; the process of designing the control layer is: selecting each required control, setting the position, size and level for each control, and then adding each control to the JLayeredPane; the process of designing the foreground layer is: obtaining a number of foreground elements, the foreground elements include labels and text boxes, setting the position, size and level for each foreground element, and then adding each foreground element to the JLayeredPane. Specifically, the computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0090] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0091] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0092] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A configuration software interface optimization method based on Swing JLayeredPane, characterized in that: include: Create a JLayeredPane object; Design background layer; Design the control layer; Design the foreground layer; Dynamically adjust the layout of the background layer, control layer and foreground layer.
2. The configuration software interface optimization method based on Swing JLayeredPane according to claim 1, characterized in that: Also includes: Receive user operation instructions; The sizes and positions of the background layer, the control layer and the foreground layer are adjusted according to the user's operation instructions.
3. The configuration software interface optimization method based on Swing JLayeredPane according to claim 1, characterized in that: The process of creating a JLayeredPane object is: Initializes a JLayeredPane component, which is used for hierarchical management of interface elements.
4. The configuration software interface optimization method based on Swing JLayeredPane according to claim 1, characterized in that: The process of designing the background layer is as follows: Gets a background image, adds the background image to a JLayeredPane, and sets the layer of the background image.
5. The configuration software interface optimization method based on Swing JLayeredPane according to claim 1, characterized in that: The process of designing the control layer is as follows: Select the required controls, set the position, size, and level for each control, and then add each control to the JLayeredPane.
6. The configuration software interface optimization method based on Swing JLayeredPane according to claim 1, characterized in that: The process of designing the foreground layer is as follows: Get a number of foreground elements, including labels and text boxes, set the position, size and level for each foreground element, and then add each foreground element to the JLayeredPane.
7. A configuration software interface optimization system based on Swing JLayeredPane, characterized in that: include: Create a module for creating JLayeredPane objects; The first design module is used to design the background layer; The second design module is used to design the control layer; The third design module is used to design the foreground layer; The dynamic layout module is used to dynamically adjust the layout of the background layer, control layer and foreground layer.
8. The configuration software interface optimization system based on Swing JLayeredPane according to claim 7, characterized in that: Also includes: A receiving module, used for receiving operation instructions from users; The adjustment module is used to adjust the size and position of the background layer, the control layer and the foreground layer according to the user's operation instruction.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the configuration software interface optimization method based on Swing JLayeredPane as described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the following claims 1 to 6 Any step of the Swing JLayeredPane-based configuration software interface optimization method.
