本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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()
}
示例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 "";
}
示例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();
}
示例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$
}
}
示例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 "";
}
示例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 "";
}
示例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()
}
示例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 "";
}
示例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 "";
}
示例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();
}