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


Java TableColumn.getText方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.TableColumn.getText方法的典型用法代码示例。如果您正苦于以下问题:Java TableColumn.getText方法的具体用法?Java TableColumn.getText怎么用?Java TableColumn.getText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.TableColumn的用法示例。

在下文中一共展示了TableColumn.getText方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getForeground

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public Color getForeground(Object element, int columnIndex) {
	if (element instanceof TrpJobStatus) {
		TrpJobStatus job = (TrpJobStatus) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();
		
		if (ct.equals(JobOverviewWidget.STATE_COL)) {
			if (job.getState().equals(TrpJobStatus.FINISHED)) {
				return Colors.getSystemColor(SWT.COLOR_DARK_GREEN);
			}
			else if (job.getState().equals(TrpJobStatus.FAILED)) {
				return Colors.getSystemColor(SWT.COLOR_RED);
			}
			else {
				return Colors.getSystemColor(SWT.COLOR_DARK_YELLOW);
			}
		}
	}		
	
	return null;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:23,代码来源:JobOverviewLabelProvider.java


示例2: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
	if (element instanceof TrpDocDir) {
		TrpDocDir dir = (TrpDocDir) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();

		if (ct.equals(UploadDialogUltimate.DIRECTORY_COL)) {
			return dir.getName();
		} else if (ct.equals(UploadDialogUltimate.TITLE_COL)) {
			return dir.getName();
		}
		else if (ct.equals(UploadDialogUltimate.NR_OF_FILES_COL)) {
			return ""+dir.getNrOfFiles();
		} else if (ct.equals(UploadDialogUltimate.CREATE_DATE_COL)) {
			return ""+dir.getCreateDate().toString();
		}
	}

	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:22,代码来源:DocDirTableLabelProvider.java


示例3: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override
public String getColumnText(Object element, int columnIndex) {
	//logger.trace("get column text: "+element+" id: "+columnIndex);
	
	if (element instanceof TrpHtr) {
		TrpHtr htr = (TrpHtr) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();
		
		if (ct.equals(HtrTableWidget.HTR_NAME_COL)) {
			return htr.getName();
		} else if (ct.equals(HtrTableWidget.HTR_LANG_COL)) {
			return htr.getLanguage();
		} else if (ct.equals(HtrTableWidget.HTR_ID_COL)) {
			return ""+htr.getHtrId();
		} else if (ct.equals(HtrTableWidget.HTR_CREATOR_COL)) {
			return htr.getUserName() == null ? "Unknown" : htr.getUserName();
		}
	}
	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:23,代码来源:HtrTableLabelProvider.java


示例4: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override
public String getColumnText(Object element, int columnIndex) {
	//logger.trace("get column text: "+element+" id: "+columnIndex);
	
	if (element instanceof DataSetEntry) {
		DataSetEntry d = (DataSetEntry) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();
		
		if (ct.equals(DataSetTableWidget.ID_COL)) {
			return ""+d.getId();
		} else if (ct.equals(DataSetTableWidget.TITLE_COL)) {
			return d.getTitle();
		} else if (ct.equals(DataSetTableWidget.PAGES_COL)) {
			return d.getPageString();
		}
	}
	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:21,代码来源:DataSetTableLabelProvider.java


示例5: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
		if (element instanceof TrpUser) {
			TrpUser user = (TrpUser) element;
			
			TableColumn column = table.getColumn(columnIndex);
			String ct = column.getText();
					
			if (ct.equals(FindUsersWidget.USER_USERNAME_COL)) {
				return user.getUserName();
			} else if (ct.equals(FindUsersWidget.USER_FULLNAME_COL)) {
				return user.getFirstname()+" "+user.getLastname();
			}
//			else if (ct.equals(CollectionManagerDialog.USER_ROLE_COL)) {
//				TrpUserCollection uc = user.getUserCollection();
//				TrpRole r = uc == null ? TrpRole.None : (uc.getRole() == null ? TrpRole.None : uc.getRole());
//				return r.toString();
//			}
		}

		return "i am error";
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:22,代码来源:FindUsersWidgetLabelProvider.java


示例6: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override
public String getColumnText(Object element, int columnIndex) {
	//logger.trace("get column text: "+element+" id: "+columnIndex);
	
	if (element instanceof TrpKwsHit) {
		TrpKwsHit hit = (TrpKwsHit) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();
		
		if (ct.equals(KwsHitTableWidget.KWS_CONF_COL)) {
			return DF.format(hit.getConfidence());
		} else if (ct.equals(KwsHitTableWidget.KWS_PAGE_COL)) {
			return ""+hit.getPageNr();
		} else if (ct.equals(KwsHitTableWidget.KWS_TEXT_COL)) {
			return hit.getTranscription();
		} else if (ct.equals(KwsHitTableWidget.KWS_PREVIEW_COL)) {
			if(!icons.containsKey(hit)) {
				return "Loading...";
			} else {
				return "";
			}
		}
	}
	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:27,代码来源:KwsHitTableLabelProvider.java


示例7: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override
public String getColumnText(Object element, int columnIndex) {
	//logger.trace("get column text: "+element+" id: "+columnIndex);
	
	if (element instanceof TrpKwsResultTableEntry) {
		TrpKwsResultTableEntry res = (TrpKwsResultTableEntry) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();
		
		if (ct.equals(KwsResultTableWidget.KWS_CREATED_COL)) {
			return CoreUtils.DATE_FORMAT_USER_FRIENDLY.format(res.getCreated());
		} else if (ct.equals(KwsResultTableWidget.KWS_STATUS_COL)) {
			return res.getStatus();
		} else if (ct.equals(KwsResultTableWidget.KWS_SCOPE_COL)) {
			return res.getScope();
		} else if (ct.equals(KwsResultTableWidget.KWS_DURATION_COL)) {
			return res.getDuration();
		} else if (ct.equals(KwsResultTableWidget.KWS_QUERY_COL)) {
			return res.getQuery();
		}
	}
	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:25,代码来源:KwsResultTableLabelProvider.java


示例8: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
		if (element instanceof EdFeature) {
			EdFeature feat = (EdFeature) element;
			
			TableColumn column = table.getColumn(columnIndex);
			String ct = column.getText();

			if (ct.equals(EditDeclManagerDialog.EDT_DECL_TITLE_COL)) {
				return feat.getTitle();
			} else if (ct.equals(EditDeclManagerDialog.EDT_DECL_DESC_COL)) {
				return feat.getDescription();
			} else if (ct.equals(EditDeclManagerDialog.EDT_DECL_ID_COL)) {
				return ""+feat.getFeatureId();
			}  else if (ct.equals(EditDeclManagerDialog.EDT_DECL_OPT_COL)) {
				List<EdOption> opts = feat.getOptions();
				for(EdOption o : opts){
//					logger.debug(o.getText());
					if(o.isSelected()) return o.getText();
				}
			}
		}

		return "i am error";
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:25,代码来源:EditDeclTableLabelProvider.java


示例9: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
	if (element instanceof EdOption) {
		EdOption opt = (EdOption) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();

		if (ct.equals(EditDeclManagerDialog.OPT_TEXT_COL)) {
			return opt.getText();
		} else if (ct.equals(EditDeclManagerDialog.OPT_ID_COL)) {
			return ""+opt.getOptionId();
		}
	}

	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:17,代码来源:OptionTableLabelProvider.java


示例10: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
	if (element instanceof EdFeature) {
		EdFeature feat = (EdFeature) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();

		if (ct.equals(EditDeclManagerDialog.FEAT_TITLE_COL)) {
			return feat.getTitle();
		} else if (ct.equals(EditDeclManagerDialog.FEAT_DESC_COL)) {
			return feat.getDescription();
		} else if (ct.equals(EditDeclManagerDialog.FEAT_ID_COL)) {
			return ""+feat.getFeatureId();
		}  else if (ct.equals(EditDeclManagerDialog.FEAT_COL_ID_COL)) {
			final Integer colId = feat.getColId();
			if(colId != null){
				return ""+feat.getColId();
			} else {
				return "preset";
			}
		}
	}

	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:26,代码来源:FeatureTableLabelProvider.java


示例11: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
	if (element instanceof HtrModel) {
		HtrModel m = (HtrModel) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();

		if (ct.equals(TextRecognitionDialog.ID_COL)) {
			return ""+m.getModelId();
		} else if (ct.equals(TextRecognitionDialog.MODEL_NAME_COL)) {
			return m.getModelName();
		} else if (ct.equals(TextRecognitionDialog.LABEL_COL)) {
			return m.getLabel();
		}  else if (ct.equals(TextRecognitionDialog.LANG_COL)) {
			return m.getLanguage();
		} else if (ct.equals(TextRecognitionDialog.NR_OF_TOKENS_COL)) {
			return ""+m.getNrOfTokens();
		} else if (ct.equals(TextRecognitionDialog.NR_OF_LINES_COL)) {
			return ""+m.getNrOfLines();
		} else if (ct.equals(TextRecognitionDialog.NR_OF_DICT_TOKENS_COL)) {
			return ""+m.getNrOfDictTokens();
		}
	}

	return "i am error";
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:27,代码来源:HtrModelTableLabelProvider.java


示例12: getColumnText

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override public String getColumnText(Object element, int columnIndex) {
		if (element instanceof TrpJobStatus) {
			TrpJobStatus job = (TrpJobStatus) element;
			
			TableColumn column = table.getColumn(columnIndex);
			String ct = column.getText();
//			List<TrpJobStatus> data = jobOverviewWidget.getJobs();
//			int ri = data.indexOf(element);
//			logger.debug(ri+" element = "+element+" nrofdata = "+data.size()+" items = "+table.getItemCount());
//			TableItem ti = table.getItem(ri);						
			if (ct.equals(JobOverviewWidget.ID_COL)) {
				return job.getJobId();
			} else if (ct.equals(JobOverviewWidget.TYPE_COL)) {
				return job.getType();
			} else if (ct.equals(JobOverviewWidget.STATE_COL)) {				
				return job.getState();
			} else if (ct.equals(JobOverviewWidget.CREATION_COL)) {
				return timeFormatter.format(new Date(job.getCreateTime()));
			} else if (ct.equals(JobOverviewWidget.DOC_ID_COL)) {
				return ""+job.getDocId();
			} else if (ct.equals(JobOverviewWidget.PAGE_COL)) {
				return job.getPages();
			} else if (ct.equals(JobOverviewWidget.DESCRIPTION_COL)) {
				return job.getDescription();
			} else if (ct.equals(JobOverviewWidget.USER_NAME_COL)) {
				return job.getUserName();
			} else if (ct.equals(JobOverviewWidget.RESULT_COL) && job.getType().equals("Export Document")) {
				return job.getResult();
			}
		}

		return "i am error";
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:34,代码来源:JobOverviewLabelProvider.java


示例13: getColumnImage

import org.eclipse.swt.widgets.TableColumn; //导入方法依赖的package包/类
@Override
public Image getColumnImage(Object element, int columnIndex) {
	if (element instanceof TrpKwsHit) {
		TrpKwsHit hit = (TrpKwsHit) element;
		
		TableColumn column = table.getColumn(columnIndex);
		String ct = column.getText();

		if (ct.equals(KwsHitTableWidget.KWS_PREVIEW_COL) && icons.containsKey(hit)) {
			return icons.get(hit);
		}
	}
	return null;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:15,代码来源:KwsHitTableLabelProvider.java



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