use of org.pentaho.di.ui.spoon.SpoonSlave in project pentaho-kettle by pentaho.
the class SpoonSlaveDelegate method addSpoonSlave.
public void addSpoonSlave(SlaveServer slaveServer) {
TabSet tabfolder = spoon.tabfolder;
// See if there is a SpoonSlave for this slaveServer...
String tabName = spoon.delegates.tabs.makeSlaveTabName(slaveServer);
TabMapEntry tabMapEntry = spoon.delegates.tabs.findTabMapEntry(tabName, ObjectType.SLAVE_SERVER);
if (tabMapEntry == null) {
SpoonSlave spoonSlave = new SpoonSlave(tabfolder.getSwtTabset(), SWT.NONE, spoon, slaveServer);
PropsUI props = PropsUI.getInstance();
TabItem tabItem = new TabItem(tabfolder, tabName, tabName, props.getSashWeights());
tabItem.setToolTipText("Status of slave server : " + slaveServer.getName() + " : " + slaveServer.getServerAndPort());
tabItem.setControl(spoonSlave);
tabMapEntry = new TabMapEntry(tabItem, null, tabName, null, null, spoonSlave, ObjectType.SLAVE_SERVER);
spoon.delegates.tabs.addTab(tabMapEntry);
}
int idx = tabfolder.indexOf(tabMapEntry.getTabItem());
tabfolder.setSelected(idx);
}
Aggregations