Eclipse Plugin Development Learning notes

Source: Internet
Author: User

2016-09-01 17:11:50

1. Overview

1.1 Swt/jface is the foundation of Eclipse, and the Workbench of Eclipse is built on Swt/jface. In addition, JFace is developed on the SWT, which forms an intersection with SWT, where SWT provides the most primitive components, as shown inJFace is created on the basis of SWT, but JFace does not fully cover the functions of SWTThe two figures below should be the right one, is there a problem with that?   1.2 SWT is a library that relies on the native operating system's libraries and embodies the GUI library features of the host. What are the basic components of SWT? And do a briefWidget,control,composite,itemAbstract class widgets are the basic components of SWT GUIAbstract class Control is a widget that owns the operating system's peersComposite is a control that contains other controlsabstract class Item is a small control that is contained by another control. ==================================== 2. P43  3. What are the common components of SWT? Please do a brief introduction to each. Widget,control,composite,itemComposite is not an abstract class, Widget,control,item is an abstract class. Control owns the widget for the operating system's peers, and composite is controls that contain other controls, and item is a control that is contained by other controls 4. Please describe the control class in detail. The control class is the parent class for all window components, and all window components can call methods of the control class. What are the parameters of the SetBounds method for the 4.1 control class? What does the parameter represent? int x, int y, int width, int height. x, the coordinates of the upper-left corner of the Y window relative to the parent window 4.2 How do I set the window to be available?such as button.setvisible (Boolean visible) 4.3 What is the way to set the message when the window is pointing to the window?such as Button.settooltiptext (string string) 4.4 How to set the style of the window textsuch as button.setfont (font font) 4.5 How to set the foreground and background color of the windowsuch as button.setforeground (color color) 4.6 What is the method of setting the cursor shape of the window?such as button.setbackgound (color color) 4.7 Write an example  
1 ImportOrg.eclipse.SWT.widget.Display;2 ImportOrg.eclipse.SWT.widget.Shell;3 4  Public classHELLOWORLDSWT {5      Public Static voidMain (string[] args) {6Display display =NewDisplay ();7Shell Shell =NewShell (display);8Shell.settext ("Hello world! Window ");9 Shell.open ();Ten          while(!shell.isdisposed ()) { One             if(!Display.readanddisaptch ()) { A display.sleep (); -             } -         } the display.dispose (); -     } -}

The example is simple, note: Display, Shell, Open (), Dispose () these keywords

(2016-09-01 17:00:23)

Eclipse Plugin Development Learning notes

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.