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


Java MessageDialogWithToggle.setDefaultImage方法代碼示例

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


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

示例1: editEntryParallel

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
/**
 * Go from serial to parallel to serial execution
 */
public void editEntryParallel() {
  getJobEntry().setLaunchingInParallel(!getJobEntry().isLaunchingInParallel());
  if (getJobEntry().isLaunchingInParallel()) {
    // Show a warning (optional)
    //
    if ("Y".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y"))) //$NON-NLS-1$ //$NON-NLS-2$
    {
      MessageDialogWithToggle md = new MessageDialogWithToggle(shell, Messages
          .getString("JobGraph.ParallelJobEntriesWarning.DialogTitle"), //$NON-NLS-1$
          null, Messages.getString("JobGraph.ParallelJobEntriesWarning.DialogMessage", Const.CR) + Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
          MessageDialog.WARNING, new String[] { Messages.getString("JobGraph.ParallelJobEntriesWarning.Option1") }, //$NON-NLS-1$
          0, Messages.getString("JobGraph.ParallelJobEntriesWarning.Option2"), //$NON-NLS-1$
          "N".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y")) //$NON-NLS-1$ //$NON-NLS-2$
      );
      MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
      md.open();
      spoon.props.setCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, md.getToggleState() ? "N" : "Y"); //$NON-NLS-1$ //$NON-NLS-2$
      spoon.props.saveProps();
    }
  }
  redraw();
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:26,代碼來源:JobGraph.java

示例2: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{		
	if (Const.isEmpty(wStepname.getText())) return;
       getMeta(joinMeta);
       // Show a warning (optional)
       if ( "Y".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") )) //$NON-NLS-1$ //$NON-NLS-2$
       {
           MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
                BaseMessages.getString(PKG, "MultiMergeJoinDialog.InputNeedSort.DialogTitle"),  //$NON-NLS-1$
                null,
                BaseMessages.getString(PKG, "MultiMergeJoinDialog.InputNeedSort.DialogMessage", Const.CR )+Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
                MessageDialog.WARNING,
                new String[] { BaseMessages.getString(PKG, "MultiMergeJoinDialog.InputNeedSort.Option1") }, //$NON-NLS-1$
                0,
                BaseMessages.getString(PKG, "MultiMergeJoinDialog.InputNeedSort.Option2"), //$NON-NLS-1$
                "N".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") ) //$NON-NLS-1$ //$NON-NLS-2$
           );
           MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
           md.open();
           props.setCustomParameter(STRING_SORT_WARNING_PARAMETER, md.getToggleState()?"N":"Y"); //$NON-NLS-1$ //$NON-NLS-2$
           props.saveProps();
       }
       stepname = wStepname.getText(); // return value
	dispose();
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:26,代碼來源:MultiMergeJoinDialog.java

示例3: editEntryParallel

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
/**
 * Go from serial to parallel to serial execution
 */
public void editEntryParallel() {
  getJobEntry().setLaunchingInParallel(!getJobEntry().isLaunchingInParallel());
  if (getJobEntry().isLaunchingInParallel()) {
    // Show a warning (optional)
    //
    if ("Y".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y"))) //$NON-NLS-1$ //$NON-NLS-2$
    {
      MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
      		BaseMessages.getString(PKG, "JobGraph.ParallelJobEntriesWarning.DialogTitle"), //$NON-NLS-1$
          null, BaseMessages.getString(PKG, "JobGraph.ParallelJobEntriesWarning.DialogMessage", Const.CR) + Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
          MessageDialog.WARNING, new String[] { BaseMessages.getString(PKG, "JobGraph.ParallelJobEntriesWarning.Option1") }, //$NON-NLS-1$
          0, BaseMessages.getString(PKG, "JobGraph.ParallelJobEntriesWarning.Option2"), //$NON-NLS-1$
          "N".equalsIgnoreCase(spoon.props.getCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, "Y")) //$NON-NLS-1$ //$NON-NLS-2$
      );
      MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
      md.open();
      spoon.props.setCustomParameter(STRING_PARALLEL_WARNING_PARAMETER, md.getToggleState() ? "N" : "Y"); //$NON-NLS-1$ //$NON-NLS-2$
      spoon.props.saveProps();
    }
  }
  redraw();
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:26,代碼來源:JobGraph.java

示例4: showPaloLibWarningDialog

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public static void showPaloLibWarningDialog(Shell shell) {
  PropsUI props = PropsUI.getInstance();

  if ("Y".equalsIgnoreCase(props.getCustomParameter(STRING_PALO_LIB_WARNING_PARAMETER, "Y"))) //$NON-NLS-1$ //$NON-NLS-2$
  {
    MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
        BaseMessages.getString(PKG, "PaloCellInputDialog.PaloLibWarningDialog.DialogTitle"), //$NON-NLS-1$
        null, 
        BaseMessages.getString(PKG, "PaloCellInputDialog.PaloLibWarningDialog.DialogMessage", Const.CR) + Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
        MessageDialog.WARNING, new String[] { 
          BaseMessages.getString(PKG, "PaloCellInputDialog.PaloLibWarningDialog.Option1") }, //$NON-NLS-1$
          0, 
          BaseMessages.getString(PKG, "PaloCellInputDialog.PaloLibWarningDialog.Option2"), //$NON-NLS-1$
        "N".equalsIgnoreCase(props.getCustomParameter(STRING_PALO_LIB_WARNING_PARAMETER, "Y")) //$NON-NLS-1$ //$NON-NLS-2$
    );
    MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
    md.open();
    props.setCustomParameter(STRING_PALO_LIB_WARNING_PARAMETER, md.getToggleState() ? "N" : "Y"); //$NON-NLS-1$ //$NON-NLS-2$
    props.saveProps();
  }
}
 
開發者ID:bsspirit,項目名稱:kettle-4.4.0-stable,代碼行數:22,代碼來源:PaloCellInputDialog.java

示例5: showPaloLibWarningDialog

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public static void showPaloLibWarningDialog( Shell shell ) {
  PropsUI props = PropsUI.getInstance();

  if ( "Y".equalsIgnoreCase( props.getCustomParameter( STRING_PALO_LIB_WARNING_PARAMETER, "Y" ) ) ) {
    MessageDialogWithToggle md =
      new MessageDialogWithToggle(
        shell,
        BaseMessages.getString( PKG, "PaloCellInputDialog.PaloLibWarningDialog.DialogTitle" ),
        null,
        BaseMessages.getString( PKG, "PaloCellInputDialog.PaloLibWarningDialog.DialogMessage", Const.CR )
          + Const.CR,
        MessageDialog.WARNING,
        new String[]{ BaseMessages.getString( PKG, "PaloCellInputDialog.PaloLibWarningDialog.Option1" ) },
        0,
        BaseMessages.getString( PKG, "PaloCellInputDialog.PaloLibWarningDialog.Option2" ),
        "N".equalsIgnoreCase( props.getCustomParameter( STRING_PALO_LIB_WARNING_PARAMETER, "Y" )
        )
      );
    MessageDialogWithToggle.setDefaultImage( GUIResource.getInstance().getImageSpoon() );
    md.open();
    props.setCustomParameter( STRING_PALO_LIB_WARNING_PARAMETER, md.getToggleState() ? "N" : "Y" );
    props.saveProps();
  }
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:25,代碼來源:PaloCellInputDialog.java

示例6: transOverwritePrompt

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public boolean transOverwritePrompt( TransMeta transMeta ) {
  MessageDialogWithToggle md = new MessageDialogWithToggle( shell,
    BaseMessages.getString( PKG, "RepositoryImportDialog.OverwriteTrans.Title" ),
    null,
    BaseMessages.getString( PKG, "RepositoryImportDialog.OverwriteTrans.Message", transMeta.getName() ),
    MessageDialog.QUESTION, new String[] {
      BaseMessages.getString( PKG, "System.Button.Yes" ),
      BaseMessages.getString( PKG, "System.Button.No" ) },
    1,
    BaseMessages.getString( PKG, "RepositoryImportDialog.DontAskAgain.Label" ), !askOverwrite );
  MessageDialogWithToggle.setDefaultImage( GUIResource.getInstance().getImageSpoon() );
  int answer = md.open();

  askOverwrite = !md.getToggleState();

  return ( answer & 0xFF ) == 0;
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:18,代碼來源:RepositoryImportProgressDialog.java

示例7: jobOverwritePrompt

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public boolean jobOverwritePrompt( JobMeta jobMeta ) {
  MessageDialogWithToggle md =
    new MessageDialogWithToggle(
      shell, BaseMessages.getString( PKG, "RepositoryImportDialog.OverwriteJob.Title" ), null, BaseMessages
        .getString( PKG, "RepositoryImportDialog.OverwriteJob.Message", jobMeta.getName() ),
      MessageDialog.QUESTION, new String[] {
        BaseMessages.getString( PKG, "System.Button.Yes" ),
        BaseMessages.getString( PKG, "System.Button.No" ) },
      1,
      BaseMessages.getString( PKG, "RepositoryImportDialog.DontAskAgain.Label" ),
      !askOverwrite );
  MessageDialogWithToggle.setDefaultImage( GUIResource.getInstance().getImageSpoon() );
  int answer = md.open();
  askOverwrite = !md.getToggleState();

  return ( answer & 0xFF ) == 0;
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:18,代碼來源:RepositoryImportProgressDialog.java

示例8: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	stepname = wStepname.getText(); // return value
	
	getInfo(input);
	
	if ("Y".equalsIgnoreCase(props.getCustomParameter("TABLEAU_OUTPUT_WINDOWS_WARNING", "Y"))) {
	      MessageDialogWithToggle md = new MessageDialogWithToggle(shell, BaseMessages.getString(PKG,
	          "TDEOutput.TDEWindowsWarning.DialogTitle"),
	          null, BaseMessages.getString(PKG, "TDEOutput.TDEWindowsWarning.DialogMessage", Const.CR) + Const.CR,
	          MessageDialog.WARNING, new String[] { BaseMessages.getString(PKG,
	              "TDEOutput.TDEWindowsWarning.Option1") },
	          0, BaseMessages.getString(PKG, "TDEOutput.TDEWindowsWarning.Option2"),
	          "N".equalsIgnoreCase(props.getCustomParameter("TABLEAU_OUTPUT_WINDOWS_WARNING", "Y"))
	      );
	      MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
	      md.open();
	      props.setCustomParameter("TABLEAU_OUTPUT_WINDOWS_WARNING", md.getToggleState() ? "N" : "Y");
	      props.saveProps();
	    }
	
	dispose();
}
 
開發者ID:cdeptula,項目名稱:tdeoutputplugin,代碼行數:26,代碼來源:TDEOutputDialog.java

示例9: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{		
	if (Const.isEmpty(wStepname.getText())) return;

       getMeta(input);

       // Show a warning (optional)
       //
       if ( "Y".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") )) //$NON-NLS-1$ //$NON-NLS-2$
       {
           MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
                Messages.getString("MergeJoinDialog.InputNeedSort.DialogTitle"),  //$NON-NLS-1$
                null,
                Messages.getString("MergeJoinDialog.InputNeedSort.DialogMessage", Const.CR )+Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
                MessageDialog.WARNING,
                new String[] { Messages.getString("MergeJoinDialog.InputNeedSort.Option1") }, //$NON-NLS-1$
                0,
                Messages.getString("MergeJoinDialog.InputNeedSort.Option2"), //$NON-NLS-1$
                "N".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") ) //$NON-NLS-1$ //$NON-NLS-2$
           );
           MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
           md.open();
           props.setCustomParameter(STRING_SORT_WARNING_PARAMETER, md.getToggleState()?"N":"Y"); //$NON-NLS-1$ //$NON-NLS-2$
           props.saveProps();
       }

       
       stepname = wStepname.getText(); // return value
	
	dispose();
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:32,代碼來源:MergeJoinDialog.java

示例10: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	int nrfields = wFields.nrNonEmpty();
	input.allocate(nrfields);

	for (int i=0;i<nrfields;i++)
	{
		TableItem item = wFields.getNonEmpty(i);
		input.getCompareFields()[i] = item.getText(1);
           input.getCaseInsensitive()[i] = "Y".equalsIgnoreCase(item.getText(2)); //$NON-NLS-1$
	}
	
	input.setCountField(wCountField.getText());
	input.setCountRows( wCount.getSelection() );
	
	stepname = wStepname.getText(); // return value
	
       if ( "Y".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") )) //$NON-NLS-1$ //$NON-NLS-2$
       {
           MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
                Messages.getString("UniqueRowsDialog.InputNeedSort.DialogTitle"),  //$NON-NLS-1$
                null,
                Messages.getString("UniqueRowsDialog.InputNeedSort.DialogMessage", Const.CR )+Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
                MessageDialog.WARNING,
                new String[] { Messages.getString("UniqueRowsDialog.InputNeedSort.Option1") }, //$NON-NLS-1$
                0,
                Messages.getString("UniqueRowsDialog.InputNeedSort.Option2"), //$NON-NLS-1$
                "N".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") ) //$NON-NLS-1$ //$NON-NLS-2$
           );
           MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
           md.open();
           props.setCustomParameter(STRING_SORT_WARNING_PARAMETER, md.getToggleState()?"N":"Y"); //$NON-NLS-1$ //$NON-NLS-2$
           props.saveProps();
       }

       
	dispose();
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:41,代碼來源:UniqueRowsDialog.java

示例11: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	stepname = wStepname.getText(); // return value
	
       int nrfields = wFields.nrNonEmpty();

       input.allocate(nrfields);
       
       for (int i=0;i<nrfields;i++)
       {
           TableItem ti = wFields.getNonEmpty(i);
           input.getFieldName()[i] = ti.getText(1);
           input.getAscending()[i] = Messages.getString("System.Combo.Yes").equalsIgnoreCase(ti.getText(2));
       }
       
       // Show a warning (optional)
       //
       if ( "Y".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") )) //$NON-NLS-1$ //$NON-NLS-2$
       {
           MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
                Messages.getString("SortedMergeDialog.InputNeedSort.DialogTitle"),  //$NON-NLS-1$
                null,
                Messages.getString("SortedMergeDialog.InputNeedSort.DialogMessage", Const.CR )+Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
                MessageDialog.WARNING,
                new String[] { Messages.getString("SortedMergeDialog.InputNeedSort.Option1") }, //$NON-NLS-1$
                0,
                Messages.getString("SortedMergeDialog.InputNeedSort.Option2"), //$NON-NLS-1$
                "N".equalsIgnoreCase( props.getCustomParameter(STRING_SORT_WARNING_PARAMETER, "Y") ) //$NON-NLS-1$ //$NON-NLS-2$
           );
           MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
           md.open();
           props.setCustomParameter(STRING_SORT_WARNING_PARAMETER, md.getToggleState()?"N":"Y"); //$NON-NLS-1$ //$NON-NLS-2$
           props.saveProps();
       }

	dispose();
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:40,代碼來源:SortedMergeDialog.java

示例12: verifyCopyDistribute

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public void verifyCopyDistribute(TransMeta transMeta, StepMeta fr) {
	List<StepMeta> nextSteps = transMeta.findNextSteps(fr);
	int nrNextSteps = nextSteps.size();

	// don't show it for 3 or more hops, by then you should have had the
	// message
	if (nrNextSteps == 2) {
		boolean distributes = false;

		if (props.showCopyOrDistributeWarning()) {
			MessageDialogWithToggle md = new MessageDialogWithToggle(shell, Messages.getString("System.Warning"),// "Warning!"
					null, Messages.getString("Spoon.Dialog.CopyOrDistribute.Message", fr.getName(), Integer.toString(nrNextSteps)), MessageDialog.WARNING, new String[] { Messages.getString("Spoon.Dialog.CopyOrDistribute.Copy"),
							Messages.getString("Spoon.Dialog.CopyOrDistribute.Distribute") },// "Copy
					// Distribute
					0, Messages.getString("Spoon.Message.Warning.NotShowWarning"),// "Please, don't show this warning anymore."
					!props.showCopyOrDistributeWarning());
			MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
			int idx = md.open();
			props.setShowCopyOrDistributeWarning(!md.getToggleState());
			props.saveProps();

			distributes = (idx & 0xFF) == 1;
		}

		if (distributes) {
			fr.setDistributes(true);
		} else {
			fr.setDistributes(false);
		}

		refreshTree();
		refreshGraph();
	}
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:35,代碼來源:Spoon.java

示例13: transOverwritePrompt

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public boolean transOverwritePrompt(TransMeta transMeta) {
  MessageDialogWithToggle md = new MessageDialogWithToggle(shell, BaseMessages.getString(PKG, "RepositoryImportDialog.OverwriteTrans.Title"), null, BaseMessages.getString(PKG, "RepositoryImportDialog.OverwriteTrans.Message", transMeta.getName()),
      MessageDialog.QUESTION, new String[] { BaseMessages.getString(PKG, "System.Button.Yes"), BaseMessages.getString(PKG, "System.Button.No") }, 1, BaseMessages.getString(PKG, "RepositoryImportDialog.DontAskAgain.Label"), !askOverwrite);
  MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
  int answer = md.open();
  
  askOverwrite = !md.getToggleState();
  
  return (answer & 0xFF) == 0;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:11,代碼來源:RepositoryImportProgressDialog.java

示例14: jobOverwritePrompt

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
public boolean jobOverwritePrompt(JobMeta jobMeta) {
  MessageDialogWithToggle md = new MessageDialogWithToggle(shell, BaseMessages.getString(PKG, "RepositoryImportDialog.OverwriteJob.Title"), null, BaseMessages.getString(PKG, "RepositoryImportDialog.OverwriteJob.Message", jobMeta.getName()),
      MessageDialog.QUESTION, new String[] { BaseMessages.getString(PKG, "System.Button.Yes"), BaseMessages.getString(PKG, "System.Button.No") }, 1, BaseMessages.getString(PKG, "RepositoryImportDialog.DontAskAgain.Label"), !askOverwrite);
  MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
  int answer = md.open();
  askOverwrite = !md.getToggleState();

  return (answer & 0xFF) == 0;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:10,代碼來源:RepositoryImportProgressDialog.java

示例15: ok

import org.eclipse.jface.dialogs.MessageDialogWithToggle; //導入方法依賴的package包/類
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;
	stepname = wStepname.getText(); // return value

    input.setStart(wStart.getText());
    input.setIncrement(wIncrement.getText());
	input.setResultFieldName( wResult.getText() );
	
	int nrfields = wFields.nrNonEmpty();
	input.allocate(nrfields);
	for (int i=0;i<nrfields;i++)
	{
		TableItem ti = wFields.getNonEmpty(i);
		input.getFieldName()[i] = ti.getText(1);
	}
	
	
       if ( "Y".equalsIgnoreCase( props.getCustomParameter(STRING_CHANGE_SEQUENCE_WARNING_PARAMETER, "Y") )) //$NON-NLS-1$ //$NON-NLS-2$
       {
           MessageDialogWithToggle md = new MessageDialogWithToggle(shell, 
                BaseMessages.getString(PKG, "FieldsChangeSequenceDialog.InputNeedSort.DialogTitle"),  //$NON-NLS-1$
                null,
                BaseMessages.getString(PKG, "FieldsChangeSequenceDialog.InputNeedSort.DialogMessage", Const.CR )+Const.CR, //$NON-NLS-1$ //$NON-NLS-2$
                MessageDialog.WARNING,
                new String[] { BaseMessages.getString(PKG, "FieldsChangeSequenceDialog.InputNeedSort.Option1") }, //$NON-NLS-1$
                0,
                BaseMessages.getString(PKG, "FieldsChangeSequenceDialog.InputNeedSort.Option2"), //$NON-NLS-1$
                "N".equalsIgnoreCase( props.getCustomParameter(STRING_CHANGE_SEQUENCE_WARNING_PARAMETER, "Y") ) //$NON-NLS-1$ //$NON-NLS-2$
           );
           MessageDialogWithToggle.setDefaultImage(GUIResource.getInstance().getImageSpoon());
           md.open();
           props.setCustomParameter(STRING_CHANGE_SEQUENCE_WARNING_PARAMETER, md.getToggleState()?"N":"Y"); //$NON-NLS-1$ //$NON-NLS-2$
           props.saveProps();
       }

	
	dispose();
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:40,代碼來源:FieldsChangeSequenceDialog.java


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