当前位置: 首页>>代码示例>>Java>>正文


Java SpoonInterface类代码示例

本文整理汇总了Java中org.pentaho.di.core.gui.SpoonInterface的典型用法代码示例。如果您正苦于以下问题:Java SpoonInterface类的具体用法?Java SpoonInterface怎么用?Java SpoonInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SpoonInterface类属于org.pentaho.di.core.gui包,在下文中一共展示了SpoonInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: editTrans

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void editTrans()
{
	// Load the transformation again to make sure it's still there and
	// refreshed
	// It's an extra check to make sure it's still OK...

	try
	{
		loadTransformation();

		// If we're still here, mappingTransMeta is valid.
		SpoonInterface spoon = SpoonFactory.getInstance();
		if (spoon != null)
		{
			spoon.addTransGraph(mappingTransMeta);
		}

	} catch (KettleException e)
	{
		new ErrorDialog(shell, Messages.getString("MappingDialog.ErrorShowingTransformation.Title"),
				Messages.getString("MappingDialog.ErrorShowingTransformation.Message"), e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:MappingDialog.java

示例2: editTrans

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void editTrans()
{
	// Load the transformation again to make sure it's still there and
	// refreshed
	// It's an extra check to make sure it's still OK...
  //
	try
	{
		loadTransformation();

		// If we're still here, mappingTransMeta is valid.
		//
		SpoonInterface spoon = SpoonFactory.getInstance();
		if (spoon != null) {
			spoon.addTransGraph(mappingTransMeta);
		}
	} catch (KettleException e)
	{
		new ErrorDialog(shell, BaseMessages.getString(PKG, "MappingDialog.ErrorShowingTransformation.Title"),
				BaseMessages.getString(PKG, "MappingDialog.ErrorShowingTransformation.Message"), e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:MappingDialog.java

示例3: editTrans

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void editTrans()
{
	// Load the transformation again to make sure it's still there and
	// refreshed
	// It's an extra check to make sure it's still OK...
  //
	try
	{
		loadTransformation();

		// If we're still here, mappingTransMeta is valid.
		//
		SpoonInterface spoon = SpoonFactory.getInstance();
		if (spoon != null) {
			spoon.addTransGraph(mappingTransMeta);
		}
	} catch (KettleException e)
	{
		new ErrorDialog(shell, BaseMessages.getString(PKG, "SingleThreaderDialog.ErrorShowingTransformation.Title"),
				BaseMessages.getString(PKG, "SingleThreaderDialog.ErrorShowingTransformation.Message"), e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:SingleThreaderDialog.java

示例4: editTrans

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void editTrans() {
  // Load the transformation again to make sure it's still there and
  // refreshed
  // It's an extra check to make sure it's still OK...
  //
  try {
    loadTransformation();

    // If we're still here, mappingTransMeta is valid.
    //
    SpoonInterface spoon = SpoonFactory.getInstance();
    if (spoon != null) {
      spoon.addTransGraph(injectTransMeta);
    }
  } catch (KettleException e) {
    new ErrorDialog(shell, BaseMessages.getString(PKG, "MetaInjectDialog.ErrorShowingTransformation.Title"), BaseMessages.getString(PKG, "MetaInjectDialog.ErrorShowingTransformation.Message"), e);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:MetaInjectDialog.java

示例5: editJob

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void editJob()
{
	// Load the transformation again to make sure it's still there and
	// refreshed
	// It's an extra check to make sure it's still OK...
  //
	try
	{
		loadJob();

		// If we're still here, jobExecutorMeta is valid.
		//
		SpoonInterface spoon = SpoonFactory.getInstance();
		if (spoon != null) {
			spoon.addJobGraph(executorJobMeta);
		}
	} catch (KettleException e)
	{
		new ErrorDialog(shell, BaseMessages.getString(PKG, "JobExecutorDialog.ErrorShowingJob.Title"),
				BaseMessages.getString(PKG, "JobExecutorDialog.ErrorShowingJob.Message"), e);
	}
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:23,代码来源:JobExecutorDialog.java

示例6: tabSelected

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public void tabSelected( TabItem item ) {
  // See which core objects to show
  //
  for ( TabMapEntry entry : tabMap ) {
    boolean isAbstractGraph = ( entry.getObject() instanceof AbstractGraph );
    if ( item.equals( entry.getTabItem() ) ) {
      if ( isAbstractGraph ) {
        EngineMetaInterface meta = entry.getObject().getMeta();
        if ( meta != null ) {
          meta.setInternalKettleVariables();
        }
        if ( spoon.getCoreObjectsState() != SpoonInterface.STATE_CORE_OBJECTS_SPOON ) {
          spoon.refreshCoreObjects();
        }
        ( (AbstractGraph) entry.getObject() ).setFocus();
      }
      break;
    }
  }

  // Also refresh the tree
  spoon.refreshTree();
  spoon.setShellText(); // calls also enableMenus() and markTabsChanged()
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:SpoonTabsDelegate.java

示例7: Alert

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public static String Alert(Context actualContext, Scriptable actualObject, Object[] ArgList, Function FunctionContext){
	
	SpoonInterface spoon = SpoonFactory.getInstance();
	if( ArgList.length==1 && spoon != null ) 
	{
		String strMessage = Context.toString(ArgList[0]);
		spoon.messageBox(strMessage, "Alert", false, Const.INFO);
	}
	
	return "";
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:12,代码来源:ScriptValuesAddedFunctions.java

示例8: tabSelected

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public void tabSelected(TabItem item)
{
	List<TabMapEntry> collection = spoon.delegates.tabs.getTabs();

	// See which core objects to show
	//
	for (TabMapEntry entry : collection)
	{
		if (item.equals(entry.getTabItem()))
		{
			// TabItemInterface itemInterface = entry.getObject();

			//
			// Another way to implement this may be to keep track of the
			// state of the core object tree in method
			// addCoreObjectsToTree()
			//
			if (entry.getObject() instanceof TransGraph || entry.getObject() instanceof JobGraph)
			{
				EngineMetaInterface meta = entry.getObject().getMeta();
				if (meta != null)
				{
					meta.setInternalKettleVariables();
				}
				if (spoon.getCoreObjectsState() != SpoonInterface.STATE_CORE_OBJECTS_SPOON)
				{
					spoon.refreshCoreObjects();
				}
			}
		}
	}

	// Also refresh the tree
	spoon.refreshTree();
	spoon.enableMenus();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:SpoonTransformationDelegate.java

示例9: showOptionsHelpText

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
private void showOptionsHelpText()
{
    DatabaseMeta meta = new DatabaseMeta();
    try
    {
        getInfo(meta);
        String helpText = meta.getExtraOptionsHelpText();
        if (Const.isEmpty(helpText)) return;

        // Try to open a new tab in the Spoon editor.
        // If spoon is not available, not in the classpath or can't open the tab, we show the URL in a dialog
        // 
        boolean openedTab = false;
        try
        {
        	SpoonInterface spoon = SpoonFactory.getInstance();
            if (spoon != null)
            {
                openedTab = spoon.addSpoonBrowser(Messages.getString("DatabaseDialog.JDBCOptions.Tab", meta.getDatabaseTypeDesc()), helpText);
            }
        }
        catch (Throwable t)
        {
        }
        if (!openedTab)
        {

            EnterTextDialog dialog = new EnterTextDialog(shell,
                    Messages.getString("DatabaseDialog.HelpText.title"), Messages.getString("DatabaseDialog.HelpText.description", meta.getDatabaseTypeDesc()), helpText, true); //$NON-NLS-1$ //$NON-NLS-2$
            dialog.setReadOnly();
            dialog.open();
        }
    }
    catch (KettleException e)
    {
        new ErrorDialog(shell,
                Messages.getString("DatabaseDialog.ErrorHelpText.title"), Messages.getString("DatabaseDialog.ErrorHelpText.description"), e); //$NON-NLS-1$ //$NON-NLS-2$
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:40,代码来源:ClassicDatabaseDialog.java

示例10: Alert

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public static String Alert(ScriptEngine actualContext, Bindings actualObject, Object[] ArgList, Object FunctionContext){
	
	SpoonInterface spoon = SpoonFactory.getInstance();
	if( ArgList.length==1 && spoon != null ) 
	{
		String strMessage = (String) ArgList[0];
		spoon.messageBox(strMessage, "Alert", false, Const.INFO);
	}
	
	return "";
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:12,代码来源:ScriptAddedFunctions.java

示例11: Alert

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public static String Alert(Context actualContext, Scriptable actualObject, Object[] ArgList, Function FunctionContext){
	
	SpoonInterface spoon = SpoonFactory.getInstance();
	if( ArgList.length==1 && spoon != null ) 
	{
		String strMessage = Context.toString(ArgList[0]);
		boolean ok = spoon.messageBox(strMessage, "Alert", true, Const.INFO);
		if (!ok) {
		  throw new RuntimeException("Alert dialog cancelled by user.");
		}
	}
	
	return "";
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:15,代码来源:ScriptValuesAddedFunctions.java

示例12: tabSelected

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public void tabSelected(TabItem item)
{
	ArrayList<TabMapEntry> collection = new ArrayList<TabMapEntry>(tabMap);

	// See which core objects to show
	//
	for (TabMapEntry entry : collection)
	{
		boolean isTrans = (entry.getObject() instanceof TransGraph);
		
		if (item.equals(entry.getTabItem()))
		{
			if (isTrans || entry.getObject() instanceof JobGraph)
			{
				EngineMetaInterface meta = entry.getObject().getMeta();
				if (meta != null)
				{
					meta.setInternalKettleVariables();
				}
				if (spoon.getCoreObjectsState() != SpoonInterface.STATE_CORE_OBJECTS_SPOON)
				{
					spoon.refreshCoreObjects();
				}
			}
			
			if (entry.getObject() instanceof JobGraph) {
				((JobGraph)entry.getObject()).setFocus();
			} else if (entry.getObject() instanceof TransGraph) {
				((TransGraph)entry.getObject()).setFocus();
			}
			
			break;
		}
	}

	// Also refresh the tree
	spoon.refreshTree();
	spoon.setShellText(); // calls also enableMenus() and markTabsChanged()
	
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:41,代码来源:SpoonTabsDelegate.java

示例13: Alert

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public static String Alert( ScriptEngine actualContext, Bindings actualObject, Object[] ArgList,
  Object FunctionContext ) {

  SpoonInterface spoon = SpoonFactory.getInstance();
  if ( ArgList.length == 1 && spoon != null ) {
    String strMessage = (String) ArgList[0];
    spoon.messageBox( strMessage, "Alert", false, Const.INFO );
  }

  return "";
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:ScriptAddedFunctions.java

示例14: Alert

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public static String Alert( Context actualContext, Scriptable actualObject, Object[] ArgList,
  Function FunctionContext ) {

  SpoonInterface spoon = SpoonFactory.getInstance();
  if ( ArgList.length == 1 && spoon != null ) {
    String strMessage = Context.toString( ArgList[0] );
    boolean ok = spoon.messageBox( strMessage, "Alert", true, Const.INFO );
    if ( !ok ) {
      throw new RuntimeException( "Alert dialog cancelled by user." );
    }
  }

  return "";
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:ScriptValuesAddedFunctions.java

示例15: tabSelected

import org.pentaho.di.core.gui.SpoonInterface; //导入依赖的package包/类
public void tabSelected( TabItem item ) {
  List<TabMapEntry> collection = spoon.delegates.tabs.getTabs();

  // See which core objects to show
  //
  for ( TabMapEntry entry : collection ) {
    if ( item.equals( entry.getTabItem() ) ) {
      // TabItemInterface itemInterface = entry.getObject();

      //
      // Another way to implement this may be to keep track of the
      // state of the core object tree in method
      // addCoreObjectsToTree()
      //
      if ( entry.getObject() instanceof TransGraph || entry.getObject() instanceof JobGraph ) {
        EngineMetaInterface meta = entry.getObject().getMeta();
        if ( meta != null ) {
          meta.setInternalKettleVariables();
        }
        if ( spoon.getCoreObjectsState() != SpoonInterface.STATE_CORE_OBJECTS_SPOON ) {
          spoon.refreshCoreObjects();
        }
      }
    }
  }

  // Also refresh the tree
  spoon.refreshTree();
  spoon.enableMenus();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:SpoonTransformationDelegate.java


注:本文中的org.pentaho.di.core.gui.SpoonInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。