MyEclipse swt/swing designer (bottom)

Source: Internet
Author: User
Tags delete key

In the MyEclipse swt/swing Designer (top) article, the small section describes what a swt/swing designer is, how to create a UI element, and how to design a view. The next small series to continue to introduce other sections of the content, I hope to help everyone.

4. Source View

The source view is a tool for you to manually write code and view the generated code. The source view is the standard Java editor, and it also provides the following features:

    • Syntax highlighting
    • Content/Code Assistance
    • Code formatting
    • Import Auxiliary
    • Quick fix
    • Integrated debugging capabilities
Source view

The position of the editor layout parameter control relative to the source view in the Design view. By default, they have separate labels, annotated source code, and design (you can select the home page). Additional options are available to show how the source view and Design view are arranged up or down.

Side-by-side View Stacked View

You can access the editor layout parameters by selecting window>preferences and then selecting Windowbuilder.

Setting Editor Layout parameters5. Structure View

A structure view is made up of a component tree and an attribute view. The component tree displays a hierarchical relationship between all the components in Design view, and the Properties view displays properties and events for the selected control, and submits text fields, lists, and other controls, and you can edit properties, labels, and events.

The location of the structure view can be configured by dragging and dropping or right-clicking the structure view header and choosing Dock on from the menu.

Configuring docking Locations

You can dock the Design view on the top, bottom, left, and right of the structure view.

Docking location

The structure view can also be used as a standalone diagram. Select Window>show view>other, expand Windowbuilder, and then select structure, or right-click the structure view and select Unzip view. The structure view that closes the standby returns the default location and is built into the editor.

Detatching structure View5.1 Component Tree

The component tree displays a hierarchical relationship between all the components in Design view.

Component Tree

Each component in the tree displays its icon (with a potential modifier), variable name, and text label. A component can be represented as a local variable and a field, and the definition of a variable name must be unique within the scope of the component.

The icon modifier is used to indicate whether a component defines an event or exposes the public component of a custom container.

Icon Modifiers

    • exposed: The subassembly is exposed to a custom container.
    • Event: Defines a component that has one or more event handlers.

Use the Expand all icon to expand the tree component and use the collapse all icon to collapse it.

Right-click an entry in the book to access the same available context menu in Design view. You can use the Delete key by dragging and dropping in the tree component to organize.

You can select multiple components in the tree and add a continuous option by holding down the CTRL key to add a single option or SHIFT key.

5.2 Properties View

The Properties view displays properties and events for the selected control, and submits text fields, lists, and other controls, and you can edit properties, labels, and events. Select a control in the component tree or Design view to display its properties in the Properties view.

Properties view

When multiple controls are selected, the properties they share are listed in the Properties view. If the selected control does not have a value for the same property, the property field in the Properties view is empty.

By default, this property view displays normal properties. Parameter properties are shown in bold, and professional properties are displayed in italics (click the Show advanced properties icon to display them). The gray background represents the default Value property set to it, whereas a white background indicates that a property has been set to a non-default value. Click the Restore default icon, and the property setting reverts to its default value.

You can select an attribute by clicking the property title or value. When a property is selected, the editor is displayed instead of its value, so you can change the value of the property. In most property editors, enter the value you want to use, and ESC returns the previous value. If you select a property, you can use navigation performance between the arrow keys.

The properties view supports simple properties, such as strings and integers, and complex properties include some other properties, such as layout and layout data. A complex property title displays a sign before it can expand/close a complex attribute in different ways:

    • Double-click the property title or value
    • Click the plus sign
    • Select Properties, then press the plus sign key to expand, minus key to close

Some properties, such as strings, colors, fonts, and images, can be accessed by clicking the more buttons to access the provided custom property editor.

The State of the property (expanded or collapsed) is saved in the selected control. If you select the Style property in one control and then select another control, the style property is still expanded. This allows you to quickly change the style property value without having to expand it one time. Once you decide not to change the style value, you can collapse the style property while other space properties are collapsed.

The Properties view supports the selected attribute, that is, the value of the property should be selected from some lists. For example, when you have a property button for the "type" property of a complex "style" property, you can change its value in the following ways:

    • Double-click in the list to change the value of the property value to the next value (or the first value if the current value is the last value)
    • Select Properties, press SPACEBAR to expand the list, and then use the arrows to change the value
    • Select the property and press the DELETE key to change the default value

Right-click the Properties view to access the Properties pane context menu.

6. Tool Panel

This panel provides quick access to specific toolkit components and custom components that you can install. The panel is divided into categories that can be expanded, collapsed, or hidden.

Add components to Design view, you can:

    • Select it in the panel and drag and drop it to the desired location in the design frame or component tree by clicking it.
    • Use the Select Component command to select the type of widget from the Select Component window.

When you select a part in the panel, you can add multiple parts of the same type to the Design view by holding down the CTRL key. When you select a part in the panel, you can add multiple parts of the same type to the Design view by holding down the CTRL key.

You can access the panel context menu by right-clicking anywhere in the Panel to customize the panel, or open the Panel Manager from the context menu.

The following commands are common to each panel:

    • Selection
    • Marquee
    • Choose component
    • Tab Order
Common Panel Commands

Selection: Select one or more parts. Hold down the SHIFT or CTRL key to select multiple parts.

Marquee: Rubber Band Select multiple parts. Hold down the ALT key and start dragging to automatically activate the marquee tool.

Choose Component: Add components in the editor. Enter a name for the class, or select from the History list. You can right-click an item in the list to remove it from history.

tabOrder: Sets the label sequence for the component.

    • Select first in the top-level container (such as JFrame).
    • Activates the label Order tool.
    • Click the component in the desired order.
      • Click on a component more than once to increase its index.
      • Shift+click exclude a section.
      • Ctrl+click the selected index moves to another component.
    • Deactivate the label Order tool by selecting another tool, such as selection.

The position of the Panel can be configured by dragging and dropping or right-clicking on the panel header and choosing Dock on from the menu. The panel can be connected to the left or right in the Design view.

Reposition Panel

You can also collapse or expand the palette.

Folding Panel

The panel can also be used as a standalone view. Select Window>show view>other, expand Windowbuilder, then select the Panel or right-click the panel and select Unzip view. Closing the Standby panel view returns to the default location and is built into the editor.

Removing the Panel

MyEclipse official Chinese online line, welcome to download Communication!

MyEclipse swt/swing designer (bottom)

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.