當前位置: 首頁>>代碼示例>>Java>>正文


Java Utilities.attachInitJob方法代碼示例

本文整理匯總了Java中org.openide.util.Utilities.attachInitJob方法的典型用法代碼示例。如果您正苦於以下問題:Java Utilities.attachInitJob方法的具體用法?Java Utilities.attachInitJob怎麽用?Java Utilities.attachInitJob使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.openide.util.Utilities的用法示例。


在下文中一共展示了Utilities.attachInitJob方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initComponents

import org.openide.util.Utilities; //導入方法依賴的package包/類
protected void initComponents() {        
    if (!oPanel.isPrepared()) {
        initComponent = new JLabel(NbBundle.getMessage(InitPanel.class, "LBL_computing")); // NOI18N
        initComponent.setPreferredSize(new Dimension(850, 450));
        // avoid flicking ?
        Color c = UIManager.getColor("Tree.background"); // NOI18N
        if (c == null) {
            //GTK 1.4.2 will return null for Tree.background
            c = Color.WHITE;
        }
        initComponent.setBackground(c);    // NOI18N               
        initComponent.setHorizontalAlignment(SwingConstants.CENTER);
        initComponent.setOpaque(true);
        
        CardLayout card = new CardLayout();
        setLayout(card);            
        add(initComponent, "init");    // NOI18N
        card.show(this, "init"); // NOI18N        
        Utilities.attachInitJob(this, this);
    } else {
        finished();  
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,代碼來源:InitPanel.java

示例2: getComponent

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override
public synchronized Component getComponent() {        
    if (this.panel == null) {
        TemplatesPanelGUI.Builder firer = new Builder();
        this.panel = new TemplatesPanelGUI (firer);
        panel.setWizardDescriptor(wizard);
        Utilities.attachInitJob (panel, getWarmUp());
        this.warmUpActive = true;
        this.panel.setName (NbBundle.getBundle (ProjectTemplatePanel.class).getString ("LBL_TemplatesPanel_Name")); // NOI18N
    }
    return this.panel;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:ProjectTemplatePanel.java

示例3: addNotify

import org.openide.util.Utilities; //導入方法依賴的package包/類
@Override public void addNotify () {
    if (firstTime) {
        //77244 prevent multiple initializations..
        Utilities.attachInitJob (this, this);
        firstTime = false;
    }
    super.addNotify ();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:TemplateChooserPanelGUI.java

示例4: setupCombo

import org.openide.util.Utilities; //導入方法依賴的package包/類
private void setupCombo() {
    final Cursor currentCursor = getCursor();
    setCursor(Utilities.createProgressCursor(this));

    Utilities.attachInitJob(comMode, new AsyncGUIJob() {

        Set<String> modes;

        @Override
        public void construct() {
            try {
                modes = DesignSupport.existingModes(data);
            } catch (IOException exc) {
                Logger.getLogger(BasicSettingsPanel.class.getName()).log(Level.INFO, null, exc);
            }
        }

        @Override
        public void finished() {
            comMode.setModel(new DefaultComboBoxModel(modes != null ? modes.toArray(new String[modes.size()]) : DEFAULT_MODES));
            setComModeSelectedItem();
            windowPosChanged(null);
            setCursor(currentCursor);
            loadedComboBox = true;
            checkValidity();
        }
    });
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:29,代碼來源:BasicSettingsPanel.java

示例5: TemplateWizard1

import org.openide.util.Utilities; //導入方法依賴的package包/類
/** Creates new form NewFromTemplatePanel */
public TemplateWizard1 () {
    initComponents ();

    treeView = new TemplatesTreeView();
    treeView.setDefaultActionAllowed(false);
    treeView.setPopupAllowed(false);
    treeView.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    java.awt.GridBagConstraints gridBagConstraints1 = new java.awt.GridBagConstraints();
    gridBagConstraints1.gridx = 0;
    gridBagConstraints1.gridy = 1;
    gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints1.insets = new java.awt.Insets(0, 0, 11, 0);
    gridBagConstraints1.weightx = 1.0;
    gridBagConstraints1.weighty = 1.0;
    add(treeView, gridBagConstraints1);

    ResourceBundle bundle = org.openide.util.NbBundle.getBundle(TemplateWizard1.class);
    
    setName (bundle.getString("LAB_TemplateChooserPanelName"));

    putClientProperty(PROP_CONTENT_SELECTED_INDEX, 0);
    putClientProperty(PROP_CONTENT_DATA, new String[] {getName(), "..."}); // NOI18N
    
    // Fix of #19667 - those values will be retreived in addNotify
    putClientProperty("LAB_SelectTemplateBorder", // NOI18N
        bundle.getString("LAB_SelectTemplateBorder")); 
    putClientProperty("LAB_TemplateDescriptionBorder", // NOI18N
        bundle.getString("LAB_TemplateDescriptionBorder"));
    putClientProperty("ACSD_TemplatesTree", // NOI18N
        bundle.getString("ACSD_TemplatesTree"));
    putClientProperty("ACSD_TemplateWizard1", // NOI18N
        bundle.getString("ACSD_TemplateWizard1"));
    // bugfix #19667 end
    
    updateRootNode (null);
    
    templatesLabel.setLabelFor(treeView);
    
    noBrowser.setText(bundle.getString("MSG_InitDescription"));
    java.awt.CardLayout card = (java.awt.CardLayout)browserPanel.getLayout();
    card.show (browserPanel, "noBrowser"); // NOI18N
    // for asynchnonous lazy init of this component
    Utilities.attachInitJob(this, this);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:46,代碼來源:TemplateWizard1.java


注:本文中的org.openide.util.Utilities.attachInitJob方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。