本文整理汇总了Java中org.eclipse.swt.custom.CCombo.isDisposed方法的典型用法代码示例。如果您正苦于以下问题:Java CCombo.isDisposed方法的具体用法?Java CCombo.isDisposed怎么用?Java CCombo.isDisposed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.CCombo
的用法示例。
在下文中一共展示了CCombo.isDisposed方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PopulateFields
import org.eclipse.swt.custom.CCombo; //导入方法依赖的package包/类
private void PopulateFields( CCombo cc ) {
if ( cc.isDisposed() ) {
return;
}
try {
String initValue = cc.getText();
cc.removeAll();
RowMetaInterface r = transMeta.getPrevStepFields( stepname );
if ( r != null ) {
cc.setItems( r.getFieldNames() );
}
if ( !Const.isEmpty( initValue ) ) {
cc.setText( initValue );
}
} catch ( KettleException ke ) {
new ErrorDialog(
shell, BaseMessages.getString( PKG, "XsltDialog.FailedToGetFields.DialogTitle" ), BaseMessages
.getString( PKG, "XsltDialog.FailedToGetFields.DialogMessage" ), ke );
}
}
示例2: doSetFocus
import org.eclipse.swt.custom.CCombo; //导入方法依赖的package包/类
@Override
public void doSetFocus() {
final CCombo combo = (CCombo)getControl();
if (!combo.isDisposed()) {
String text = combo.getText();
if (text.length() == 0 && CommonUtils.isWSCocoa()) {
combo.getDisplay().timerExec(1000, new Runnable() {
@Override
public void run() {
focusIt(combo);
}
});
} else {
focusIt(combo);
}
}
}
示例3: PopulateFields
import org.eclipse.swt.custom.CCombo; //导入方法依赖的package包/类
private void PopulateFields(CCombo cc)
{
if(cc.isDisposed()) return;
try{
String initValue=cc.getText();
cc.removeAll();
RowMetaInterface r = transMeta.getPrevStepFields(stepname);
if (r!=null) {
cc.setItems(r.getFieldNames());
}
if(!Const.isEmpty(initValue)) cc.setText(initValue);
}catch(KettleException ke){
new ErrorDialog(shell, BaseMessages.getString(PKG, "XsltDialog.FailedToGetFields.DialogTitle"), BaseMessages.getString(PKG, "XsltDialog.FailedToGetFields.DialogMessage"), ke); //$NON-NLS-1$ //$NON-NLS-2$
}
}
示例4: refreshCombo
import org.eclipse.swt.custom.CCombo; //导入方法依赖的package包/类
/**
*
*
*/
private void refreshCombo(IElementParameter childParameter) {
if (childParameter == null) {
return;
}
CCombo combo = (CCombo) hashCurControls.get(childParameter.getName());
if (combo == null || combo.isDisposed()) {
return;
}
Object value = childParameter.getValue();
if (value instanceof String) {
String version = (String) value;
// String strValue = ""; //$NON-NLS-1$
// int nbInList = 0, nbMax = childParameter.getListItemsValue().length;
// while (strValue.equals(new String("")) && nbInList < nbMax) { //$NON-NLS-1$
// if (name.equals(childParameter.getListItemsValue()[nbInList])) {
// strValue = childParameter.getListItemsDisplayName()[nbInList];
// }
// nbInList++;
// }
String[] paramItems = getListToDisplay(childParameter);
String[] comboItems = combo.getItems();
if (!Arrays.equals(paramItems, comboItems)) {
combo.setItems(paramItems);
}
combo.setText(version);
// combo.setVisible(true);
}
}
示例5: focusIt
import org.eclipse.swt.custom.CCombo; //导入方法依赖的package包/类
private void focusIt(final CCombo combo) {
if (!combo.isDisposed()) {
combo.setFocus();
combo.setListVisible(true);
}
}