<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。在一個(gè)Editor里面重寫getPaletteRoot()方法。可以返回一個(gè)PaletteRoot。但是要配置Palette就要覆蓋 getPalettePreferences();返回一個(gè)FlyoutPreferences主要需要三個(gè)參數(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);
    }
    這三個(gè)參數(shù)的值范圍:
    getDockLocation()的參數(shù)有:
    1.PositionConstants.EAST表示Palette在右邊或說東邊,這個(gè)是默認(rèn)值。
    2.PositionConstants.WEST表示Palette在左邊或說西邊。
    getPaletteState()的參數(shù)有:
    1.FlyoutPaletteComposite.STATE_COLLAPSED表示Palette會(huì)用完后自動(dòng)收縮,還可以放大縮小。為默認(rèn)值。
    2.FlyoutPaletteComposite.STATE_PINNED_OPEN表示Palette會(huì)無法收縮和放大縮小。
    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/),一個(gè)很好的Eclipse開發(fā)者樂園.

    Feedback

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

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

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

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

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

    2007-10-26 11:24 by 小張飛刀(Dengues Studio)
    補(bǔ)充一下其實(shí)說白了,在Graphical Editor的getPalettePreference方法里返回一個(gè)FlyoutPreferences對(duì)象就可以了,它是一個(gè)寫在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);
    }


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


    網(wǎng)站導(dǎo)航:
     
    Dengues Studio: Google Group:http://groups.google.com/group/dengues; QQ Group:24885404.
    主站蜘蛛池模板: 亚洲中文无码永久免| 亚洲福利视频网站| 午夜男人一级毛片免费| 亚洲精品永久www忘忧草| 久久精品视频免费播放| 精品久久久久国产免费| 亚洲人色大成年网站在线观看| 亚洲另类无码专区丝袜| 久久久WWW免费人成精品| 狠狠亚洲狠狠欧洲2019| 中文字幕手机在线免费看电影 | 久久久久久久久无码精品亚洲日韩| 久久久久久99av无码免费网站| 亚洲日韩AV一区二区三区四区| 国产精品酒店视频免费看| 亚洲国产精品国自产电影| 99热这里只有精品6免费| 亚洲成?Ⅴ人在线观看无码| 无遮挡免费一区二区三区 | 亚洲乱亚洲乱妇24p| 午夜免费福利影院| 亚洲国产精品免费视频| 免费福利在线播放| 亚洲高清视频在线观看| 亚洲精品视频免费看| 亚洲AV无码专区在线电影成人| 67194国产精品免费观看| 香蕉大伊亚洲人在线观看| 久99久精品免费视频热77| 亚洲午夜爱爱香蕉片| 免费日本一区二区| 精品国产日韩亚洲一区| 亚欧免费无码aⅴ在线观看| 亚洲精品天堂在线观看| 精品国产亚洲一区二区在线观看 | 久久99亚洲网美利坚合众国| 手机永久免费的AV在线电影网| 国产亚洲精品自在久久| 在线观看免费人成视频色9| 亚洲嫩草影院在线观看| 国产免费啪嗒啪嗒视频看看|