<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.
    關于如何配置GEF中的Palette

    參考Dengues源代碼: org.dengues.designer.ui.process.editors.GEFComponentsEditor。在一個Editor里面重寫getPaletteRoot()方法。可以返回一個PaletteRoot。但是要配置Palette就要覆蓋 getPalettePreferences();返回一個FlyoutPreferences主要需要三個參數:
    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);
    }
    這三個參數的值范圍:
    getDockLocation()的參數有:
    1.PositionConstants.EAST表示Palette在右邊或說東邊,這個是默認值。
    2.PositionConstants.WEST表示Palette在左邊或說西邊。
    getPaletteState()的參數有:
    1.FlyoutPaletteComposite.STATE_COLLAPSED表示Palette會用完后自動收縮,還可以放大縮小。為默認值。
    2.FlyoutPaletteComposite.STATE_PINNED_OPEN表示Palette會無法收縮和放大縮小。
    getPaletteWidth()的參數范圍是: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] 關于如何配置GEF中的Palette  回復  更多評論   

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

    # re: [Dengues] 關于如何配置GEF中的Palette[未登錄]  回復  更多評論   

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

    # re: [Dengues] 關于如何配置GEF中的Palette  回復  更多評論   

    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ā)表評論。


    網站導航:
     
    Dengues Studio: Google Group:http://groups.google.com/group/dengues; QQ Group:24885404.
    主站蜘蛛池模板: 成人免费无码大片a毛片| 亚洲免费精彩视频在线观看| 一本岛高清v不卡免费一三区| 亚洲免费视频在线观看| 99麻豆久久久国产精品免费| 在线亚洲97se亚洲综合在线| 中国一级特黄高清免费的大片中国一级黄色片 | 一个人看www在线高清免费看 | 免费不卡在线观看AV| 亚洲日本中文字幕| 18女人腿打开无遮掩免费| 亚洲天堂中文字幕在线观看| 黄色成人免费网站| 亚洲а∨天堂久久精品9966| 日本一区免费电影| xxxxxx日本处大片免费看| 亚洲乱码国产乱码精品精| 性无码免费一区二区三区在线| 亚洲手机中文字幕| 日韩免费观看一级毛片看看| 鲁啊鲁在线视频免费播放| 国产亚洲人成网站在线观看| 久久精品免费视频观看| 亚洲av永久无码精品天堂久久| 噜噜嘿在线视频免费观看| 九九免费精品视频在这里| 亚洲an天堂an在线观看| 18禁超污无遮挡无码免费网站国产 | 免费国产作爱视频网站| MM1313亚洲国产精品| 亚洲尤码不卡AV麻豆| 中文字幕免费视频一| 亚洲欧美一区二区三区日产| 亚洲人妻av伦理| 1000部啪啪毛片免费看| 国产成人高清亚洲一区久久| 亚洲AV综合色区无码另类小说| 一二三四在线播放免费观看中文版视频| 国产精品亚洲一区二区三区| 久久丫精品国产亚洲av不卡| 国产一区二区三区免费视频|