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


Java TabItem.setImage方法代码示例

本文整理汇总了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 );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SpoonEETransformationDelegate.java

示例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 );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:SpoonEEJobDelegate.java

示例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;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:34,代码来源:Spoon.java

示例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;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:39,代码来源:Spoon.java


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