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


Java ComboViewer.getInput方法代碼示例

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


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

示例1: setConfigComboViewer

import org.eclipse.jface.viewers.ComboViewer; //導入方法依賴的package包/類
/**
 * @param subtypeCMB_Main_viewer2
 * @param string
 */
private void setConfigComboViewer(ComboViewer viewer, String inputString) {
	Object input = viewer.getInput();
	if (input instanceof BTSConfigItem) {
		for (BTSConfig i : ((BTSConfig) input).getChildren()) {
			if (i instanceof BTSConfigItem
					&& inputString
							.equals(((BTSConfigItem) i).getValue())) {
				viewer.setSelection(new StructuredSelection(i));
				return;
			}
		}
		BTSConfigItem cci = BtsmodelFactory.eINSTANCE
				.createBTSConfigItem();
		cci.setLabel(BtsmodelFactory.eINSTANCE.createBTSTranslations());

		cci.getLabel().setTranslation(inputString, "en");
		cci.setValue(inputString);
		((BTSConfig) input).getChildren().add(cci);
		viewer.setSelection(new StructuredSelection( cci));
		return;
	}
	
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:28,代碼來源:TextAnnotationSettingsEditor.java

示例2: findJdbcDriverInfo

import org.eclipse.jface.viewers.ComboViewer; //導入方法依賴的package包/類
/**
 * Find specified driver name in driverChooserViewer ComboViewer
 * 
 * @param driverChooserViewer
 * @param driverName
 * @return
 */
private JDBCDriverInformation findJdbcDriverInfo(
		ComboViewer driverChooserViewer, String driverName )
{
	JDBCDriverInformation info = null;

	ArrayList infoList = (ArrayList) driverChooserViewer.getInput( );
	// The retrieved name is of the format DriverName (version)
	if ( infoList != null )
	{
		for ( int i = 0; i < infoList.size( ); i++ )
		{
			JDBCDriverInformation jdbcDriverInfo = (JDBCDriverInformation) infoList.get( i );
			if ( jdbcDriverInfo.getDriverClassName( ).equals( driverName ) )
			{
				info = jdbcDriverInfo;
				break;
			}
		}
	}

	return info;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:30,代碼來源:JDBCSelectionPageHelper.java

示例3: updateComboSelection

import org.eclipse.jface.viewers.ComboViewer; //導入方法依賴的package包/類
private void updateComboSelection(String value, ComboViewer comboViewer)
{
  if (comboViewer != null)
  {
    LabelValuePair[] pairs = (LabelValuePair[]) comboViewer.getInput();

    if (pairs != null)
    {
      for (LabelValuePair pair : pairs)
      {
        if (pair.getValue().equals(value))
        {
          comboViewer.setSelection(new StructuredSelection(pair));
        }
      }
    }
  }
}
 
開發者ID:terraframe,項目名稱:geoprism,代碼行數:19,代碼來源:GeoprismDataSetEditorPage.java

示例4: selectComboValue

import org.eclipse.jface.viewers.ComboViewer; //導入方法依賴的package包/類
public static void selectComboValue(ComboViewer viewer, String key, IPreferenceStore store)
{
	String[] input = (String[]) viewer.getInput();
	try
	{
		viewer.setSelection(new StructuredSelection(input[store.getInt(key)]));
	}
	catch (Exception ex)
	{
		viewer.setSelection(new StructuredSelection(input[0]));
	}
}
 
開發者ID:edeoliveira,項目名稱:Mailster,代碼行數:13,代碼來源:DialogUtils.java


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