CN108182067A - SWING optimizes and the program of beautification - Google Patents
SWING optimizes and the program of beautification Download PDFInfo
- Publication number
- CN108182067A CN108182067A CN201711453874.2A CN201711453874A CN108182067A CN 108182067 A CN108182067 A CN 108182067A CN 201711453874 A CN201711453874 A CN 201711453874A CN 108182067 A CN108182067 A CN 108182067A
- Authority
- CN
- China
- Prior art keywords
- swing
- component
- realized
- pictures
- storing
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Abstract
The program for optimizing the embodiment of the invention discloses a kind of SWING and beautifying, including:Classify to the component of each type of Swing UI;According to the UI demands and feature of each type component, UI pictures are designed, and be stored in the imgs packets of corresponding types component;Start Swing interface programs, and the initialization beautification software in main program, the look & feel that specified Swing UI are used;Selection UI pictures in from the imgs packets of corresponding type component, and be loaded on the Swing UI interfaces of corresponding types component from pretty program interface by UI pictures.The present invention is in the application program at optimization swing interfaces without writing a large amount of code again, it is only necessary to call corresponding component interface that can realize the interface beautification of a large amount of different-effects after newly-built component object, the method for the present invention is simple and practical, and service efficiency is high.
Description
Technical field
The present invention relates to Interface Design Technology field, the program of especially a kind of SWING optimizations and beautification.
Background technology
Swing is a development kit for being used to develop java application user interface, it is with Abstract Window Toolkit
Cross-platform program is allow to use any pluggable appearance based on packet (AWT, Abstract Window Toolkit)
Style.Swing kits provide various for creating the tool of user interface and almost dazzling option, these choosings
Item is used to change interface in program life span, and the operation of these functions is extremely complex, if slightly not note that may result in user
Interface is very chaotic, unavailable so as to cause program;The Swing interface optimizations of the another aspect prior art are typically all using only
Vertical programming, it is more complicated to write code, and these codes editor, operation, debugging, with can all occur in the process
Many loopholes or the incompatible phenomenon of generation.
Therefore, the prior art needs to improve.
Invention content
A technical problem to be solved of the embodiment of the present invention is:The program of a kind of SWING optimizations and beautification, packet are provided
It includes:
Classify to the component of each type of Swing UI (User Interface user interfaces);
According to the UI demands and feature of each type component, UI pictures are designed, and be stored in the imgs of corresponding types component
In packet;
Start Swing interface programs, and the initialization beautification software in main program, the interface wind that specified Swing UI are used
Lattice;
Selection UI pictures in from the imgs packets of corresponding type component, and it is loaded into correspondence from pretty program interface by UI pictures
On the Swing UI interfaces of type component.
In another embodiment based on the above-mentioned SWING optimizations of the present invention and the program of beautification, the lattice of the UI pictures
Formula is .png format pictures, and maximum is no more than 5000bytes.
In another embodiment based on the above-mentioned SWING optimizations of the present invention and the program of beautification, the imgs packets include
Factory class, after the completion of the design of UI pictures, the UI pictures are stored according to different-style and color classification in factory class.
It is described from respective type in another embodiment based on the above-mentioned SWING optimizations of the present invention and the program of beautification
UI pictures are selected in the imgs packets of component, and UI pictures are loaded into the Swing UI of corresponding types component from pretty program interface
Include on interface:
Factory class is created in imgs packets, the factory class stores current type component with different-style and color classification
UI pictures;
For each factory class and for setting UI picture output interfaces between type component;
When a certain type component selects the UI pictures that it corresponds to imgs packets, imgs packets pass through factory class and the type component
UI pictures output interface UI pictures are exported according to resource path to the Swing UI interfaces of the type component.
It is described to Swing UI in another embodiment based on the above-mentioned SWING optimizations of the present invention and the program of beautification
The component of each type of (User Interface user interfaces) carries out classification and includes following type component:
Ch1_titlepan stores the relevant UI of self-defined window and realizes;
Ch3_button, the L&F (look and feel, cross-platform appearance) for storing JButton, JToggleButton are real
It is existing;
Ch4_scroll, the L&F for storing JScrollPane and its attachment component are realized;
Ch5_table, the L&F for storing JTable and its attachment component are realized;
Ch6_textcoms, the L&F for storing text component are realized;
Ch7_popu,.It stores PopupFactory pop-up windows vision to realize, be used independently of emsui L&F;
Ch8_toolbar, the L&F for storing JToolBar and its attachment component are realized;
Ch9_menu, the L&F for storing the component of all menus are realized;
Ch10_internalframe, the L&F for storing DesktopPane and internal forms are realized;
Ch12_progress, the L&F for storing progress bar are realized;
Ch13_radio $ cb_btn, the L&F of storage JRadoiButton, JCheckBox are realized;
Ch14_combox, the L&F for storing JComboBox are realized;
Ch15_slider, the L&F for storing JSlider are realized;
Ch16_tree, the L&F for storing JTree are realized;
Ch17_split, the L&F for storing JSplitePane are realized;
Ch18_spinner, the L&F for storing JSpinner are realized;
Ch19_list stores JList and its gives tacit consent to the L&F realizations of renderer;
Ch20_filechooser, the L&F for storing JFileChooser are realized;
Utils, utility packet;
Widget includes multiple Swing Reusable Modules and application method;
Border is realized comprising a variety of self-defined border.
Compared with prior art, the present invention has the following advantages:
The present invention is in the application program at optimization swing interfaces without writing a large amount of code again, it is only necessary in newly-built group
Call corresponding component interface that can realize the interface beautification of a large amount of different-effects after part object, the method for the present invention is simply real
With service efficiency is high.
Below by drawings and examples, technical scheme of the present invention is described in further detail.
Description of the drawings
The attached drawing of a part for constitution instruction describes the embodiment of the present invention, and is used to explain together with description
The principle of the present invention.
With reference to attached drawing, according to following detailed description, the present invention can be more clearly understood, wherein:
Fig. 1 is the flow chart of one embodiment of the program of SWING optimizations and the beautification of the present invention.
Fig. 2 is the flow chart of another embodiment of the program of SWING optimizations and the beautification of the present invention.
Specific embodiment
Carry out the various exemplary embodiments of detailed description of the present invention now with reference to attached drawing.It should be noted that:Unless in addition have
Body illustrates that the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
The range of invention.
Simultaneously, it should be appreciated that for ease of description, the size of the various pieces shown in attached drawing is not according to reality
Proportionate relationship draw.
It is illustrative to the description only actually of at least one exemplary embodiment below, is never used as to the present invention
And its application or any restrictions that use.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as part of specification.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need to that it is further discussed.
Fig. 1 is the flow chart of one embodiment of the program of SWING optimizations and the beautification of the present invention, as shown in Figure 1, the reality
The program for applying SWING optimizations and the beautification of example includes:
10, classify to the component of each type of Swing UI;
It is different with the picture demand of user interface according to the interface function difference of Swing, it can be by the component of Swing UI
It is divided into following 21 kinds, as shown in table 1:
Table 1
20, according to the UI demands and feature of each type component, UI pictures are designed, and be stored in corresponding types component
In imgs packets;
30, start Swing interface programs, and the initialization beautification software in main program, the boundary that specified Swing UI are used
Face style;
40, from the interior selection UI pictures of the imgs packets of corresponding type component, and it is loaded into from pretty program interface by UI pictures
On the Swing UI interfaces of corresponding types component.
It is .png format pictures in the form of the UI pictures of imgs packet memory storages, maximum is no more than 5000bytes.
Imgs packets storage UI pictures mode be:Include factory class in imgs packets, after the completion of the design of UI pictures, the UI
Picture is stored according to different-style and color classification in factory class, and factory class encapsulates the type of different-style and color demand
Component obtains the interface of UI pictures, these interfaces of different type component provide acquisition factory class by returning to the resource path of picture
Interior UI pictures.
Fig. 2 is the flow chart of another embodiment of the program of SWING optimizations and the beautification of the present invention, as shown in Fig. 2, institute
The selection UI pictures out of corresponding type component imgs packets are stated, and corresponding types group is loaded into from pretty program interface by UI pictures
Include on the Swing UI interfaces of part:
101, factory class is created in imgs packets, the factory class is with different-style and color classification storage current type group
The UI pictures of part;
102, for each factory class and for setting UI picture output interfaces between type component;
103, when a certain type component selects the UI pictures that it corresponds to imgs packets, imgs packets pass through factory class and the type
The UI pictures output interface of component exports UI pictures to the Swing UI interfaces of the type component according to resource path.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with its
The difference of its embodiment, the same or similar part cross-reference between each embodiment.For system embodiment
For, since it is substantially corresponding with embodiment of the method, so description is fairly simple, referring to the portion of embodiment of the method in place of correlation
It defends oneself bright.
Description of the invention provides for the sake of example and description, and is not exhaustively or will be of the invention
It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches
It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those of ordinary skill in the art is enable to manage
The solution present invention is so as to design the various embodiments with various modifications suitable for special-purpose.
Claims (5)
1. a kind of SWING optimizations and the program of beautification, which is characterized in that including:
Classify to the component of each type of Swing UI (User Interface user interfaces);
According to the UI demands and feature of each type component, UI pictures are designed, and be stored in the imgs packets of corresponding types component;
Start Swing interface programs, and the initialization beautification software in main program, the look & feel that specified Swing UI are used;
Selection UI pictures in from the imgs packets of corresponding type component, and it is loaded into corresponding types from pretty program interface by UI pictures
On the Swing UI interfaces of component.
2. SWING according to claim 1 optimization and the program of beautification, which is characterized in that the form of the UI pictures is
.png format picture, maximum are no more than 5000bytes.
3. SWING optimizations according to claim 1 and the program of beautification, which is characterized in that the imgs packets include factory
Class, after the completion of the design of UI pictures, the UI pictures are stored according to different-style and color classification in factory class.
4. SWING optimizations according to claim 1 and the program of beautification, which is characterized in that described from corresponding type component
Imgs packets in selection UI pictures, and UI pictures are loaded into from pretty program interface the Swing UI interfaces of corresponding types component
On include:
Factory class is created in imgs packets, the factory class is schemed with the UI of different-style and color classification storage current type component
Piece;
For each factory class and for setting UI picture output interfaces between type component;
When a certain type component selects the UI pictures that it corresponds to imgs packets, imgs packets pass through factory class and the UI of the type component
Picture output interface exports UI pictures to the Swing UI interfaces of the type component according to resource path.
5. SWING optimizations according to claim 1 and the program of beautification, which is characterized in that described to Swing UI (User
Interface user interfaces) each type component carry out classification include following type component:
Ch1_titlepan stores the relevant UI of self-defined window and realizes;
Ch3_button, the L&F (look and feel, cross-platform appearance) of storage JButton, JToggleButton are realized;
Ch4_scroll, the L&F for storing JScrollPane and its attachment component are realized;
Ch5_table, the L&F for storing JTable and its attachment component are realized;
Ch6_textcoms, the L&F for storing text component are realized;
Ch7_popu,.It stores PopupFactory pop-up windows vision to realize, be used independently of emsui L&F;
Ch8_toolbar, the L&F for storing JToolBar and its attachment component are realized;
Ch9_menu, the L&F for storing the component of all menus are realized;
Ch10_internalframe, the L&F for storing DesktopPane and internal forms are realized;
Ch12_progress, the L&F for storing progress bar are realized;
Ch13_radio $ cb_btn, the L&F of storage JRadoiButton, JCheckBox are realized;
Ch14_combox, the L&F for storing JComboBox are realized;
Ch15_slider, the L&F for storing JSlider are realized;
Ch16_tree, the L&F for storing JTree are realized;
Ch17_split, the L&F for storing JSplitePane are realized;
Ch18_spinner, the L&F for storing JSpinner are realized;
Ch19_list stores JList and its gives tacit consent to the L&F realizations of renderer;
Ch20_filechooser, the L&F for storing JFileChooser are realized;
Utils, utility packet;
Widget includes multiple Swing Reusable Modules and application method;
Border is realized comprising a variety of self-defined border.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711453874.2A CN108182067B (en) | 2017-12-28 | 2017-12-28 | Method for SWING optimization and beautification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711453874.2A CN108182067B (en) | 2017-12-28 | 2017-12-28 | Method for SWING optimization and beautification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108182067A true CN108182067A (en) | 2018-06-19 |
CN108182067B CN108182067B (en) | 2021-08-13 |
Family
ID=62548018
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711453874.2A Active CN108182067B (en) | 2017-12-28 | 2017-12-28 | Method for SWING optimization and beautification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108182067B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020180790A1 (en) * | 2001-05-31 | 2002-12-05 | International Business Machines Corporation | System and method for encapsulating software components in an application program interface using a proxy object |
KR20050057822A (en) * | 2003-12-11 | 2005-06-16 | 에스케이씨앤씨 주식회사 | Method for realization gui using xml |
CN103176797A (en) * | 2013-02-21 | 2013-06-26 | 用友软件股份有限公司 | Interface layout device and interface layout method |
CN105786506A (en) * | 2016-02-26 | 2016-07-20 | 珠海金山网络游戏科技有限公司 | User interface automatic-generation system and method |
CN106843862A (en) * | 2017-01-06 | 2017-06-13 | 福建升腾资讯有限公司 | A kind of method that Swing interfaces automatically form |
-
2017
- 2017-12-28 CN CN201711453874.2A patent/CN108182067B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020180790A1 (en) * | 2001-05-31 | 2002-12-05 | International Business Machines Corporation | System and method for encapsulating software components in an application program interface using a proxy object |
KR20050057822A (en) * | 2003-12-11 | 2005-06-16 | 에스케이씨앤씨 주식회사 | Method for realization gui using xml |
CN103176797A (en) * | 2013-02-21 | 2013-06-26 | 用友软件股份有限公司 | Interface layout device and interface layout method |
CN105786506A (en) * | 2016-02-26 | 2016-07-20 | 珠海金山网络游戏科技有限公司 | User interface automatic-generation system and method |
CN106843862A (en) * | 2017-01-06 | 2017-06-13 | 福建升腾资讯有限公司 | A kind of method that Swing interfaces automatically form |
Non-Patent Citations (3)
Title |
---|
CHUQUAN.OU: "Substance风格实例大全javaswing皮肤风格大全(原)", 《HTTPS://WWW.CNBLOGS.COM/LANGTIANYA/P/3770292.HTML》 * |
HANGGE: "Swift - 生成各种控件的工厂类(包含标签,按钮,输入框等)", 《HTTPS://WWW.HANGGE.COM/BLOG/CACHE/DETAIL_655.HTML》 * |
MCH0DM1N: "substance.jar美化Java界面", 《HTTPS://JINGYAN.BAIDU.COM/ARTICLE/4853E1E57E18711909F72613.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN108182067B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2931512C (en) | Method and apparatus for automatic device program generation | |
CN106600238B (en) | Method and device for realizing network service opening based on Activiti process engine | |
US9619122B2 (en) | Method and apparatus for automatic device program generation | |
CN106021102B (en) | The generation method and device of automatic test file | |
Li et al. | Programming IoT devices by demonstration using mobile apps | |
US9686501B2 (en) | Photographing processing method and system based on mobile terminal | |
Smith et al. | Android recipes: a problem-solution approach | |
CN108614689B (en) | Scene service generation method and device and terminal equipment | |
CN109725901A (en) | Development approach, device, equipment and the computer storage medium of front-end code | |
CN101477461A (en) | Dynamic generation apparatus and method for application program interface | |
CN109725541A (en) | Generation method, device, electronic equipment and the storage medium of automation | |
CN102043618B (en) | Method and device for controlling display style of window object | |
CN108012174A (en) | Intelligent terminal shortcut customizing method, intelligent terminal and readable storage medium | |
CN106569783A (en) | Task script executing method and apparatus | |
CN103529988A (en) | Mobile terminal touch screen multi-firmware setting method and system | |
CN111007733B (en) | Method and device for integrating smart home terminal APP with smart device | |
CN103513977A (en) | Display method and device for group member list | |
CN108182067A (en) | SWING optimizes and the program of beautification | |
CN103237115B (en) | Terminal download control method and mobile terminal implementing same | |
CN114978925A (en) | Object model creating method and system | |
CN205318371U (en) | Hardware test equipment towards ampere tall and erect system | |
CN103561289A (en) | Interface configuration method and device | |
WO2016123847A1 (en) | Application control method and device | |
CN102999371A (en) | Lua script-based human-computer interface development method and system | |
CN106406666A (en) | A processing method and device for application program icons |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20180619 Assignee: Xinhe Technology (Guangzhou) Co.,Ltd. Assignor: GUANGZHOU V-SOLUTION TELECOMMUNICATION TECHNOLOGY CO.,LTD. Contract record no.: X2022990000628 Denomination of invention: SWING optimization and beautification methods Granted publication date: 20210813 License type: Common License Record date: 20220914 |