<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.

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


    網站導航:
     
    主站蜘蛛池模板: 日韩电影免费在线| 亚洲一区免费视频| 亚洲国产综合无码一区二区二三区| 亚洲成a人片在线观看中文!!!| 日韩视频免费在线观看| 久久精品国产亚洲av麻| 日本在线看片免费| 亚洲狠狠ady亚洲精品大秀| 久久久久久曰本AV免费免费| 亚洲欧洲日产国码www| 成人无码区免费A片视频WWW | 国产成人免费爽爽爽视频 | 国产一级在线免费观看| 亚洲精品乱码久久久久久自慰| 中文字幕免费视频精品一| 亚洲国产精品va在线播放 | 看免费毛片天天看| 久久久久无码专区亚洲av| 野花香高清视频在线观看免费 | 亚洲色大18成人网站WWW在线播放 亚洲色大成WWW亚洲女子 | 91精品免费国产高清在线| 亚洲三级高清免费| 国产精品免费看久久久无码| 人与动性xxxxx免费| 亚洲欧洲日产国码无码久久99| 久久午夜无码免费| 亚洲 日韩经典 中文字幕| 免费人成在线观看网站视频| 最近免费字幕中文大全| 亚洲美女视频一区二区三区| 国产一精品一AV一免费孕妇| 免费观看四虎精品成人| 亚洲狠狠综合久久| 拔擦拔擦8x华人免费久久 | 国拍在线精品视频免费观看| 成人亚洲国产精品久久| 日韩亚洲AV无码一区二区不卡| 精品国产精品久久一区免费式| 国产免费黄色无码视频| 亚洲人精品亚洲人成在线| 久久久久国产亚洲AV麻豆|