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

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

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

    邋遢居

    我的Java天堂

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      61 Posts :: 2 Stories :: 90 Comments :: 0 Trackbacks

    開始學(xué)習(xí)RCP編程

    很早很早就聽說RCP了。也很想來玩玩,但是一直沒有找到好的點子來練手。不過近段時間有個老朋友要求幫他做個小東西。他現(xiàn)在的需求很簡單。我怕他以后有要加什么內(nèi)容。所以就想用RCP來做。剛好用他來好好學(xué)習(xí)一下,要不都不好意思在bbs.rcp.cn混了。

    找了本書(《Eclipse Rich Client Platform Designing Coding and Packaging Java Applications》)按照書中的例子看了起來。

    了解基本的:

    AbstractUIPlugin

    WorkbenchWindowAdvisor

    WorkbenchAdvisor

    ActionBarAdvisor

    IperspectiveFactoryViewPart幾個類。

    收獲最大的就是看到yipsilonbbs.rcp.cn中關(guān)于布局的帖子。

    http://www.eclipseworld.org/bbs/read.php?tid=1312&page=e#a

    public class MGRPerspective implements IPerspectiveFactory {

    public void createInitialLayout(IPageLayout layout) {

      Plugin plugin 
    = Plugin.getDefault();

      LSEmployee employee 
    = plugin.getEmployee();

      
    //只有在用戶登陸后才能畫界面
      if (employee != null) {
        
        String editorArea 
    = layout.getEditorArea();
        
        layout.setEditorAreaVisible(
    false);
        
        
    // 主要界面
        IFolderLayout main = layout.createFolder("main", IPageLayout.TOP, 0.95f, editorArea);
        
    // 屬性界面
        IFolderLayout property = layout.createFolder("property", IPageLayout.RIGHT, 0.75f"main");
        
    // 字典界面
        IFolderLayout dictionary = layout.createFolder("dictionary", IPageLayout.BOTTOM, 0.95f"property");

        LSPosition position 
    = employee.getPosition();

        
    boolean isManager = position.getManager().booleanValue();

        
    if (isManager) {
        main.addView(EmployeeTableView.
    class.getName());
        property.addView(PositionPropertyView.
    class.getName());
        property.addView(EmployeePropertyView.
    class.getName());
        }

        
    if (position.getBuyer().booleanValue() || isManager) {
        main.addView(ProviderTableView.
    class.getName());
        main.addView(JHInvoiceTableView.
    class.getName());
        property.addView(ProviderPropertyView.
    class.getName());
        property.addView(JHInvoicePropertyView.
    class.getName());
        }

        
    if (position.getKeeper().booleanValue() || isManager) {
        dictionary.addView(DDRepositoryView.
    class.getName());
        main.addView(DBInvoiceTableView.
    class.getName());
        property.addView(DBInvoicePropertyView.
    class.getName());
        }

        
    if (position.getSeller().booleanValue() || isManager) {
        main.addView(MemberTableView.
    class.getName());
        main.addView(YDInvoiceTableView.
    class.getName());
        main.addView(XSInvoiceTableView.
    class.getName());
        property.addView(MemberPropertyView.
    class.getName());
        property.addView(YDInvoicePropertyView.
    class.getName());
        property.addView(XSInvoicePropertyView.
    class.getName());
        }

        
    if (position.getMaintainer().booleanValue() || isManager) {
        dictionary.addView(DDAreaView.
    class.getName());
        dictionary.addView(DDBrandView.
    class.getName());
        dictionary.addView(DDColorView.
    class.getName());
        dictionary.addView(DDCompView.
    class.getName());
        dictionary.addView(DDLevelView.
    class.getName());
        dictionary.addView(DDSizeView.
    class.getName());
        dictionary.addView(DDSortView.
    class.getName());
        dictionary.addView(DDDescriptionView.
    class.getName());
        }
      }
    }
    }

    根據(jù)這段代碼做出如下界面:

    rcp ui.bmp
    很簡單。大家見笑了。呵呵。
    我的代碼就不貼了。看
    yipsilon的代碼就可以搞定布局了。再次感謝yipsilon。
    今天就寫到這兒了。爭取周末能把ui全部畫好。
    posted on 2006-02-23 23:06 Jet Geng 閱讀(2402) 評論(0)  編輯  收藏 所屬分類: Eclipse
    主站蜘蛛池模板: 国产做国产爱免费视频| 亚洲伊人久久大香线蕉结合| 黄色三级三级免费看| 大学生a级毛片免费观看| www.亚洲日本| 永久中文字幕免费视频网站| 亚洲成a∨人片在无码2023 | 久久精品国产亚洲av水果派| 十八禁视频在线观看免费无码无遮挡骂过 | 精品久久久久亚洲| 免费在线观看污网站| 免费精品国自产拍在线播放| 久久久亚洲精品蜜桃臀| 中国性猛交xxxxx免费看| 亚洲AV第一页国产精品| 日韩在线播放全免费| 亚洲精品一二三区| 日本特黄特色免费大片| 牛牛在线精品免费视频观看| 久久久青草青青国产亚洲免观| a级毛片免费播放| 亚洲毛片一级带毛片基地| 色妞WWW精品免费视频| 特级毛片A级毛片100免费播放| 国产亚洲综合久久系列| 天天影院成人免费观看| jzzijzzij在线观看亚洲熟妇| 国产亚洲自拍一区| 成年人视频免费在线观看| 欧洲亚洲综合一区二区三区| 国产午夜亚洲精品理论片不卡| 久久久久国产精品免费看| 亚洲欧美日韩一区二区三区在线| 亚洲А∨精品天堂在线| 91免费国产精品| 精品女同一区二区三区免费播放| 精品久久久久久亚洲| 成人奭片免费观看| 99免费在线视频| 亚洲欧美精品午睡沙发| 久久久久亚洲av无码专区蜜芽|