當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。