• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TabMapEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: removeTab

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public void removeTab(String tabText, int tabMapEntryType)
{
  TabItem tabItem = null;
	for (TabMapEntry tabMapEntry : getTabs()) {
		if (tabMapEntry.getObjectName().equals(tabText) && tabMapEntry.getObjectType()==tabMapEntryType) {
       tabItem = tabMapEntry.getTabItem();
			tabMap.remove(tabMapEntry);
			break;
		}
	}

	if(tabItem != null){
    if (!tabItem.isDisposed()){
      tabItem.dispose();
    }
	}

}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:SpoonTabsDelegate.java


示例2: getActiveMeta

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public EngineMetaInterface getActiveMeta()
{
	TabSet tabfolder = spoon.tabfolder;
	if (tabfolder == null)
		return null;
	TabItem tabItem = tabfolder.getSelected();
	if (tabItem == null)
		return null;

	// What transformation is in the active tab?
	// TransLog, TransGraph & TransHist contain the same transformation
	//
	TabMapEntry mapEntry = getTab(tabfolder.getSelected());
	EngineMetaInterface meta = null;
	if (mapEntry != null)
	{
		if (mapEntry.getObject() instanceof TransGraph)
			meta = (mapEntry.getObject()).getMeta();
		if (mapEntry.getObject() instanceof JobGraph)
			meta = (mapEntry.getObject()).getMeta();
	}

	return meta;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:25,代码来源:SpoonTabsDelegate.java


示例3: closeJob

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param transMeta
 *            the transformation to close, make sure it's ok to dispose of
 *            it BEFORE you call this.
 */
public void closeJob(JobMeta jobMeta)
{
	String tabName = spoon.delegates.tabs.makeJobGraphTabName(jobMeta);

	// Close the associated tabs...
	TabItem graphTab = spoon.delegates.tabs.findTabItem(tabName, TabMapEntry.OBJECT_TYPE_JOB_GRAPH);
	if (graphTab != null)
	{
		spoon.delegates.tabs.removeTab(graphTab);
	}

	// Also remove it from the item from the jobMap
	// Otherwise it keeps showing up in the objects tree
	// Look for the job, not the key (name might have changed)
	//
	List<String> keys = new ArrayList<String>(jobMap.keySet());
	for (String key : keys) {
		if (jobMap.get(key).equals(jobMeta)) {
			jobMap.remove(key);
		}
	}
	
	spoon.refreshTree();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:30,代码来源:SpoonJobDelegate.java


示例4: closeTransformation

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param transMeta
 *            the transformation to close, make sure it's ok to dispose of
 *            it BEFORE you call this.
 */
public synchronized void closeTransformation(TransMeta transMeta)
{
	String tabName = spoon.delegates.tabs.makeTransGraphTabName(transMeta);

	// Close the associated tabs...
	TabItem graphTab = spoon.delegates.tabs.findTabItem(tabName,
			TabMapEntry.OBJECT_TYPE_TRANSFORMATION_GRAPH);
	if (graphTab != null)
	{
		spoon.delegates.tabs.removeTab(graphTab);
	}
	
	// Also remove it from the item from the transformationMap
	// Otherwise it keeps showing up in the objects tree
	// Look for the transformation, not the key (name might have changed)
	//
	List<String> keys = new ArrayList<String>(transformationMap.keySet());
	for (String key : keys) {
		if (transformationMap.get(key).equals(transMeta)) {
			transformationMap.remove(key);
		}
	}
	
	spoon.refreshTree();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:31,代码来源:SpoonTransformationDelegate.java


示例5: findTabMapEntry

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public TabMapEntry findTabMapEntry(Object managedObject)
{
	for (TabMapEntry entry : tabMap)
	{
		if (entry.getTabItem().isDisposed()) {
			continue;
		}
		Object entryManagedObj = entry.getObject().getManagedObject();
		// make sure they are the same class before comparing them
		if (entryManagedObj != null && managedObject != null) {
 			if (entryManagedObj.getClass().equals(managedObject.getClass())) {
 			  if (entryManagedObj.equals(managedObject)) {
 			    return entry;
 			  }
 			}
		}
	}
	return null;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:SpoonTabsDelegate.java


示例6: closeJob

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param transMeta
 *            the transformation to close, make sure it's ok to dispose of
 *            it BEFORE you call this.
 */
public void closeJob(JobMeta jobMeta)
{
	// Close the associated tabs...
	//
	TabMapEntry entry = spoon.delegates.tabs.findTabMapEntry(jobMeta);
	if (entry!=null) {
		spoon.delegates.tabs.removeTab(entry);
	}
	
	// Also remove it from the item from the jobMap
	// Otherwise it keeps showing up in the objects tree
	//
	int index = jobMap.indexOf(jobMeta);
	if (index>=0) {
		jobMap.remove(index);
	}
	
	spoon.refreshTree();
	spoon.enableMenus();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:SpoonJobDelegate.java


示例7: closeTransformation

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param transMeta
 *            the transformation to close, make sure it's ok to dispose of
 *            it BEFORE you call this.
 */
public synchronized void closeTransformation(TransMeta transMeta)
{
	// Close the associated tabs...
	//
	TabMapEntry entry = spoon.delegates.tabs.findTabMapEntry(transMeta);
	if (entry!=null) {
		spoon.delegates.tabs.removeTab(entry);
	}
	
	// Also remove it from the item from the transformationMap
	// Otherwise it keeps showing up in the objects tree
	// Look for the transformation, not the key (name might have changed)
	//
	int index = transformationMap.indexOf(transMeta);
	if (index>=0) {
		transformationMap.remove(index);
	}
	
	spoon.refreshTree();
	spoon.enableMenus();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:SpoonTransformationDelegate.java


示例8: getActiveMeta

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public EngineMetaInterface getActiveMeta() {
  TabSet tabfolder = spoon.tabfolder;
  if ( tabfolder == null ) {
    return null;
  }
  TabItem tabItem = tabfolder.getSelected();
  if ( tabItem == null ) {
    return null;
  }

  // What transformation is in the active tab?
  // TransLog, TransGraph & TransHist contain the same transformation
  //
  TabMapEntry mapEntry = getTab( tabfolder.getSelected() );
  EngineMetaInterface meta = null;
  if ( mapEntry != null ) {
    if ( mapEntry.getObject() instanceof TransGraph ) {
      meta = ( mapEntry.getObject() ).getMeta();
    }
    if ( mapEntry.getObject() instanceof JobGraph ) {
      meta = ( mapEntry.getObject() ).getMeta();
    }
  }

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


示例9: findTabMapEntry

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public TabMapEntry findTabMapEntry( Object managedObject ) {
  for ( TabMapEntry entry : tabMap ) {
    if ( !entry.getTabItem().isDisposed() ) {
      Object entryManagedObj = entry.getObject().getManagedObject();
      // make sure they are the same class before comparing them
      if ( entryManagedObj != null && managedObject != null ) {
        if ( entryManagedObj.getClass().equals( managedObject.getClass() ) ) {
          if ( entryManagedObj.equals( managedObject ) ) {
            return entry;
          }
        }
      }
    }
  }
  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SpoonTabsDelegate.java


示例10: tabSelected

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的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


示例11: closeJob

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param jobMeta
 *          the transformation to close, make sure it's ok to dispose of it BEFORE you call this.
 */
public void closeJob( JobMeta jobMeta ) {
  // Close the associated tabs...
  //
  TabMapEntry entry = getSpoon().delegates.tabs.findTabMapEntry( jobMeta );
  if ( entry != null ) {
    getSpoon().delegates.tabs.removeTab( entry );
  }

  // Also remove it from the item from the jobMap
  // Otherwise it keeps showing up in the objects tree
  //
  int index = getJobList().indexOf( jobMeta );
  while ( index >= 0 ) {
    getJobList().remove( index );
    index = getJobList().indexOf( jobMeta );
  }

  getSpoon().refreshTree();
  getSpoon().enableMenus();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:SpoonJobDelegate.java


示例12: closeTransformation

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
/**
 * @param transMeta
 *          the transformation to close, make sure it's ok to dispose of it BEFORE you call this.
 */
public synchronized void closeTransformation( TransMeta transMeta ) {
  // Close the associated tabs...
  //
  TabMapEntry entry = getSpoon().delegates.tabs.findTabMapEntry( transMeta );
  if ( entry != null ) {
    getSpoon().delegates.tabs.removeTab( entry );
  }

  // Also remove it from the item from the transformationMap
  // Otherwise it keeps showing up in the objects tree
  // Look for the transformation, not the key (name might have changed)
  //
  int index = getTransformationList().indexOf( transMeta );
  while ( index >= 0 ) {
    getTransformationList().remove( index );
    index = getTransformationList().indexOf( transMeta );
  }

  getSpoon().refreshTree();
  getSpoon().enableMenus();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:26,代码来源:SpoonTransformationDelegate.java


示例13: addTransGraph

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
@Override
public void addTransGraph( TransMeta transMeta ) {
  super.addTransGraph( transMeta );
  TabMapEntry tabEntry = spoon.delegates.tabs.findTabMapEntry( transMeta );
  if ( tabEntry != null ) {
    TabItem tabItem = tabEntry.getTabItem();
    try {
      if ( ( service != null ) && ( transMeta.getObjectId() != null )
          && ( service.getTransformationLock( transMeta.getObjectId() ) != null ) ) {
        tabItem.setImage( GUIResource.getInstance().getImageLocked() );
      }
    } catch ( Exception e ) {
      throw new RuntimeException( e );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SpoonEETransformationDelegate.java


示例14: addJobGraph

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
@Override
public void addJobGraph( JobMeta jobMeta ) {
  super.addJobGraph( jobMeta );
  TabMapEntry tabEntry = spoon.delegates.tabs.findTabMapEntry( jobMeta );
  if ( tabEntry != null ) {
    TabItem tabItem = tabEntry.getTabItem();
    try {
      if ( ( service != null ) && ( jobMeta.getObjectId() != null )
          && ( service.getJobLock( jobMeta.getObjectId() ) != null ) ) {
        tabItem.setImage( GUIResource.getInstance().getImageLocked() );
      }
    } catch ( Exception e ) {
      throw new RuntimeException( e );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SpoonEEJobDelegate.java


示例15: getTab

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public TabMapEntry getTab(TabItem tabItem)
{
	for (TabMapEntry tabMapEntry : tabMap) {
		if (tabMapEntry.getTabItem().equals(tabItem)) {
			return tabMapEntry;
		}
	}
	return null;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:SpoonTabsDelegate.java


示例16: findTabItem

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public TabItem findTabItem(String tabItemText, int objectType)
{
	for (TabMapEntry entry : tabMap)
	{
		if (entry.getTabItem().isDisposed())
			continue;
		if (objectType == entry.getObjectType()
				&& entry.getTabItem().getText().equalsIgnoreCase(tabItemText))
		{
			return entry.getTabItem();
		}
	}
	return null;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:SpoonTabsDelegate.java


示例17: findJobGraphOfJob

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public JobGraph findJobGraphOfJob(JobMeta jobMeta)
{
	// Now loop over the entries in the tab-map
	for (TabMapEntry mapEntry : spoon.delegates.tabs.getTabs())
	{
		if (mapEntry.getObject() instanceof JobGraph)
		{
			JobGraph jobGraph = (JobGraph) mapEntry.getObject();
			if (jobGraph.getMeta().equals(jobMeta))
				return jobGraph;
		}
	}
	return null;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:SpoonJobDelegate.java


示例18: tabSelected

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的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


示例19: findTransGraphOfTransformation

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public TransGraph findTransGraphOfTransformation(TransMeta transMeta)
{
	// Now loop over the entries in the tab-map
	for (TabMapEntry mapEntry : spoon.delegates.tabs.getTabs())
	{
		if (mapEntry.getObject() instanceof TransGraph)
		{
			TransGraph transGraph = (TransGraph) mapEntry.getObject();
			if (transGraph.getMeta().equals(transMeta))
				return transGraph;
		}
	}
	return null;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:SpoonTransformationDelegate.java


示例20: removeTab

import org.pentaho.di.ui.spoon.TabMapEntry; //导入依赖的package包/类
public void removeTab(TabMapEntry tabMapEntry )
{
	for (TabMapEntry entry : getTabs()) {
		if (tabMapEntry.equals(entry)) {
			tabMap.remove(tabMapEntry);
		}
	}
	if (!tabMapEntry.getTabItem().isDisposed()){
	  tabMapEntry.getTabItem().dispose();
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:12,代码来源:SpoonTabsDelegate.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KeyValuePair类代码示例发布时间:2022-05-23
下一篇:
Java MessagePayloadBuilder类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap