本文整理匯總了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);
}
}