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

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

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

    Dengues Studio: Google Group:http://groups.google.com/group/dengues; QQ Group:24885404.
    關(guān)于如何配置GEF中的Palette

    參考Dengues源代碼: org.dengues.designer.ui.process.editors.GEFComponentsEditor。在一個Editor里面重寫getPaletteRoot()方法。可以返回一個PaletteRoot。但是要配置Palette就要覆蓋 getPalettePreferences();返回一個FlyoutPreferences主要需要三個參數(shù):
    public int getDockLocation() {
    return getPreferenceStore().getInt(IDenguesPrefsConstant.PALETTE_DOCK_LOCATION);
    }

    public int getPaletteState() {
    return getPreferenceStore().getInt(IDenguesPrefsConstant.PALETTE_STATE);
    }

    public int getPaletteWidth() {
    return getPreferenceStore().getInt(IDenguesPrefsConstant.PALETTE_SIZE);
    }
    這三個參數(shù)的值范圍:
    getDockLocation()的參數(shù)有:
    1.PositionConstants.EAST表示Palette在右邊或說東邊,這個是默認值。
    2.PositionConstants.WEST表示Palette在左邊或說西邊。
    getPaletteState()的參數(shù)有:
    1.FlyoutPaletteComposite.STATE_COLLAPSED表示Palette會用完后自動收縮,還可以放大縮小。為默認值。
    2.FlyoutPaletteComposite.STATE_PINNED_OPEN表示Palette會無法收縮和放大縮小。
    getPaletteWidth()的參數(shù)范圍是:FlyoutPaletteComposite.MAX_PALETTE_SIZE=500;
    FlyoutPaletteComposite.MIN_PALETTE_SIZE=20;
    FlyoutPaletteComposite.DEFAULT_PALETTE_SIZE=125;
    可以參考代碼:
    CompEditorPaletteFactory.createPalettePreferences();



    Dengues論壇(http://groups.google.com/group/dengues/),一個很好的Eclipse開發(fā)者樂園.

    Feedback

    # re: [Dengues] 關(guān)于如何配置GEF中的Palette  回復(fù)  更多評論   

    2007-10-26 10:46 by 小張飛刀
    不錯,頂頂先~

    # re: [Dengues] 關(guān)于如何配置GEF中的Palette[未登錄]  回復(fù)  更多評論   

    2007-10-26 11:02 by yy
    期待文檔阿....~~~~

    # re: [Dengues] 關(guān)于如何配置GEF中的Palette  回復(fù)  更多評論   

    2007-10-26 11:24 by 小張飛刀(Dengues Studio)
    補充一下其實說白了,在Graphical Editor的getPalettePreference方法里返回一個FlyoutPreferences對象就可以了,它是一個寫在FlyoutPaletteComposite里的接口,源代碼如下:


    /**
    * FlyoutPreferences is used to save/load the preferences for the flyout palette.
    *
    * @author Pratik Shah
    * @since 3.0
    */
    public interface FlyoutPreferences {
    /**
    * Should return {@link PositionConstants#EAST} or {@link PositionConstants#WEST}.
    * Any other int will be ignored and the default dock location (EAST) will be
    * used instead.
    * @return the saved dock location of the Palette
    */
    int getDockLocation();
    /**
    * When there is no saved state, this method can return any non-positive int (which
    * will result in the palette using the default state -- collapsed), or
    * {@link FlyoutPaletteComposite#STATE_COLLAPSED}, or
    * {@link FlyoutPaletteComposite#STATE_PINNED_OPEN}
    * @return the saved state of the palette
    */
    int getPaletteState();
    /**
    * When there is no saved width, this method can return any int (preferrably a
    * non-positive int). Returning a non-positive int will cause the palette to be
    * sized to the default size, whereas returning a postive int will find the
    * closest match in the valid range (>= minimum and <= maximum)
    * @return the saved width of the flyout palette
    */
    int getPaletteWidth();
    /**
    * This method is invoked when the flyout palette's dock location is changed. The
    * provided dock location should be persisted and returned in
    * {@link #getDockLocation()}.
    * @param location {@link PositionConstants#EAST} or {@link PositionConstants#WEST}
    */
    void setDockLocation(int location);
    /**
    * This method is invoked when the flyout palette's state is changed (the new state
    * becomes the default). The provided state should be persisted and returned in
    * {@link #getPaletteState()}.
    * @param state {@link FlyoutPaletteComposite#STATE_COLLAPSED} or
    * {@link FlyoutPaletteComposite#STATE_PINNED_OPEN}
    */
    void setPaletteState(int state);
    /**
    * This method is invoked when the flyout palette is resized. The provided width
    * should be persisted and returned in {@link #getPaletteWidth()}.
    * @param width the new size of the flyout palette
    */
    void setPaletteWidth(int width);
    }


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


    網(wǎng)站導(dǎo)航:
     
    Dengues Studio: Google Group:http://groups.google.com/group/dengues; QQ Group:24885404.
    主站蜘蛛池模板: 亚洲人成未满十八禁网站| 久久久久久久亚洲Av无码| 欧洲亚洲综合一区二区三区| 成人片黄网站A毛片免费| 国产精品高清视亚洲精品| 一二三四免费观看在线视频中文版 | 久久精品视频亚洲| 免费久久人人爽人人爽av | 亚洲?v女人的天堂在线观看| 免费能直接在线观看黄的视频| 亚洲A∨无码一区二区三区| 无码人妻久久一区二区三区免费| 亚洲小视频在线观看| 久久99国产乱子伦精品免费| 亚洲国产精品久久久久| 黄色成人免费网站| 亚洲日韩一中文字暮| 亚洲男人av香蕉爽爽爽爽| 国产成人无码免费网站| 久久精品亚洲综合专区| 精品国产无限资源免费观看| 亚洲日韩精品国产3区| 亚洲精品成人片在线观看| 免费a级毛片无码a∨免费软件| 亚洲黄色网址大全| 成人爱做日本视频免费| 国产免费MV大全视频网站| 99人中文字幕亚洲区 | 国产jizzjizz视频免费看| 一区二区三区免费在线观看| 亚洲av日韩av天堂影片精品| 日韩欧美一区二区三区免费观看| 香蕉视频免费在线| 亚洲av无码精品网站| 女性自慰aⅴ片高清免费| 又黄又大的激情视频在线观看免费视频社区在线| 亚洲线精品一区二区三区| 色se01短视频永久免费| 一个人晚上在线观看的免费视频 | 永久免费AV无码网站在线观看| 美女被免费网站91色|