本文整理汇总了Java中gate.util.AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的具体用法?Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE怎么用?Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gate.util.AnnotationDiffer
的用法示例。
在下文中一共展示了AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBackgroundAt
/**
* Gets the background color of a cell
*
* @param row
* @param column
* @return
*/
public Color getBackgroundAt(int row, int column) {
AnnotationDiffer.Pairing pairing = pairings.get(row);
switch(pairing.getType()) {
case (AnnotationDiffer.CORRECT_TYPE):
return BG;
case (AnnotationDiffer.PARTIALLY_CORRECT_TYPE):
return PARTIALLY_CORRECT_BG;
case (AnnotationDiffer.MISMATCH_TYPE):
if(column < COL_MATCH)
return MISSING_BG;
else if(column > COL_MATCH)
return FALSE_POSITIVE_BG;
else return BG;
case (AnnotationDiffer.MISSING_TYPE):
return MISSING_BG;
case (AnnotationDiffer.SPURIOUS_TYPE):
return FALSE_POSITIVE_BG;
default:
return BG;
}
}
示例2: getBackgroundAt
public Color getBackgroundAt(int row, int column){
AnnotationDiffer.Pairing pairing = pairings.get(row);
switch(pairing.getType()){
case(AnnotationDiffer.CORRECT_TYPE): return diffTable.getBackground();
case(AnnotationDiffer.PARTIALLY_CORRECT_TYPE): return PARTIALLY_CORRECT_BG;
case(AnnotationDiffer.MISMATCH_TYPE):
if(column < COL_MATCH) return MISSING_BG;
else if(column > COL_MATCH) return FALSE_POSITIVE_BG;
else return diffTable.getBackground();
case(AnnotationDiffer.MISSING_TYPE): return MISSING_BG;
case(AnnotationDiffer.SPURIOUS_TYPE): return FALSE_POSITIVE_BG;
default: return diffTable.getBackground();
}
//
// Color colKey = pairing.getType() ==
// AnnotationDiffer.CORRECT_TYPE ?
// diffTable.getBackground() :
// (pairing.getType() == AnnotationDiffer.PARTIALLY_CORRECT_TYPE ?
// PARTIALLY_CORRECT_BG : MISSING_BG);
// if(pairing.getKey() == null) colKey = diffTable.getBackground();
//
// Color colRes = pairing.getType() == AnnotationDiffer.CORRECT_TYPE ?
// diffTable.getBackground() :
// (pairing.getType() == AnnotationDiffer.PARTIALLY_CORRECT_TYPE ?
// PARTIALLY_CORRECT_BG :
// FALSE_POSITIVE_BG);
// if(pairing.getResponse() == null) colRes = diffTable.getBackground();
// switch(column){
// case COL_KEY_START: return colKey;
// case COL_KEY_END: return colKey;
// case COL_KEY_STRING: return colKey;
// case COL_KEY_FEATURES: return colKey;
// case COL_MATCH: return diffTable.getBackground();
// case COL_RES_START: return colRes;
// case COL_RES_END: return colRes;
// case COL_RES_STRING: return colRes;
// case COL_RES_FEATURES: return colRes;
// default: return diffTable.getBackground();
// }
}
示例3: DiffTable
/**
* Constructor
*
* @param pairings results of annotation diff
*/
public DiffTable(List<AnnotationDiffer.Pairing> pairings) {
matchLabel = new String[5];
matchLabel[AnnotationDiffer.CORRECT_TYPE] = "=";
matchLabel[AnnotationDiffer.PARTIALLY_CORRECT_TYPE] = "~";
matchLabel[AnnotationDiffer.MISSING_TYPE] = "-?";
matchLabel[AnnotationDiffer.SPURIOUS_TYPE] = "?-";
matchLabel[AnnotationDiffer.MISMATCH_TYPE] = "<>";
this.pairings = pairings;
}