2020国产成人精品视频,性做久久久久久久久,亚洲国产成人久久综合一区,亚洲影院天堂中文av色

分享

顯示歡迎頁(yè)(org.eclipse.ui.intro)-DM

 jinzq 2007-01-18
每次運(yùn)行rcp都顯示歡迎頁(yè):
////////////////////////////////////////////////////////////////////////////////
1.繼承WorkbenchAdvisor類的子類:
    public void postWindowCreate() {
        super.postWindowCreate();
        getWindowConfigurer().getWindow().getWorkbench().getIntroManager().showIntro(getWindowConfigurer().getWindow(),false);
      }
2.plugin.xml:  
  <extension
         point="org.eclipse.ui.intro">
      <intro
            class="com.bdaum.Hex.HexIntro"
            id="com.bdaum.Hex.intro">
      </intro>
      <introProductBinding
            introId="com.bdaum.Hex.intro"
            productId="com.bdaum.Hex.product">
      </introProductBinding>
   </extension>
3.實(shí)現(xiàn)IntroPart類:
    public void setFocus() {
        introForm.setFocus();
    }

    /*
     * (non-Javadoc)
     *
     * @see org.eclipse.ui.part.IntroPart
     *      #createPartControl(org.eclipse.swt.widgets.Composite)
     */
    public void createPartControl(Composite parent) {
        // Fetch Toolkit
        FormToolkit tk = new FormToolkit(parent.getDisplay());
        // Create Form and set Layout
        introForm = tk.createForm(parent);
        TableWrapLayout layout = new TableWrapLayout();
        introForm.getBody().setLayout(layout);
        // Create forms text, more space between paragraphs
        FormText tx = tk.createFormText(introForm.getBody(), true);
        tx.setParagraphsSeparated(true);
        // Set hyperlink appearance
        // (must be done before setting the text)
        HyperlinkSettings settings = new HyperlinkSettings(parent.getDisplay());
        settings.setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
        tx.setHyperlinkSettings(settings);
        // Marked-up text
        String text = "<form><p><span font=\"title\">Hex 7</span></p>"
                + "<p><span color=\"subtitle\" font=\"subtitle\">"
                + "The game of Hex</span></p>"
                + "<p><a href=\"http://startGame\">Start game</a></p></form>";
        tx.setText(text, true, false);
        // Set Fonts
        Font titleFont = JFaceResources.getFont(JFaceResources.HEADER_FONT);
        tx.setFont("title", titleFont);
        Font subtitleFont = JFaceResources.getFont(JFaceResources.BANNER_FONT);
        tx.setFont("subtitle", subtitleFont);
        // Set color for subtitle
        Color col = parent.getDisplay().getSystemColor(SWT.COLOR_DARK_GREEN);
        tx.setColor("subtitle", col);
        // Process hyperlink events
        tx.addHyperlinkListener(new HyperlinkAdapter() {
            public void linkActivated(HyperlinkEvent e) {
                // Fetch IntroManager, close welcome screen
                IWorkbenchWindow window = getIntroSite().getWorkbenchWindow();
                IWorkbench workbench = window.getWorkbench();
                IIntroManager manager = workbench.getIntroManager();
                manager.closeIntro(HexIntro.this);
            }
        });
    }




    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多