Java visual interface design with eclipse and VE

Source: Internet
Author: User

Java visual interface design with eclipse and VE


Author: chinamao mailbox: chinamao@gmail.com reprint please indicate the source of related articles
 

Install ve:

1. There are two methods. One is to use the update method in eclipse. For example, the article. Another method is to extract the downloaded ve to the eclipse installation directory.


2. Install the ve Language Pack. You can download the language pack from the eclipse ve website, decompress it to the eclipse installation directory, and restart it. If the language hasn't changed, please read the relevant article.

3. During ve installation, you must install the GEF and EMF versions corresponding to eclipse at the same time.
The latest version of VE is 1.0, which supports SWT and swing, correct conversion between Visual Programming and code, and eclipse3.0.1. Therefore, when installing ve, we should also install version 3.0.1 of GEF and EMF.

Installation confirmation and VE Configuration:
Window-> preferences-> select the visual editor under Java to see the following ve configuration page.
Ve configuration has three aspects: 1. appearance; 2. Code Generation; 3. Pattern style.
1) appearance: the page for configuring ve startup. For example, whether to open the attribute view and JavaBean view. And swing appearance settings, such as metal, CDE, and Windows styles .)
Figure 1: ve settings

2) code generation: You can set whether to generate comments for the new expression and whether to generate try and catch blocks. And the synchronization time delay between the ve visual settings and the JavaBean code.
Figure 2: ve setting code generation

3) pattern: Figure 3:

We do not need to modify these configurations for the moment.

Start our WYSIWYG journey

1. Create a New Java project named vetest.
Figure 4:

2. Create a Java class and select the visible class.
Figure 5:

3. Configure the Java visual class
Enter myjpanel in the name,
Select the swing panel in the style.
Select the main method. Click eclipse to generate the ve view.
Figure 6:

4. view features of VE:
1) ve components, including swing components, swing containers, swing menus, and AWT controls. Below is the alternate replacement of the design and source code. You can use the design drawing to make a sketch of your design, and then perform a detailed design in the source code.
2) In the JavaBean view, the actions of each component and component you design are displayed here.
3) attributes: similar to other visual editors, the attributes of the selected component are set in detail.
4) alignment button: in VE, you only need to drag and drop the component to the approximate position of the Panel during design, then, you can use this button to set the precise position and size of the component.
5) Synchronization button: If you write and modify a large amount of code on the code end, you can select pause synchronization as the synchronization button, you will be able to synchronize the code to the view after it is compiled, or the eclipse workload will be greatly increased each time you want to synchronize.
Figure 7:

5. Drag and Drop components to draw a sketch. (To be continued)

Related Articles

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.