本文整理汇总了Java中org.pentaho.xul.swt.tab.TabItem.setImage方法的典型用法代码示例。如果您正苦于以下问题:Java TabItem.setImage方法的具体用法?Java TabItem.setImage怎么用?Java TabItem.setImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.xul.swt.tab.TabItem
的用法示例。
在下文中一共展示了TabItem.setImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTransGraph
import org.pentaho.xul.swt.tab.TabItem; //导入方法依赖的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 );
}
}
}
示例2: addJobGraph
import org.pentaho.xul.swt.tab.TabItem; //导入方法依赖的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 );
}
}
}
示例3: saveFileAs
import org.pentaho.xul.swt.tab.TabItem; //导入方法依赖的package包/类
public boolean saveFileAs(EngineMetaInterface meta) throws KettleException {
boolean saved = false;
if (log.isBasic())
log.logBasic(BaseMessages.getString(PKG, "Spoon.Log.SaveAs"));// "Save as..."
String activePerspectiveId = SpoonPerspectiveManager.getInstance().getActivePerspective().getId();
boolean etlPerspective = activePerspectiveId.equals(MainSpoonPerspective.ID);
if (rep != null && etlPerspective) {
meta.setObjectId(null);
saved = saveToRepository(meta, true);
} else {
saved = saveXMLFile(meta, false);
}
delegates.tabs.renameTabs(); // filename or name of transformation might
// have changed.
refreshTree();
if(saved && (meta instanceof TransMeta || meta instanceof JobMeta)) {
TabMapEntry tabEntry = delegates.tabs.findTabMapEntry(meta);
TabItem tabItem = tabEntry.getTabItem();
if(meta.getFileType().equals(LastUsedFile.FILE_TYPE_TRANSFORMATION)) {
tabItem.setImage(GUIResource.getInstance().getImageTransGraph());
} else if(meta.getFileType().equals(LastUsedFile.FILE_TYPE_JOB)) {
tabItem.setImage(GUIResource.getInstance().getImageJobGraph());
}
}
// Update menu status for the newly saved object
enableMenus();
return saved;
}
示例4: saveFileAs
import org.pentaho.xul.swt.tab.TabItem; //导入方法依赖的package包/类
public boolean saveFileAs( EngineMetaInterface meta ) throws KettleException {
boolean saved;
if ( getLog().isBasic() ) {
getLog().logBasic( BaseMessages.getString( PKG, "Spoon.Log.SaveAs" ) ); // "Save as..."
}
( (AbstractMeta) meta ).setRepository( rep );
( (AbstractMeta) meta ).setMetaStore( metaStore );
String activePerspectiveId = SpoonPerspectiveManager.getInstance().getActivePerspective().getId();
boolean etlPerspective = activePerspectiveId.equals( MainSpoonPerspective.ID );
if ( rep != null && etlPerspective ) {
meta.setObjectId( null );
meta.setFilename( null );
saved = saveToRepository( meta, true );
} else {
saved = saveXMLFile( meta, false );
}
delegates.tabs.renameTabs(); // filename or name of transformation might
// have changed.
refreshTree();
if ( saved && ( meta instanceof TransMeta || meta instanceof JobMeta ) ) {
TabMapEntry tabEntry = delegates.tabs.findTabMapEntry( meta );
TabItem tabItem = tabEntry.getTabItem();
if ( meta.getFileType().equals( LastUsedFile.FILE_TYPE_TRANSFORMATION ) ) {
tabItem.setImage( GUIResource.getInstance().getImageTransGraph() );
} else if ( meta.getFileType().equals( LastUsedFile.FILE_TYPE_JOB ) ) {
tabItem.setImage( GUIResource.getInstance().getImageJobGraph() );
}
}
// Update menu status for the newly saved object
enableMenus();
return saved;
}