本文整理汇总了Java中org.eclipse.swt.widgets.TableItem.getText方法的典型用法代码示例。如果您正苦于以下问题:Java TableItem.getText方法的具体用法?Java TableItem.getText怎么用?Java TableItem.getText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.TableItem
的用法示例。
在下文中一共展示了TableItem.getText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearTableItemBgColor
import org.eclipse.swt.widgets.TableItem; //导入方法依赖的package包/类
private void clearTableItemBgColor(TableViewer debugDataViewer){
if(debugDataViewer == null){
return;
}
Table table = debugDataViewer.getTable();
TableItem[] tableItems = table.getItems();
for(int i=0;i<tableItems.length;i++){
TableItem tableItem = tableItems[i];
for(int j=1;j <= table.getColumnCount()-1;j++){
tableItem.getText(j);
tableItem.setBackground(j, Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
}
}
}
示例2: getItemId
import org.eclipse.swt.widgets.TableItem; //导入方法依赖的package包/类
private Id getItemId(TableItem item) {
String scheme = item.getText(0).trim();
String id = item.getText(1);
Id itemId = new Id(scheme, id);
return itemId;
}
示例3: createBapiTransactions
import org.eclipse.swt.widgets.TableItem; //导入方法依赖的package包/类
private void createBapiTransactions(final TableItem[] items)
{
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = display.getActiveShell();
if (shell != null) {
try {
shell.setCursor(waitCursor);
for (int i=0; i < items.length; i++) {
TableItem item = items[i];
String bapiName = item.getText(0);
String bapiDesc = item.getText(1);
ConvertigoPlugin.logDebug("Creating transaction for BAPI '"+bapiName+"' ...");
sapConnector.removeSerializedData(bapiName);
SapJcoTransaction sapJcoTransaction = SapJcoConnector.createSapJcoTransaction(sapConnector, bapiName);
if (sapJcoTransaction != null) {
Transaction transaction = sapConnector.getTransactionByName(bapiName);
if (transaction != null) {
try {
File xsdFile = new File(transaction.getSchemaFilePath());
if (xsdFile.exists()) {
xsdFile.delete();
}
}
catch (Exception e) {}
sapConnector.remove(transaction);
}
sapJcoTransaction.setComment(bapiDesc);
sapConnector.add(sapJcoTransaction);
fireObjectChanged(new CompositeEvent(sapConnector));
ConvertigoPlugin.logDebug("Transaction added.");
}
}
} catch (Exception ee) {
ConvertigoPlugin.logException(ee, "Error while creating transaction(s)");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
}
示例4: createSqlTransactions
import org.eclipse.swt.widgets.TableItem; //导入方法依赖的package包/类
protected void createSqlTransactions(final TableItem[] items) {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = display.getActiveShell();
if (shell != null) {
try {
shell.setCursor(waitCursor);
for (int i=0; i < items.length; i++) {
TableItem item = items[i];
String callableName = item.getText(0);
String callableDesc = item.getText(1);
String specific_name = (String) item.getData("specific_name");
ConvertigoPlugin.logDebug("Creating transaction for CALL '"+callableName+"' ...");
if (specific_name.isEmpty()) {
specific_name = callableName;
}
SqlTransaction sqlTransaction = SqlConnector.createSqlTransaction(sqlConnector, callableName, specific_name);
if (sqlTransaction != null) {
Transaction transaction = sqlConnector.getTransactionByName(sqlTransaction.getName());
if (transaction != null) {
try {
File xsdFile = new File(transaction.getSchemaFilePath());
if (xsdFile.exists()) {
xsdFile.delete();
}
}
catch (Exception e) {}
sqlConnector.remove(transaction);
}
sqlTransaction.setComment(callableDesc);
sqlConnector.add(sqlTransaction);
fireObjectChanged(new CompositeEvent(sqlConnector));
ConvertigoPlugin.logDebug("Transaction added.");
}
}
} catch (Exception ee) {
ConvertigoPlugin.logException(ee, "Error while creating transaction(s)");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
}