本文整理汇总了Java中org.pentaho.xul.swt.tab.TabItem类的典型用法代码示例。如果您正苦于以下问题:Java TabItem类的具体用法?Java TabItem怎么用?Java TabItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TabItem类属于org.pentaho.xul.swt.tab包,在下文中一共展示了TabItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeTab
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的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.xul.swt.tab.TabItem; //导入依赖的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.xul.swt.tab.TabItem; //导入依赖的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.xul.swt.tab.TabItem; //导入依赖的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: refreshGraph
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public void refreshGraph() {
if (shell.isDisposed())
return;
TabItem tabItem = tabfolder.getSelected();
if (tabItem == null)
return;
TabMapEntry tabMapEntry = delegates.tabs.getTab(tabItem);
if (tabMapEntry.getObject() instanceof TransGraph) {
TransGraph transGraph = (TransGraph) tabMapEntry.getObject();
transGraph.redraw();
}
if (tabMapEntry.getObject() instanceof JobGraph) {
JobGraph jobGraph = (JobGraph) tabMapEntry.getObject();
jobGraph.redraw();
}
setShellText();
}
示例6: getActiveMeta
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public EngineMetaInterface getActiveMeta() {
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 = delegates.tabs.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;
}
示例7: refreshGraph
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public void refreshGraph() {
if (shell.isDisposed())
return;
TabItem tabItem = tabfolder.getSelected();
if (tabItem == null)
return;
TabMapEntry tabMapEntry = delegates.tabs.getTab(tabItem);
if (tabMapEntry!=null) {
if (tabMapEntry.getObject() instanceof TransGraph) {
TransGraph transGraph = (TransGraph) tabMapEntry.getObject();
transGraph.redraw();
}
if (tabMapEntry.getObject() instanceof JobGraph) {
JobGraph jobGraph = (JobGraph) tabMapEntry.getObject();
jobGraph.redraw();
}
}
setShellText();
}
示例8: getActiveTabitem
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public TabItemInterface getActiveTabitem() {
if (tabfolder == null)
return null;
TabItem tabItem = tabfolder.getSelected();
if (tabItem == null)
return null;
if(delegates != null && delegates.tabs != null) {
TabMapEntry mapEntry = delegates.tabs.getTab(tabItem);
if (mapEntry!=null) {
return mapEntry.getObject();
} else {
return null;
}
}
return null;
}
示例9: getActiveMeta
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public EngineMetaInterface getActiveMeta() {
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 = ((Spoon) SpoonFactory.getInstance()).delegates.tabs.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;
}
示例10: getActiveMeta
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的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;
}
示例11: tabSelected
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的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()
}
示例12: refreshGraph
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public void refreshGraph() {
if ( shell.isDisposed() ) {
return;
}
TabItem tabItem = tabfolder.getSelected();
if ( tabItem == null ) {
return;
}
TabMapEntry tabMapEntry = delegates.tabs.getTab( tabItem );
if ( tabMapEntry != null ) {
if ( tabMapEntry.getObject() instanceof TransGraph ) {
TransGraph transGraph = (TransGraph) tabMapEntry.getObject();
transGraph.redraw();
}
if ( tabMapEntry.getObject() instanceof JobGraph ) {
JobGraph jobGraph = (JobGraph) tabMapEntry.getObject();
jobGraph.redraw();
}
}
setShellText();
}
示例13: getActiveTabitem
import org.pentaho.xul.swt.tab.TabItem; //导入依赖的package包/类
public TabItemInterface getActiveTabitem() {
if ( tabfolder == null ) {
return null;
}
TabItem tabItem = tabfolder.getSelected();
if ( tabItem == null ) {
return null;
}
if ( delegates != null && delegates.tabs != null ) {
TabMapEntry mapEntry = delegates.tabs.getTab( tabItem );
if ( mapEntry != null ) {
return mapEntry.getObject();
} else {
return null;
}
}
return null;
}
示例14: 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 );
}
}
}
示例15: 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 );
}
}
}