<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 28, comments - 27, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    [rcp系列]SWT基礎概念之一

    Posted on 2006-09-18 15:09 小小涼粉 閱讀(253) 評論(0)  編輯  收藏
    Design decisions:

    Most platforms require that widgets be created within the context of a specific parent, so SWT requires that a parent widget be supplied as one of its constructor arguments. Another requirement of many platforms is that certain style settings must be supplied at creation time (for example, buttons can be checkboxes, radio buttons, or simple buttons and text fields can be single- or multi-line).

    Style bits are represented by int constants defined in the SWT class. Styles are then OR'ed together and passed as another constructor argument to create the initial style of a widget.

    SWT works directly with the native underlying graphic resources, each SWT resource consumes a GUI resource, and timely release of that resource is essential not only for your SWT application's well-being, but also for the well-being of all other GUI programs currently running. Java's garbage collection carries no timeliness guarantees, and would make a poor manager of graphic resources for SWT. So, instead, you as programmer must assume the responsibility.

    Fortunately, a widget that is a child of another widget is automatically destroyed when its parent is destroyed. This means that if you properly dispose of a shell, you do not need to dispose of each of its children because they will be disposed of automatically.

    ----------------------------------------------------------------------------------------

    Top-level classes:

    Each SWT application needs a display and one or more shells (representing each window frame).

    Display: The Display object represents the connection between the application-level SWT classes and the underlying windowing system implementation.

    One of the most important tasks of this class is its event-handling mechanism. The Display class maintains a collection of registered event listeners, reads events from the lower-level operating-system event queue, and delivers these events to the appropriate implementations of registered listener logic.

    Shell: Every window has a shell representing the window frame with which the user interacts. The Shell object represents a window—either a top-level window or a dialog window. It contains the various controls that make up the application: buttons, text boxes, tables

    ----------------------------------------------------------------------------------------

    Control: The Control class is the abstract superclass of all the dialog and window component classes such as Button, Label, ProgressBar, Sash, Scrollable, and Slider

    Composite: Taking a bottom-up view of the world, every control has a parent that is an instance of the class Composite or one of its subclasses. The class Shell, which represents the top-level windows of your application, is a subclass of Composite.

    Stated another way, this time from the top down, a display contains a list of top-level shells, where each shell is the root of a tree composed of composites and controls. Composites can contain other composites, allowing the tree to have arbitrary depth. If the child of a shell is another shell, the child is commonly called a dialog shell. A dialog shell always stays in front of the parent shell.

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲人AV永久一区二区三区久久| 久久久亚洲欧洲日产国码二区| 国产裸体美女永久免费无遮挡| 亚洲AV综合色区无码一区| 国产成人免费高清激情明星| 亚洲Av无码国产一区二区 | 亚洲码国产精品高潮在线| 久久国产免费福利永久| 午夜亚洲乱码伦小说区69堂| 亚洲αv久久久噜噜噜噜噜| 成人特黄a级毛片免费视频| 91视频免费网站| 亚洲人成网站在线播放2019| 亚洲精品无码AV人在线播放| 毛片免费在线视频| 免费91麻豆精品国产自产在线观看 | 91香蕉视频免费| 91精品成人免费国产| 亚洲色成人网站WWW永久四虎| 亚洲国产另类久久久精品| 国产精品公开免费视频| 久久午夜免费鲁丝片| 黄网站色成年片大免费高清| 亚洲综合色一区二区三区小说| 亚洲色婷婷综合开心网| 无码国产精品久久一区免费| a级片在线免费看| 美女被羞羞网站免费下载| 亚洲中文无码a∨在线观看| 亚洲中文字幕久久精品无码喷水| 噜噜嘿在线视频免费观看| 18禁无遮挡无码国产免费网站| 一级特黄录像视频免费| 亚洲AV无码片一区二区三区 | 久久国产精品国产自线拍免费| 无人视频免费观看免费视频| 亚洲一区在线观看视频| 久久亚洲春色中文字幕久久久| 亚洲最大激情中文字幕| 免费中文字幕不卡视频| 精品少妇人妻AV免费久久洗澡 |