本文整理汇总了Java中org.pentaho.di.ui.spoon.TabMapEntry类的典型用法代码示例。如果您正苦于以下问题:Java TabMapEntry类的具体用法?Java TabMapEntry怎么用?Java TabMapEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TabMapEntry类属于org.pentaho.di.ui.spoon包,在下文中一共展示了TabMapEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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()
}
示例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();
}
示例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();
}
示例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 );
}
}
}
示例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 );
}
}
}
示例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;
}