本文整理了Java中org.openide.util.Utilities.attachInitJob()
方法的一些代码示例,展示了Utilities.attachInitJob()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.attachInitJob()
方法的具体详情如下:
包路径:org.openide.util.Utilities
类名称:Utilities
方法名:attachInitJob
[英]Attaches asynchronous init job to given component. AsyncGUIJob#construct() will be called after first paint, when paint event arrives. Later, AsyncGUIJob#finished()will be called according to the rules of the AsyncGUIJob
interface. Useful for components that have slower initialization phase, component can benefit from more responsive behaviour during init.
[中]将异步初始化作业附加到给定组件。AsyncGUIJob#construct()将在第一次绘制之后调用,即绘制事件到达时。稍后,将根据AsyncGUIJob
接口的规则调用AsyncGUIJob#finished()。对于初始化阶段较慢的组件非常有用,组件可以在初始化期间受益于更灵敏的行为。
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
public OptionsPanel0(final WizardDescriptor setting, final NewOptionsIterator.DataModel data) {
super(setting);
this.data = data;
initComponents();
initAccessibility();
putClientProperty("NewFileWizard_Title",// NOI18N
NbBundle.getMessage(OptionsPanel0.class,"LBL_OptionsWizardTitle")); // NOI18N
primaryPanelCombo.setModel(UIUtil.createComboWaitModel());
Utilities.attachInitJob(primaryPanelCombo, new AsyncGUIJob() {
ComboBoxModel model;
@Override public void construct() {
model = new DefaultComboBoxModel(getPrimaryIdsFromLayer());
}
@Override public void finished() {
primaryPanelCombo.setModel(model);
}
});
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
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();
}
});
}
代码示例来源:origin: AlexFalappa/nb-springboot
Utilities.attachInitJob(panels[0].getComponent(), (AsyncGUIJob) panels[0].getComponent());
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide-loaders
card.show (browserPanel, "noBrowser"); // NOI18N
Utilities.attachInitJob(this, this);
内容来源于网络,如有侵权,请联系作者删除!